Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
After activating my VPN in the system tray (KDE) it reports VPN is activated, as if everything was working correctly, but when I check websites like whatismyip.com, it shows my own IP address and not the one of my VPN.
default via 192.168.1.1 dev enp3s0 proto dhcp src 192.168.1.203 metric 10
default dev tun0 proto static scope link metric 50
default via 192.168.1.1 dev enp3s0 proto dhcp metric 100
10.5.208.0/20 dev tun0 proto kernel scope link src 10.5.215.209 metric 50
129.132.99.164 via 192.168.1.1 dev enp3s0 proto static metric 100
192.168.1.0/24 dev enp3s0 proto kernel scope link src 192.168.1.204 metric 100
192.168.1.1 dev enp3s0 proto dhcp scope link src 192.168.1.203 metric 10
192.168.1.1 dev enp3s0 proto static scope link metric 100
Quote:
Originally Posted by computersavvy
Also show us the output of "ip a s" so we can see the network config. It should show the vpn tunnel.
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 8c:89:a5:0c:5c:fe brd ff:ff:ff:ff:ff:ff
inet 192.168.1.204/24 brd 192.168.1.255 scope global dynamic noprefixroute enp3s0
valid_lft 2795sec preferred_lft 2795sec
inet 192.168.1.203/24 brd 192.168.1.255 scope global secondary dynamic enp3s0
valid_lft 2796sec preferred_lft 2796sec
inet6 fe80::e5f9:a670:5185:5d36/64 scope link noprefixroute
valid_lft forever preferred_lft forever
3: wlp4s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
link/ether 2e:d0:a0:e7:c3:80 brd ff:ff:ff:ff:ff:ff permaddr 0c:84:dc:03:ae:53
4: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1412 qdisc fq_codel state UNKNOWN group default qlen 500
link/none
inet 10.5.215.209/20 brd 10.5.223.255 scope global noprefixroute tun0
valid_lft forever preferred_lft forever
inet6 fe80::c8bb:e362:7e28:29bc/64 scope link stable-privacy
valid_lft forever preferred_lft forever
I'm confused why your interface has two IP addresses + the tun0 vpn address. In any case, the gateway on the vpn is not being set as your default route, so all of your traffic is going through the local gateway 192.168.1.1.
As @smallpond says, the default route does not get properly changed to the vpn, so all traffic other than to the 10.5.208.0/20 subnet is routed via the 192.168.1.1 router.
I actually see what appears to be 3 default routes. 2 are via the 192.168.1.1 address, but this is the interfering one with the metric 10
Code:
default via 192.168.1.1 dev enp3s0 proto dhcp src 192.168.1.203 metric 10
How are you connecting to the VPN? Normally the VPN configuration should push a default route to your network. What VPN service are you using?
I don't exactly know the permanent fix. His vpn did push the default route with metric 50 and the fallback default route is his gateway with metric 100. However the interfering one is the route with his gateway at metric 10.
On my system I will show the routing before I start the vpn, then after it is up, and you can see it was routed properly. His is different.
Code:
No VPN
$ ip r
default via 192.168.2.1 dev wlp4s0 proto dhcp metric 600
192.168.2.0/24 dev wlp4s0 proto kernel scope link src 192.168.2.111 metric 600
192.168.124.0/24 dev virbr0 proto kernel scope link src 192.168.124.1 linkdown
VPN connection established.
ip r
0.0.0.0/1 via 10.13.4.1 dev tun0
default via 192.168.2.1 dev wlp4s0 proto dhcp metric 600
10.13.4.0/24 dev tun0 proto kernel scope link src 10.13.4.222
89.187.175.238 via 192.168.2.1 dev wlp4s0
128.0.0.0/1 via 10.13.4.1 dev tun0
192.168.2.0/24 dev wlp4s0 proto kernel scope link src 192.168.2.111 metric 600
192.168.124.0/24 dev virbr0 proto kernel scope link src 192.168.124.1 linkdown
We need more info.
Please disconnect the VPN, reboot, then post the results of "ip route" with no active vpn.
Following that then bring up the VPN and again post the results of "ip route" so we can see the exact routing table changes as the result of starting the VPN.
Both can be done in a single post, just 2 entries so we can see the differences.
Last edited by computersavvy; 10-29-2021 at 09:48 AM.
default via 192.168.1.1 dev enp3s0 proto dhcp src 192.168.1.203 metric 10
default via 192.168.1.1 dev enp3s0 proto dhcp metric 100
192.168.1.0/24 dev enp3s0 proto kernel scope link src 192.168.1.204 metric 100
192.168.1.1 dev enp3s0 proto dhcp scope link src 192.168.1.203 metric 10
VPN enabled:
Code:
default via 192.168.1.1 dev enp3s0 proto dhcp src 192.168.1.203 metric 10
default dev tun0 proto static scope link metric 50
default via 192.168.1.1 dev enp3s0 proto dhcp metric 100
10.5.208.0/20 dev tun0 proto kernel scope link src 10.5.210.16 metric 50
129.132.99.164 via 192.168.1.1 dev enp3s0 proto static metric 100
192.168.1.0/24 dev enp3s0 proto kernel scope link src 192.168.1.204 metric 100
192.168.1.1 dev enp3s0 proto dhcp scope link src 192.168.1.203 metric 10
192.168.1.1 dev enp3s0 proto static scope link metric 100
The issue then is that you have 2 default route entries at boot and has nothing to do with the VPN,
Have you by chance manually entered a default route anywhere?
Have you manually configured a network interface address?
Do you have the machine set with a reserved dhcp address in your router?
The suspicious entries I see are these from both the above outputs.
Code:
default via 192.168.1.1 dev enp3s0 proto dhcp src 192.168.1.203 metric 10
192.168.1.1 dev enp3s0 proto dhcp scope link src 192.168.1.203 metric 10
MMMMMMM -- On second thought, you have 2 different IPs assigned to that interface, with .204 as the primary and .203 as the secondary. I would wager that if you get rid of the .204 address then things will work better.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.