This document describes how to configure a static route on a ClearOS system.
Static routes on a ClearOS system are associated with a particular network interface. The route is then enabled/disabled when the particular network interface is enabled/disabled. Here is a simple scenario:
In order for the ClearOS gateway to be aware of the remote 192.168.99.x LAN, a static route must be configured. In this example, /etc/sysconfig/network-scripts/route-eth1 is created with the following:
192.168.99.0/24 via 192.168.1.100
After adding this static route, the route can be activated by re-enabling the ClearOS LAN interface:
/sbin/ifup eth1
If you are adding routes to a routing table with existing routes present, you can use the above command to load the new routes. You will get a number of 'route already exists error messages' for those entries where routes exist.
If you are changing or deleting a route which has previously been defined, the above command will run, but the new route will not take effect.
In this scenario you need to re-load the routing table:
/sbin/ifdown eth1 /sbin/ifup eth1
(It might be a good idea to do this from the console if possible). If you have no access to the console and wish to do it remotely try:
/sbin/ifdown eth1 && /sbin/ifup eth1
(must be entered on the same line, which will try to re-load after taking it down).
If you are using Multi-WAN, then you also need to restart the firewall:
/sbin/service firewall restart
If you have other LAN networks connected behind your ClearOS gateway, you need to configure these on the system. You can add extra networks in /etc/clearos/network.conf (/etc/system/network in ClearOS 5.x). The format is:
For example:
EXTRALANS="192.168.4.0/24 192.168.5.0/24"
If you make this change, then you also need to restart the firewall:
/sbin/service firewall restart