v1.11 OpenVPN observations
Posted: Sun Mar 03, 2019 3:37 pm
Been looking at how OpenVPN is working in v1.11 and have run across a few things that puzzle me. In the below example the server LAN is 192.168.2.0 and the client LAN is 192.168.5.0 and we want these two to route both ways.
There is an option in the Gargoyle interface to allow access to the LAN behind the client. In my example this LAN is 192.168.5.0. As result of this option the following appears in the server.conf file:
And in the syslog I see the following:
I cannot see how this can work because at the time the server is coming up the client has not yet established the connection so there is no 10.8.0.2 network yet.
Even though there is no error shown in the logfile there is also no route added to the route table.
So I cannot access the 192.168.5.0 network until I manually add a route to it after everything is up.
I do not remember this being an issue in v1.10. Has something broken?
This looks ominous. Might be a kernel issue.
https://forums.openvpn.net/viewtopic.php?t=25771
Solved in kernel 4.20.13
There is an option in the Gargoyle interface to allow access to the LAN behind the client. In my example this LAN is 192.168.5.0. As result of this option the following appears in the server.conf file:
Code: Select all
push "topology subnet"
push "route-gateway 10.8.0.1"
route 192.168.5.0 255.255.255.0 10.8.0.2
Code: Select all
Sun Mar 3 14:27:32 2019 daemon.notice openvpn(custom_config)[7271]: /sbin/ifconfig tun0 10.8.0.1 netmask 255.255.255.0 mtu 1500 broadcast 10.8.0.255
Sun Mar 3 14:27:32 2019 daemon.notice openvpn(custom_config)[7271]: /sbin/route add -net 192.168.5.0 netmask 255.255.255.0 gw 10.8.0.2
Sun Mar 3 14:27:32 2019 daemon.warn openvpn(custom_config)[7271]: Could not determine IPv4/IPv6 protocol. Using AF_INET
Even though there is no error shown in the logfile there is also no route added to the route table.
Code: Select all
root@Gargoyle:/etc/openvpn# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default c-73-251-108-1. 0.0.0.0 UG 0 0 0 eth1
10.8.0.0 * 255.255.255.0 U 0 0 0 tun0
73.271.108.0 * 255.255.252.0 U 0 0 0 eth1
192.168.2.0 * 255.255.255.0 U 0 0 0 br-lan
I do not remember this being an issue in v1.10. Has something broken?
This looks ominous. Might be a kernel issue.
https://forums.openvpn.net/viewtopic.php?t=25771
Solved in kernel 4.20.13