Eric Monjoin
Staff Consulting Architect but also pilot, spending time in front of my computer or flying in the air...

Adding Static Route to WS1 Access

Method 1 : for Identity Manager 3.3 and WS1 Access 20.01: (thanks to Mahmood Ramzan for this one)

First edit “routes” files in /etc/sysconfig/network

vi /etc/sysconfig/network/routes

Then add your route in this form : <net_range>/<mask> <gateway> <interface> eth0

Then restart your network and confirm the route is persistent:

# /etc/init.d/network restart
# ip route list

Method 2 : for Identity Manager 3.3 and WS1 Access 20.01: (thanks to Javier Perez for this one) :

After connecting to WS1 using sshuser and sudo as root (or direct login as root), create the ifroute-eth0 file

# vim /etc/sysconfig/network/ifroute-eth0	

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

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

Restart your network as explained above.

Method for Workspace One Access 20.10 :
Workspace One Access 20.10 is based on Photon 3.0. I first try to add a file call route-eth0 in /etc/sysconfig/network-scripts but if it works by running /etc/sysconfig/network-scripts/ifup-routes it didn’t works when booting the appliance.

After digging a little bit I finally found the workaround (yepeee)

So once logged as root edit this file : /usr/local/horizon/script/networkwizard.hzn

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

Find the section “function save_sysconfig_properties” around line 800 (803 to be precise)

Alter the file to set the routes by adding the following lines in green :

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
      elif [ "$SYSCONF_IPV4_IP0" = "DHCP" ]; then
      elif [ "${SYSCONF_IPV6_IP[0]}" = "DHCP" ]; then
      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
          echo "[Route]" >> $ETH0_CONF
          echo "Destination=" >> $ETH0_CONF
          echo "Gateway=" >> $ETH0_CONF
          echo "GatewayOnlink=true" >> $ETH0_CONF
      if [ -n "${SYSCONF_IPV6_IP[0]}" -a "${SYSCONF_IPV6_IP[0]}" != "DHCP" ]; then
          local ndx=0
          while true
              local tmpip=${SYSCONF_IPV6_IP[$ndx]}
              local tmppfx=${SYSCONF_IPV6_PFX[$ndx]}
              if [ -z "$tmpip" ]; then
              echo "Address$ndx='$tmpip/$tmppfx'" >> $ETH0_CONF
              ndx=$(($ndx + 1))

Reboot the appliance to ensure it works fine

Pages: 1 2

You may also like...

1 Response

  1. January 22, 2021

    […] Adding Static Route to WS1 Access […]

Leave a Reply

Your email address will not be published. Required fields are marked *