0

I have the following in my route table if I connect to my Company VPN.

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      192.168.0.1    192.168.0.103     41
          0.0.0.0          0.0.0.0         On-link      192.168.11.1      1
          8.8.8.8  255.255.255.255         On-link      192.168.11.1      1
     10.10.10.182  255.255.255.255         On-link      192.168.11.1      1

As can be seen here, the gateway "On-link" is text and not an IP address. This is routing that automatically gets added by my Company VPN. (paloaltonetworks.com GlobalProtect)

I want to remove some routes so that not all my traffic is not always going over the VPN.

So I delete the 0.0.0.0 route so that by default traffic goes over my normal internet

route DELETE 0.0.0.0

then because there is two "0.0.0.0" routes before the delete, I add in my default gateway route again

route ADD 0.0.0.0 MASK 0.0.0.0 192.168.0.1 METRIC 1

but now, i cant reach any of my work destinations anymore. So now i want to add routes to go to the VPN gateway, but instead of an IP address I have "On-link" So if I try to add a route to go to "On-Link" i get an error

C:\Windows\system32>route ADD 162.29.152.249 MASK 255.255.255.255 On-link
The route addition failed: The parameter is incorrect.

It also does not help to put it in quotes. So how do I get the IP-address of this gateway?

if I look at my windows network connections, I have "PANGP Virtual Ethernet Adapeter" that seems to be created by the VPN client. If I open it, and go to the TCP/IPv4 settings, I can see my VPN Ip address, and subnet mask, but the "Default gateway" is is blank.

So I don't know how to get the default gateway IP address, or how to route specific traffic over this VPN connection.

Any help will be much appreciated.

  • You shouldn't try to circumvent the company VPN, you are likely breaking terms of use. – Tero Kilkanen Feb 03 '21 at 19:27
  • @TeroKilkanen No. He just try to able to access to internet. Just because VPN forces default route on company's internal network which has no internet. – kholis Jun 16 '22 at 07:28
  • And are you sure the terms of use allow accessing internet at the same time as company internal network? – Tero Kilkanen Jun 16 '22 at 20:34

1 Answers1

1

You can add on-link routes via a specific interface without explicitly mentioning the gateway address using the following syntax:

ROUTE ADD 162.29.152.249 MASK 255.255.255.255 0.0.0.0 IF <X>

Where <X> is the ID of the network interface, which you can find out using ROUTE PRINT.

Massimo
  • 70,200
  • 57
  • 200
  • 323