manbytesgnu_site

Source files for manbytesgnu.org
git clone git://holbrook.no/manbytesgnu_site.git
Info | Log | Files | Refs

docker_vpn_routes.sh (392B)


      1 #!/bin/sh
      2 
      3 default_route_vpn_gateway=`ip route | awk '{if ($1 ~ /^0.0.0.0\/1$/) { print $3; }}'`
      4 route_vpn_gateway=${VPN_GATEWAY:-$default_route_vpn_gateway}
      5 echo "Adding default route to $route_vpn_gateway with /0 mask..."
      6 ip route add default via $route_vpn_gateway
      7 
      8 echo "Removing /1 routes..."
      9 ip route del 0.0.0.0/1 via $route_vpn_gateway
     10 ip route del 128.0.0.0/1 via $route_vpn_gateway