Adding Static Routes

Unlike UAG, which presents an option to add static routes during the OVA deployment, Workspace ONE Access requires static route to be manually added. Below are instructions for adding static routes for various versions of Workspace ONE Access / vIDM.

WS ONE Access 20.10

1. Login as root and edit the file located @ /usr/local/horizon/script/networkwizard.hzn

				
					vi /usr/local/horizon/script/networkwizard.hzn				
			

2. Find the section “function save_sysconfig_properties” around line 800 and insert the four lines commented below:

				
					
function save_sysconfig_properties() {
    if [ $ETHO_DEVICE_RESTORED -eq 0 ]; then
      # any DHCP
      local DHCP=no
      if [ "$SYSCONF_IPV4_IP0" = "DHCP" -a "${SYSCONF_IPV6_IP[0]}" = "DHCP" ]; then
          DHCP="yes"
      elif [ "$SYSCONF_IPV4_IP0" = "DHCP" ]; then
          DHCP="ipv4"
      elif [ "${SYSCONF_IPV6_IP[0]}" = "DHCP" ]; then
          DHCP="ipv6"
      fi
      echo save $ETH0_CONF
      echo -n > $ETH0_CONF
      echo "[Match]" >> $ETH0_CONF
      echo "Name=eth0" >> $ETH0_CONF
      echo "" >> $ETH0_CONF
      echo "[Network]" >> $ETH0_CONF
      echo "DHCP=$DHCP" >> $ETH0_CONF
      if [ -n "$SYSCONF_IPV4_IP0" -a "$SYSCONF_IPV4_IP0" != "DHCP" ]; then
          echo "Address=$SYSCONF_IPV4_IP0/`mask2cdr $SYSCONF_IPV4_NETMASK`" >> $ETH0_CONF
          echo "Gateway=$SYSCONF_IPV4_GATEWAY" >> $ETH0_CONF
          echo "DNS=$SYSCONF_NET_DNS" >> $ETH0_CONF
          echo "LinkLocalAddressing=no" >> $ETH0_CONF
          echo "IPv6AcceptRA=no" >> $ETH0_CONF
   #insert the four lines below
          echo "[Route]" >> $ETH0_CONF
          echo "Destination=10.0.0.0/24" >> $ETH0_CONF
          echo "Gateway=192.168.0.250" >> $ETH0_CONF
          echo "GatewayOnlink=true" >> $ETH0_CONF
    #end here
      fi
      if [ -n "${SYSCONF_IPV6_IP[0]}" -a "${SYSCONF_IPV6_IP[0]}" != "DHCP" ]; then
          local ndx=0
          while true
          do
              local tmpip=${SYSCONF_IPV6_IP[$ndx]}
              local tmppfx=${SYSCONF_IPV6_PFX[$ndx]}
              if [ -z "$tmpip" ]; then
                  break
              fi
              echo "Address$ndx='$tmpip/$tmppfx'" >> $ETH0_CONF
              ndx=$(($ndx + 1))
          done
      fi
    fi
}				
			

3. Reboot the appliance 

WS ONE Access 20.01 and Identity Manager 3.3

Method 1

1. Edit “routes” files in /etc/sysconfig/network

				
					vi /etc/sysconfig/network/routes				
			

2. Add your route in this form : <net_range>/<mask> <gateway> <interface>

See example below:

				
					10.1.2.0/24 192.168.12.254 eth0				
			

3. Restart your network 

				
					/etc/init.d/network restart				
			

4. Confirm the route is persistent:

				
					ip route list				
			

Method 2

1. Create the ifroute-eth0 file

				
					vim /etc/sysconfig/network/ifroute-eth0					
			

2. Add your route (same format as for vIDM 3.3) and set permission on this file:

				
					chmod 644 /etc/sysconfig/network/ifroute-eth0				
			

4. Restart your network 

				
					/etc/init.d/network restart