How to add a Static Route to the USS Gateway

Updated 8 months ago by admin

This article will provide the steps required to add a Static Route to the USS Gateway via the command line.

  1. Ensure you have logged in to the USS Gateway command line
  2. Elevate permissions to root by typing: sudo su and entering the password.
  3. To view the gateway routing table use the command: route -n

Make a note of the interface name, in this example, it is enp0s3.

Normally the gateway should route automatically between network interfaces (NICs), but in rare cases – for example, when you use public IP ranges instead of private ones (i.e 10.0.0.0, 192.168.0.0 etc) a static route may be necessary. 
  1. Use nano or vi to edit (or create if it doesn't exist) the custom firewal file e.g. nano /etc/ussgw_custom_firewall
  2. If newly created (empty) add #!/bin/bash as the first line
  3. Add your route command i.e. 

route add -net 40.0.0.0 netmask 255.0.0.0 gw 10.0.5.1 dev enp0s3 

(remember to add the correct interface name identified in step 3)

  1. Save the file. It should now look like this:
#!/bin/bash
route add -net 40.0.0.0 netmask 255.0.0.0 gw 10.0.5.1 dev enp0s3 
  1. If the file was newly created, make sure it is executable by runningchmod +x /etc/ussgw_custom_firewall 
  2. Finally, restart the sysmond process by running: service ussgw_sysmond restart

Once these steps have been completed the new Static Route will be added to the Gateway.


How did we do?