R. Gerrits
Very Senior Member
Today I noticed an issue with the VPN Bypassing.
I was downloading a new game to my playstation and wondered why it went so slow -> then I noticed it is was download via my VPN connection, instead of directly from internet.
I checked ip rule show -> all the vpn bypassing rules were there.
Next I checked ip route show table novpn -> this was missing the default route to internet.
I fixed it by running /usr/bin/addon_bypassvpnip.sh force -> after this the default route to internet was back:
(and my download was faster again)
I don't know what caused it.
I can only see that this afternoon my VPN connection restarted and and at that point the main routing table had both the internet and vpn routes:
My suspicion: after the restart of VPN, the addon_bypassvpnip.sh script should have been called to recreate the novpn routing table.
and for some reason this didn't happen.
I don't exactly know what logic you are normally using to trigger addon_bypassvpnip.sh, but I'd say it would be better that the start function in /etc/init.d/openvpn-client should have something like "IF VPNbypassing = enabled THEN /usr/bin/addon_bypassvpnip.sh force"
And I'd place this just before the net-wall restart command.
(This might cause the net-wall to be restarted twice. once from addon_bypassvpnip.sh (only if killswitch is enabled) and once from the openvpn-client script. So it could use some improvement.)
(And I'm not sure if the "force" parameter is required.)
I was downloading a new game to my playstation and wondered why it went so slow -> then I noticed it is was download via my VPN connection, instead of directly from internet.
I checked ip rule show -> all the vpn bypassing rules were there.
Next I checked ip route show table novpn -> this was missing the default route to internet.
Code:
root@R7800:~$ ip route show table novpn
10.0.0.0/8 via 192.168.1.5 dev br0 metric 10
192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.1
192.168.2.0/24 dev tun0 proto kernel scope link src 192.168.2.1
239.0.0.0/8 dev br0 scope link
I fixed it by running /usr/bin/addon_bypassvpnip.sh force -> after this the default route to internet was back:
(and my download was faster again)
Code:
root@R7800:~$ ip route show table novpn
default via 94.213.xxx.1 dev brwan
10.0.0.0/8 via 192.168.1.5 dev br0 metric 10
94.213.xxx.0/23 dev brwan proto kernel scope link src 94.213.xxx.xxx
172.83.xxx.xxx via 94.213.xxx.1 dev brwan
192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.1
192.168.2.0/24 dev tun0 proto kernel scope link src 192.168.2.1
239.0.0.0/8 dev br0 scope link
I don't know what caused it.
I can only see that this afternoon my VPN connection restarted and and at that point the main routing table had both the internet and vpn routes:
Code:
2021-02-01 14:06:54; 489950.15; [OpenVPN]; [rc.common 25566 Information: ip route after starting OpenVPN];
2021-02-01 14:06:54; 489950.16; [OpenVPN]; [rc.common 25566
0.0.0.0/1 via 172.21.xxx.1 dev tun21
default via 94.213.xxx.1 dev brwan
10.0.0.0/8 via 192.168.1.5 dev br0 metric 10
94.213.xxx.0/23 dev brwan proto kernel scope link src 94.213.xxx.xxx
128.0.0.0/1 via 172.21.xxx.1 dev tun21
172.21.xxx.0/23 dev tun21 proto kernel scope link src 172.21.xxx.xxx
172.83.xxx.xxx via 94.213.xxx.1 dev brwan
192.168.1.0/24 dev br0 proto kernel scope link src 192.168.1.1
192.168.2.0/24 dev tun0 proto kernel scope link src 192.168.2.1
239.0.0.0/8 dev br0 scope link ];
My suspicion: after the restart of VPN, the addon_bypassvpnip.sh script should have been called to recreate the novpn routing table.
and for some reason this didn't happen.
I don't exactly know what logic you are normally using to trigger addon_bypassvpnip.sh, but I'd say it would be better that the start function in /etc/init.d/openvpn-client should have something like "IF VPNbypassing = enabled THEN /usr/bin/addon_bypassvpnip.sh force"
And I'd place this just before the net-wall restart command.
(This might cause the net-wall to be restarted twice. once from addon_bypassvpnip.sh (only if killswitch is enabled) and once from the openvpn-client script. So it could use some improvement.)
(And I'm not sure if the "force" parameter is required.)