Chapter 7: How to Create IP Routes in Ubuntu Using the UI

Introduction

Routing is essential for directing data between networks. Normally, your router handles most of the routing automatically, but in some cases, you may need to manually configure IP routes in Ubuntu.

But why would you need to do this? Sometimes, custom routes are necessary when:

  • Connecting multiple networks in an office.

  • Routing traffic through a VPN or specific gateway.

  • Improving network performance by optimizing paths.

In this chapter, we’ll explore how routing works and walk through the Ubuntu UI-based method to create IP routes, avoiding complex terminal commands.


What is an IP Route?

An IP route is a defined path that tells data where to go on a network. Think of it like a GPS that helps find the best road to reach a destination.

Real-World Analogy: Delivery Trucks and Roads

  • Imagine a delivery company sending packages to different cities.

  • They plan the best routes to ensure fast delivery.

  • If a road is blocked, they create an alternative route.

  • Similarly, an IP route defines how data should travel through networks.

Without proper routes, data might get lost, take longer paths, or fail to reach its destination.


Types of Routes

There are two main types of routes in networking:

1️⃣ Default Route (Gateway Route)

  • This is the main route used when no other specific route is defined.

  • In home networks, this is typically your router’s IP (e.g., 192.168.1.1).

  • All internet traffic is forwarded through this route.

2️⃣ Static Routes (Manually Defined Paths)

  • These routes are manually set to send data through a specific network.

  • Used for VPNs, multi-network setups, or traffic control.

  • Example: If 192.168.2.0/24 should go via 192.168.1.100, you need a static route.


How to View Existing Routes in Ubuntu UI

You can check your current routes using Ubuntu’s graphical settings instead of the command line.

Step 1: Open Network Settings

  1. Click the network icon in the top-right corner of Ubuntu.

  2. Select SettingsNetwork.

Step 2: View Connection Details

  1. Click on your active Wi-Fi or Ethernet connection.

  2. Click Details → Scroll down to Routes.

  3. Here, you will see Default Gateway and existing routes.


How to Add a Static Route in Ubuntu UI

Scenario: Routing Office Traffic to a Specific Server

Let’s say your office network has two subnets:

  • 192.168.1.0/24 (default network)

  • 192.168.2.0/24 (for servers)

  • You want all traffic from 192.168.1.x to reach 192.168.2.x via a gateway at 192.168.1.100.

Steps to Add a Static Route in Ubuntu UI

Step 1: Open Network Settings

  1. Click Network IconSettingsNetwork.

  2. Select your active Wi-Fi or Ethernet connection.

  3. Click the gear icon next to it.

Step 2: Add a New Route

  1. Scroll down to Routes.

  2. Click Add Route.

  3. Enter the following details:

    • Address: 192.168.2.0

    • Netmask: 255.255.255.0 (or /24 CIDR notation)

    • Gateway: 192.168.1.100

    • Metric: 100 (optional, lower is preferred)

  4. Click Apply.

Step 3: Activate the Route

  1. Toggle Use this connection only for resources on its network (to avoid overriding internet routes).

  2. Click Save and restart your network connection.

Your custom route is now active! 🎉


Testing the New Route

Once added, you can test if the route works using:

Method 1: Ubuntu UI (Checking Active Routes)

  1. Go back to Network Settings.

  2. Click on your connection and view routes.

  3. You should see the newly added route.

Method 2: Browser Test (If Routing to a Server)

  1. Open a browser and try accessing a server on 192.168.2.x.

  2. If it loads, the route is working!


When Should You Use Static Routes?

Connecting multiple networks (e.g., offices, branches).
Sending VPN traffic through a specific gateway.
Prioritizing traffic through different internet providers.
Setting up network-based access controls.
Avoiding loops in complex networks.

You do NOT need static routes if:

  • You only use a home Wi-Fi network.

  • Your router automatically manages routing (which it does by default).

  • You have no need for multiple networks or VPNs.


Conclusion

Setting up custom IP routes in Ubuntu using the UI is simple and helps in managing network traffic effectively. Whether you’re directing office traffic, setting up VPNs, or optimizing connections, knowing how to configure routes is a valuable skill.

Key Takeaways:

Routing directs data, just like GPS navigation.
Default routes handle most traffic; static routes are for special cases.
Ubuntu UI allows easy route management without command-line usage.
Testing new routes ensures they work correctly.


🎯 Next Chapter: Wrapping Up – Final Thoughts on Networking Basics