[SOLVED]Routing Table driving me nuts with VPN

Kernels & Hardware, configuring network, installing services

[SOLVED]Routing Table driving me nuts with VPN

Postby stuart264 » 2018-02-14 09:08

I originally started trying to stop my VPN (VyprVPN) connection picking up the DNS servers from Virgin Media via DHCP when it connects, after many many false starts I finally worked out that I had to remove the "get dns" string from /etc/dhcp/dhclient.conf

However in the process i totally borked my VPN connection and over the last 2 days I have been trying to repair it, after many false starts I finally have it configured and its running.

Unfortunately somewhere I have an extra entry so that after a reboot, if I run the "route" command i get the following:-

Code: Select all
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
default         192.168.0.1     0.0.0.0         UG    100    0        0 eth0
10.8.0.0        10.8.0.2        255.255.255.0   UG    0      0        0 tun0
10.8.0.2        0.0.0.0         255.255.255.255 UH    0      0        0 tun0
link-local      0.0.0.0         255.255.0.0     U     1000   0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     100    0        0 eth0


Note the double entry of 192.168.0.1 this is the problem after I run
Code: Select all
sudo ip route del default via 192.168.0.1


Everything works fine and running route again gives me this result.
Code: Select all
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    100    0        0 eth0
10.8.0.0        10.8.0.2        255.255.255.0   UG    0      0        0 tun0
10.8.0.2        0.0.0.0         255.255.255.255 UH    0      0        0 tun0
link-local      0.0.0.0         255.255.0.0     U     1000   0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     100    0        0 eth0


and once I bring up the VPN everything works fine and this is the result
Code: Select all
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.10.139.1     0.0.0.0         UG    50     0        0 tun1
default         192.168.0.1     0.0.0.0         UG    100    0        0 eth0
10.8.0.0        10.8.0.2        255.255.255.0   UG    0      0        0 tun0
10.8.0.2        0.0.0.0         255.255.255.255 UH    0      0        0 tun0
10.10.139.0     0.0.0.0         255.255.255.0   U     50     0        0 tun1
link-local      0.0.0.0         255.255.0.0     U     1000   0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     100    0        0 eth0
192.168.0.1     0.0.0.0         255.255.255.255 UH    100    0        0 eth0
216.166.57.139  192.168.0.1     255.255.255.255 UGH   100    0        0 eth0


The problem is that somewhere in my system there is probably a legacy entry or legacy program adding the second entry of a default gateway of 192.168.0.1 to my routing tables, but I cant find it, I have searched everywhere, looked at every network file I can find plus I have had
Code: Select all
[sudo ag "192.168.0.1" --silent
running all the way through my \etc\ directory trying to find any entries that could cause this, if anyone has any ideas where its coming from I would really appreciate a solution because my partner is complaining about the swearing at the PC.

Stuart.
Last edited by stuart264 on 2018-02-14 23:52, edited 2 times in total.
stuart264
 
Posts: 9
Joined: 2015-07-18 08:28

Re: Routing Table driving me nuts with VPN

Postby Thorny » 2018-02-14 11:46

stuart264 wrote:... if anyone has any ideas where its coming from I would really appreciate a solution because my partner is complaining about the swearing at the PC.

Well, I have answer for that one as I have faced the same complaint.

When I stopped swearing at the computer the complaints stopped.
stuart264 wrote:..., but I cant find it, I have searched everywhere, looked at every network file I can find ...

As to this question, none of us knows what files you have and have not found so if you list them and probably their actual contents, maybe someone can suggest what you might have missed.

Otherwise this thread could degenerate into a frustrating twenty questions with an, "I already checked that" answers. And that wouldn't be productive for anybodies time or patience.

But maybe someone will come along and make lucky wild guess. They haven't in the last hours.
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

Re: Routing Table driving me nuts with VPN

Postby stuart264 » 2018-02-14 22:47

Your 100% right in what you say. I have done a lot of checking and cross referencing online manuals, however I think I am a little nearer to knowing what the issue is, it would appear that on boot the extra 192.168.0.1 entry is being added into the kernel IP Routing Table by some startup script.

I know its not the network configuration, or anything to do with firewall software as I removed them during testing. Its neither Resolvconf, Ifupdown, DNSMasq, Netfilter-Persistent or RCS

I suspect its somewhere in the networking system because if I run sudo /etc/init.d/networking restart straight after boot, then the entry of 192.168.0.1 with a metric of 100 goes from the Kernel Routing Table, the problem is that's the entry I need to run the VPN so I am stuck issuing
Code: Select all
sudo ip route del default metric 0
at every boot as a work around.
stuart264
 
Posts: 9
Joined: 2015-07-18 08:28

Re: Routing Table driving me nuts with VPN

Postby stuart264 » 2018-02-14 23:50

Finally fixed it, the fault was with duff legacy network udev rules.

To fix this: Firstly make sure predictable network names are disabled in your kernel by editing /etc/default/grub and adding the line
Code: Select all
GRUB_CMDLINE_LINUX_DEFAULT="net.ifnames=0 biosdevname=0"

Then
Code: Select all
sudo update-grub

Then delete the rules from /etc/udev/rules.d and reboot.
stuart264
 
Posts: 9
Joined: 2015-07-18 08:28

Re: [SOLVED]Routing Table driving me nuts with VPN

Postby Thorny » 2018-02-15 12:29

Good show that you figured out what you needed. I had to drive 500 km after answering and couldn't get back to you but just writing down concretely what you know and sticking with your quest can often be successful.
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40

Re: [SOLVED]Routing Table driving me nuts with VPN

Postby stuart264 » 2018-02-16 08:40

Yep, hefty learning curve though I think its about 20+ hours of trying different things and reading up multiple manuals and technical documents, now all I have to do is put in the firewall rules but that's definitely going to be after the weekend.
stuart264
 
Posts: 9
Joined: 2015-07-18 08:28

Re: [SOLVED]Routing Table driving me nuts with VPN

Postby Thorny » 2018-02-16 09:10

stuart264 wrote:... but that's definitely going to be after the weekend.

Yeah! The weekend is for Party!
Or at least it was before I retired, now I'm always too old and tired to party.
Have a good one!
User avatar
Thorny
 
Posts: 542
Joined: 2011-02-27 13:40


Return to System configuration

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable