VMware Unified Access Gateway – Oops, forgot my static routes

Recently, I deployed a new VMware Unified Access Gateway (UAG) multi-nic appliance. During the deployment I forgot to specify the required static route which prevented me from reaching the UAG management interface (:9443). Instead of redeploying, I decided to fix my mistake manually. This short blog post shows a way to fix this.

The Console Part

Open the UAG console in whatever hypervisor you are using.

Select Login using the Up/Down arrow keys and hit Enter.

Login using the user name root and the password that you specified during the UAG appliance deployment.

You can type the following command to show the current routes.

route -n

In my case I needed to regain access to the management interface first. To fix that, I needed to add a static route first. This can be done using the following command.

route add -net <subnet IP> gw <gateway IP> netmask <subnet mask> <nic>

For example.

route add -net 192.168.1.0 gw 192.168.5.1 netmask 255.255.255.0 eth1

Where eth1 is the nic for the management interface/LAN in my case.

Adding the static route regained access to the management interface. However, static routes that are configured from the command line are not retained during an UAG appliance reboot. Only static routes that are configured in the management interface will be retained during an UAG appliance reboot. Since we regained access to the management interface, we will now configure the static route there.

The Management Interface Part

Connect to the UAG management interface (:9443) using a web browser and login using the user name admin and the password that you configured during the UAG appliance deployment.

Below Configure Manually click Select.

Under Advanced Settings click the gear icon next to Network Settings.

Click the gear icon next to the nic interface for which you want to add a static route.

Open up the IPv4 Configuration and enter your static route in the IPv4 Static Routes field.

Use the CIDR notation for specifying a static route.

<CIDR> <gateway IP>

For example.

192.168.1.0/24 192.168.5.1

Do not forget to click the (+) button to actually really add the static route. And click Save.

The Static Route Script(s)

Now that the static route has been configured, an ipv4Routes.sh script has been created in the folder /opt/vmware/gateway/conf. This script is triggered by the routes.sh script in the same folder. This makes sure the static route will always be configured during each reboot.

That’s it. I hope this helps whenever you forgot to configure static routes during UAG deployment and don’t want, or are unable to redeploy.

You may also like...