Adding a Static Route on a Gateway
Below is a short guide on how to add a static route to your Cloud Gateway.
- Access the Command Line of your Cloud Gateway.
- Access the Cloud Gateway root account by entering the command
sudo su
and enter the required password. - Now enter the below command to open up the file that contains the static route configuration:
nano /etc/netplan/00-installer-config.yaml
- Then add the static routes you require as shown highlighted in the yellow text in the example below (the IP address may differ for your network), to exit press
CTRL + X
(then pressY
to save):
- Now run the following command to apply the configuration:
sudo netplan apply
- For the new routes to be applied you must restart the gateway, either through the gateway UI or by using the command
reboot
from the CLI. This will interrupt browsing briefly while the gateway restarts.
To verify that the routes have been added correctly, you can run either of the below commands from the CLI:
netstat -r
or
ip route show