I am trying to connect to the OpenVPN server. When I run openvpn --config config.ovpn
, it connects normally and I have internet access and connections that bind TAP adapter can access internet. When I try openvpn --config config.ovpn --pull-filter ignore redirect-gateway
, Windows network connection manager says “No internet connection” on VPN’s TAP adapter. Using --route-nopull
and route-noexec
give the same result.
I don’t need to route all traffic through OpenVPN, I just need to bind some connections to VPN’s TAP adapter, so I can’t use it without ignoring redirect-gateway.
Why does route change ignore breaks connection and how to make OpenVPN connect normally without changing routes?
Configuration: Free OpenVPN - Free VPN server in Germany (tcp version)
IPv4 routes before connection:
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.100 2
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
192.168.0.0 255.255.255.0 On-link 192.168.0.100 257
192.168.0.100 255.255.255.255 On-link 192.168.0.100 257
192.168.0.255 255.255.255.255 On-link 192.168.0.100 257
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 192.168.0.100 257
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 192.168.0.100 257
===========================================================================
IPv4 routes with connection (with --pull-filter ignore redirect-gateway
, no internet connection on TAP):
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.100 2
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
192.168.0.0 255.255.255.0 On-link 192.168.0.100 257
192.168.0.100 255.255.255.255 On-link 192.168.0.100 257
192.168.0.255 255.255.255.255 On-link 192.168.0.100 257
192.168.244.0 255.255.255.0 On-link 192.168.244.232 281
192.168.244.232 255.255.255.255 On-link 192.168.244.232 281
192.168.244.255 255.255.255.255 On-link 192.168.244.232 281
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 192.168.244.232 281
224.0.0.0 240.0.0.0 On-link 192.168.0.100 257
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 192.168.244.232 281
255.255.255.255 255.255.255.255 On-link 192.168.0.100 257
===========================================================================
IPv4 routes with connection (without --pull-filter ignore redirect-gateway
, normal internet connection on TAP):
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.100 2
0.0.0.0 128.0.0.0 192.168.244.1 192.168.244.231 25
5.154.181.23 255.255.255.255 192.168.0.1 192.168.0.100 1
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
128.0.0.0 128.0.0.0 192.168.244.1 192.168.244.231 25
192.168.0.0 255.255.255.0 On-link 192.168.0.100 257
192.168.0.100 255.255.255.255 On-link 192.168.0.100 257
192.168.0.255 255.255.255.255 On-link 192.168.0.100 257
192.168.244.0 255.255.255.0 On-link 192.168.244.231 281
192.168.244.231 255.255.255.255 On-link 192.168.244.231 281
192.168.244.255 255.255.255.255 On-link 192.168.244.231 281
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 192.168.244.231 281
224.0.0.0 240.0.0.0 On-link 192.168.0.100 257
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 192.168.244.231 281
255.255.255.255 255.255.255.255 On-link 192.168.0.100 257
===========================================================================