You are not logged in.

#1 2020-02-07 21:35:47

Vectorlocity
Member
Registered: 2018-04-15
Posts: 132

Making route table settings permanent

Today I stumbled across a random DNS resolving error, which after being fixed turned into a connection error. Turned out that NetworkManager was switching to my tap0 interface, when my ethernet connection uses enp6s0.
I edited my route table to delete all tap0 entries. Now my question is, how do I make these permanent? Put the commands in .zshrc?

Commands I ran:

sudo route del -net 0.0.0.0 gw 10.8.0.1 netmask 128.0.0.0 tap0
sudo route del -net 10.8.0.0 gw 0.0.0.0 netmask 255.255.255.0 tap0
sudo route del -net 128.0.0.0 gw 10.8.0.1 netmask 128.0.0.0 tap0

Output of route -n before commands:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.8.0.1        128.0.0.0       UG    0      0        0 tap0
0.0.0.0         192.168.1.254   0.0.0.0         UG    0      0        0 enp6s0
10.8.0.0        0.0.0.0         255.255.255.0   U     0      0        0 tap0
46.101.4.181    192.168.1.254   255.255.255.255 UGH   0      0        0 enp6s0
128.0.0.0       10.8.0.1        128.0.0.0       UG    0      0        0 tap0
192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 enp6s0

Output of route -n after commands:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.254   0.0.0.0         UG    0      0        0 enp6s0
46.101.4.181    192.168.1.254   255.255.255.255 UGH   0      0        0 enp6s0
192.168.1.0     0.0.0.0         255.255.255.0   U     100    0        0 enp6s0

Last edited by Vectorlocity (2020-02-08 11:38:40)

Offline

#2 2020-02-07 21:48:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,056

Re: Making route table settings permanent

Put the commands in .zshrc?

Won't work, fires too often and you'd have to free the sudo command in sudoers. Drop that idea.

Will simply ignoring the device do?
https://wiki.archlinux.org/index.php/Ne … ic_devices

Offline

#3 2020-02-07 22:20:41

Vectorlocity
Member
Registered: 2018-04-15
Posts: 132

Re: Making route table settings permanent

Yep, I think that will work! Thanks for your help smile

Offline

#4 2020-02-08 09:02:29

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,056

Re: Making route table settings permanent

In case: Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#5 2020-02-08 11:39:47

Vectorlocity
Member
Registered: 2018-04-15
Posts: 132

Re: Making route table settings permanent

My computer somehow just randomly re-added the tap0 interface to my route table, and switched my connection to it. Ignoring it doesn't work.
systemctl status NetworkManager shows this:

Feb 08 10:55:02 Kevin-B350MA NetworkManager[9620]: <info>  [1581159302.5403] manager: (tap0): new Tun device (/org/freedesktop/NetworkManager/Devices/4)

Where is this /org/freedesktop/NetworkManager/Devices/4 directory?

EDIT: How do I make the removal of tap0 permanent?

Last edited by Vectorlocity (2020-02-08 12:35:10)

Offline

#6 2020-02-08 14:41:54

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,056

Re: Making route table settings permanent

What does your /etc/NetworkManager/conf.d/unmanaged.conf look like and did you restart NM (or reboot) after altering it?

Offline

Board footer

Powered by FluxBB