0

The reason that I am asking this question is that i a using VPN-slice (VPNC) with openconnect

While running this command

ip route add *.mycompany.net via 0.0.0.0 dev tun0

Error: any valid prefix is expected rather than "*.mycompany.net".

What I have noticed is that all the domain names that are matching with *.mycompany.net can be covered using 160.0.0.0/8 but when I add this subnet It's not working the websites are not loading and even if I add the IP of a single domain name example: 160.22.33.44 the website doesn't load I have to write its domain name myweb.mycompany.net for it to work.

Thank a lot

1 Answers1

1

IP routing / forwarding has no idea about domain names, all routing rules are set up using IP addresses / address blocks.

Most likely the problem with your setup is that your VPN server is not doing NAT properly for the IP address blocks you are trying to route via the VPN.

Tero Kilkanen
  • 34,499
  • 3
  • 38
  • 58