Hi,
I'm using OpenVPN very successfully with a rather simple setup that is, effectively using my internet connection that I have in another house in another country (Location 1), thus using it as my own private VPN service.
The setup is:
Location 1:
Internet from Location 1 -> RaspberryPi with OpenVPN server running
Location 2:
Internet from Location 2 -> (eth0)=>Old computer running OpenWrt with OpenVPN client running=>(eth1) (Internet from Location 2 in card in eth0, With Internet from Location 1 setup in card in eth1) -> eth1 to Wifi Repeater -> Many end devices connecting connecting to Location 1 internet.
This is a setup that I have tested during this week and it's running great, except that when the "Internet from Location 1" changes it's IP, a renew requests gets triggered in "Old computer running OpenWrt with OpenVPN client running".
At that point I see this System log in the OpenWrt Luci:
This Inactivity timeout is what seems to have trigger it
Fri Sep 25 22:23:38 2020 daemon.info dnsmasq[1462]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Fri Sep 25 22:23:49 2020 daemon.notice openvpn(raspbpivpnuk)[1796]: [server_VvDpT3SPdeDdruUb] Inactivity timeout (--ping-rest
Fri Sep 25 22:23:49 2020 daemon.notice openvpn(raspbpivpnuk)[1796]: SIGUSR1[soft,ping-restart] received, process restarting
Fri Sep 25 22:23:49 2020 daemon.notice openvpn(raspbpivpnuk)[1796]: Restart pause, 5 second(s)
Fri Sep 25 22:23:54 2020 daemon.notice openvpn(raspbpivpnuk)[1796]: TCP/UDP: Preserving recently used remote address: [AF_IN
Fri Sep 25 22:23:54 2020 daemon.notice openvpn(raspbpivpnuk)[1796]: Socket Buffers: R=[196608->196608] S=[196608->196608]
Fri Sep 25 22:23:54 2020 daemon.notice openvpn(raspbpivpnuk)[1796]: UDP link local: (not bound)
Fri Sep 25 22:23:54 2020 daemon.notice openvpn(raspbpivpnuk)[1796]: UDP link remote: [AF_INET]aa.bb.cc.dd:1xxxx
Fri Sep 25 22:23:56 2020 daemon.info dnsmasq[1462]: read /etc/hosts - 4 addresses
Fri Sep 25 22:23:56 2020 daemon.info dnsmasq[1462]: read /tmp/hosts/odhcpd - 2 addresses
Fri Sep 25 22:23:56 2020 daemon.info dnsmasq[1462]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Fri Sep 25 22:24:54 2020 daemon.err openvpn(raspbpivpnuk)[1796]: TLS Error: TLS key negotiation failed to occur within 60 second
Fri Sep 25 22:24:54 2020 daemon.err openvpn(raspbpivpnuk)[1796]: TLS Error: TLS handshake failed
Fri Sep 25 22:24:54 2020 daemon.notice openvpn(raspbpivpnuk)[1796]: SIGUSR1[soft,tls-error] received, process restarting
Fri Sep 25 22:24:54 2020 daemon.notice openvpn(raspbpivpnuk)[1796]: Restart pause, 5 second(s)
Fri Sep 25 22:25:04 2020 daemon.err openvpn(raspbpivpnuk)[1796]: RESOLVE: Cannot resolve host address: myown.duckdns.org:1xxxx (Try again)
Fri Sep 25 22:25:09 2020 daemon.err openvpn(raspbpivpnuk)[1796]: RESOLVE: Cannot resolve host address: myown.duckdns.org:1xxxx (Try again)
Fri Sep 25 22:25:09 2020 daemon.warn openvpn(raspbpivpnuk)[1796]: Could not determine IPv4/IPv6 protocol
And this remained until the day after
Sat Sep 26 12:31:08 2020 daemon.info dnsmasq[1444]: read /etc/hosts - 4 addresses
Sat Sep 26 12:31:08 2020 daemon.info dnsmasq[1444]: read /tmp/hosts/odhcpd - 2 addresses
Sat Sep 26 12:31:08 2020 daemon.info dnsmasq[1444]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Sat Sep 26 12:34:54 2020 daemon.err openvpn(raspbpivpnloc1)[1775]: RESOLVE: Cannot resolve host address: myown.duckdns.org:1xxxx (Try again)
Sat Sep 26 12:34:59 2020 daemon.err openvpn(raspbpivpnloc1)[1775]: RESOLVE: Cannot resolve host address: myown.duckdns.org:1xxxx (Try again)
Sat Sep 26 12:34:59 2020 daemon.warn openvpn(raspbpivpnloc1)[1775]: Could not determine IPv4/IPv6 protocol
Sat Sep 26 12:34:59 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: SIGUSR1[soft,init_instance] received, process restarting
Sat Sep 26 12:34:59 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: Restart pause, 300 second(s)
Sat Sep 26 12:37:30 2020 daemon.info dnsmasq[1444]: read /etc/hosts - 4 addresses
Sat Sep 26 12:37:30 2020 daemon.info dnsmasq[1444]: read /tmp/hosts/odhcpd - 3 addresses
Sat Sep 26 12:37:30 2020 daemon.info dnsmasq[1444]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Sat Sep 26 12:40:04 2020 daemon.err openvpn(raspbpivpnloc1)[1775]: RESOLVE: Cannot resolve host address: myown.duckdns.org:1xxxx (Try again)
Sat Sep 26 12:40:09 2020 daemon.err openvpn(raspbpivpnloc1)[1775]: RESOLVE: Cannot resolve host address: myown.duckdns.org:1xxxx (Try again)
Sat Sep 26 12:40:09 2020 daemon.warn openvpn(raspbpivpnloc1)[1775]: Could not determine IPv4/IPv6 protocol
Sat Sep 26 12:40:09 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: SIGUSR1[soft,init_instance] received, process restarting
Sat Sep 26 12:40:09 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: Restart pause, 300 second(s)
Sat Sep 26 12:42:04 2020 daemon.info dnsmasq[1444]: read /etc/hosts - 4 addresses
Sat Sep 26 12:42:04 2020 daemon.info dnsmasq[1444]: read /tmp/hosts/odhcpd - 2 addresses
Sat Sep 26 12:42:04 2020 daemon.info dnsmasq[1444]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Sat Sep 26 12:45:14 2020 daemon.err openvpn(raspbpivpnloc1)[1775]: RESOLVE: Cannot resolve host address: myown.duckdns.org:1xxxx (Try again)
Sat Sep 26 12:45:19 2020 daemon.err openvpn(raspbpivpnloc1)[1775]: RESOLVE: Cannot resolve host address: myown.duckdns.org:1xxxx (Try again)
Sat Sep 26 12:45:19 2020 daemon.warn openvpn(raspbpivpnloc1)[1775]: Could not determine IPv4/IPv6 protocol
Sat Sep 26 12:45:19 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: SIGUSR1[soft,init_instance] received, process restarting
Sat Sep 26 12:45:19 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: Restart pause, 300 second(s)
Sat Sep 26 12:46:40 2020 daemon.info dnsmasq[1444]: read /etc/hosts - 4 addresses
Sat Sep 26 12:46:40 2020 daemon.info dnsmasq[1444]: read /tmp/hosts/odhcpd - 3 addresses
Sat Sep 26 12:46:40 2020 daemon.info dnsmasq[1444]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
And my thinking is, of course the route table is still pointing to tun0 and, of course, it cannot reach the DNS to resolve myown.duckdns.org.
To test that I enter the openwrt computer and do:
root@OpenWrt:~# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
^C
--- 1.1.1.1 ping statistics ---
4 packets transmitted, 0 packets received, 100% packet loss
root@OpenWrt:~# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
^C
--- 1.1.1.1 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss
of course...
and now let me check the route table:
oot@OpenWrt:~# route -n
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 tun0
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth0
10.8.0.0 0.0.0.0 255.255.255.0 U 0 0 0 tun0
aa.bb.cc.dd 192.168.1.254 255.255.255.255 UGH 0 0 0 eth0
128.0.0.0 10.8.0.1 128.0.0.0 UG 0 0 0 tun0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
Ok so let me remove the tun0 references, and at least the routing should be able to reach the internet from Location 2 in eth0 and connect:
ip route del 10.8.0.0/24 dev tun0 scope link src 10.8.0.2
ip route del 128.0.0.0/1 via 10.8.0.1 dev tun0
ip route del 0.0.0.0/1 via 10.8.0.1 dev tun0
Then I look into the System log of OpenWrt and I see it seems that has now connected ok after the next retry.
Sat Sep 26 13:05:58 2020 daemon.info dnsmasq[1444]: read /etc/hosts - 4 addresses
Sat Sep 26 13:05:58 2020 daemon.info dnsmasq[1444]: read /tmp/hosts/odhcpd - 3 addresses
Sat Sep 26 13:05:58 2020 daemon.info dnsmasq[1444]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Sat Sep 26 13:05:59 2020 daemon.err openvpn(raspbpivpnloc1)[1775]: RESOLVE: Cannot resolve host address: myown.duckdns.org:1xxxx (Try again)
Sat Sep 26 13:05:59 2020 daemon.warn openvpn(raspbpivpnloc1)[1775]: Could not determine IPv4/IPv6 protocol
Sat Sep 26 13:05:59 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: SIGUSR1[soft,init_instance] received, process restarting
Sat Sep 26 13:05:59 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: Restart pause, 300 second(s)
Sat Sep 26 13:10:59 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: TCP/UDP: Preserving recently used remote address: [AF_INET]ff.gg.hh.ii:1xxxx
Sat Sep 26 13:10:59 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: Socket Buffers: R=[196608->196608] S=[196608->196608]
Sat Sep 26 13:10:59 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: UDP link local: (not bound)
Sat Sep 26 13:10:59 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: UDP link remote: [AF_INET]ff.gg.hh.ii:1xxxx
Sat Sep 26 13:10:59 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: TLS: Initial packet from [AF_INET]ff.gg.hh.ii:1xxxx, sid=253836bd c25e24ee
Sat Sep 26 13:11:00 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: VERIFY OK: depth=1, CN=cn_luXyyBCGbysCERaz
Sat Sep 26 13:11:00 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: VERIFY KU OK
Sat Sep 26 13:11:00 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: Validating certificate extended key usage
Sat Sep 26 13:11:00 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Sat Sep 26 13:11:00 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: VERIFY EKU OK
Sat Sep 26 13:11:00 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: VERIFY X509NAME OK: CN=server_VvDpT3SPdeDdruUb
Sat Sep 26 13:11:00 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: VERIFY OK: depth=0, CN=server_VvDpT3SPdeDdruUb
Sat Sep 26 13:11:01 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: Control Channel: TLSv1.2, cipher TLSv1.2 DHE-RSA-AES128-GCM-SHA256, 3072 bit RSA
Sat Sep 26 13:11:01 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: [server_VvDpT3SPdeDdruUb] Peer Connection Initiated with [AF_INET]ff.gg.hh.ii:1xxxx
Sat Sep 26 13:11:02 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: SENT CONTROL [server_VvDpT3SPdeDdruUb]: 'PUSH_REQUEST' (status=1)
Sat Sep 26 13:11:02 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS 1.0.0.1,dhcp-option DNS 1.1.1.1,redirect-gateway def1 bypass-dhcp,route-gateway 10.8.0.1,topology subnet,ping 10,ping-restart 120,ifconfig 10.8.0.2 255.255.255.0'
Sat Sep 26 13:11:02 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: OPTIONS IMPORT: timers and/or timeouts modified
Sat Sep 26 13:11:02 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: OPTIONS IMPORT: --ifconfig/up options modified
Sat Sep 26 13:11:02 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: OPTIONS IMPORT: route options modified
Sat Sep 26 13:11:02 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: OPTIONS IMPORT: route-related options modified
Sat Sep 26 13:11:02 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Sat Sep 26 13:11:02 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: Outgoing Data Channel: Cipher 'AES-128-CBC' initialized with 128 bit key
Sat Sep 26 13:11:02 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: Outgoing Data Channel: Using 256 bit message hash 'SHA256' for HMAC authentication
Sat Sep 26 13:11:02 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: Incoming Data Channel: Cipher 'AES-128-CBC' initialized with 128 bit key
Sat Sep 26 13:11:02 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: Incoming Data Channel: Using 256 bit message hash 'SHA256' for HMAC authentication
Sat Sep 26 13:11:02 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: Preserving previous TUN/TAP instance: tun0
Sat Sep 26 13:11:02 2020 daemon.notice openvpn(raspbpivpnloc1)[1775]: Initialization Sequence Completed
Sat Sep 26 13:13:14 2020 daemon.info dnsmasq[1444]: read /etc/hosts - 4 addresses
Sat Sep 26 13:13:14 2020 daemon.info dnsmasq[1444]: read /tmp/hosts/odhcpd - 2 addresses
Sat Sep 26 13:13:14 2020 daemon.info dnsmasq[1444]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
but then I try:
root@OpenWrt:~# ping -I tun0 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
^C
--- 1.1.1.1 ping statistics ---
4 packets transmitted, 0 packets received, 100% packet loss
And nothing....🙁
Also a tried pinging the router at 192.168.1.254 from the Location 1 but nothing either 🙁
I decided to put the routes again just because it could be it for some odd reason:
ip route add 10.8.0.0/24 dev tun0 scope link src 10.8.0.2
ip route add 128.0.0.0/1 via 10.8.0.1 dev tun0
ip route add 0.0.0.0/1 via 10.8.0.1 dev tun0
But nothing happened, all the same, no connectivity thru tun0 🙁
Then I just restarted the "Old computer running OpenWrt with OpenVPN client running"
All now is fine:
oot@OpenWrt:~# ping -I tun0 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: seq=0 ttl=56 time=43.998 ms
^C
--- 1.1.1.1 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 43.998/43.998/43.998 ms
root@OpenWrt:~# ping -I tun0 192.168.1.254
PING 192.168.1.254 (192.168.1.254): 56 data bytes
64 bytes from 192.168.1.254: seq=0 ttl=63 time=38.570 ms
^C
--- 192.168.1.254 ping statistics ---
2 packets transmitted, 1 packets received, 50% packet loss
round-trip min/avg/max = 38.570/38.570/38.570 ms
root@OpenWrt:~# route -n
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 tun0
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 eth0
10.8.0.0 0.0.0.0 255.255.255.0 U 0 0 0 tun0
ff.gg.hh.ii 192.168.1.254 255.255.255.255 UGH 0 0 0 eth0
128.0.0.0 10.8.0.1 128.0.0.0 UG 0 0 0 tun0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
root@OpenWrt:~# ip route
0.0.0.0/1 via 10.8.0.1 dev tun0
default via 192.168.1.254 dev eth0
10.8.0.0/24 dev tun0 scope link src 10.8.0.2
ff.gg.hh.ii via 192.168.1.254 dev eth0
128.0.0.0/1 via 10.8.0.1 dev tun0
192.168.1.0/24 dev eth0 scope link src 192.168.1.1
192.168.2.0/24 dev eth1 scope link src 192.168.2.1
But here I noticed that the old external IP from Location 1 aa.bb.cc.dd that I had before the reboot, now is ff.gg.hh.ii
Maybe that was the route that was missing for me before the reboot? Not sure...
In the System Log from OpenWrt I see:
Sat Sep 26 13:25:26 2020 daemon.warn openvpn(raspbpivpnloc1)[1776]: Unrecognized option or missing or extra parameter(s) in /etc/openvpn/raspbpivpnloc1.ovpn:17: block-outside-dns (2.4.7)
Sat Sep 26 13:25:26 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: OpenVPN 2.4.7 i486-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
Sat Sep 26 13:25:26 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: library versions: OpenSSL 1.1.1g 21 Apr 2020, LZO 2.10
Sat Sep 26 13:25:26 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: Outgoing Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Sat Sep 26 13:25:26 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: Incoming Control Channel Authentication: Using 256 bit message hash 'SHA256' for HMAC authentication
Sat Sep 26 13:25:26 2020 daemon.info procd: - init complete -
Sat Sep 26 13:25:26 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: TCP/UDP: Preserving recently used remote address: [AF_INET]ff.gg.hh.ii:1xxxx
Sat Sep 26 13:25:26 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: Socket Buffers: R=[196608->196608] S=[196608->196608]
Sat Sep 26 13:25:26 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: UDP link local: (not bound)
Sat Sep 26 13:25:26 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: UDP link remote: [AF_INET]ff.gg.hh.ii:1xxxx
Sat Sep 26 13:25:27 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: TLS: Initial packet from [AF_INET]ff.gg.hh.ii:1xxxx, sid=5af1acb2 70d5f446
Sat Sep 26 13:25:27 2020 daemon.err odhcpd[1569]: Failed to send to ff02::1%lan@eth0 (Address not available)
Sat Sep 26 13:25:27 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: VERIFY OK: depth=1, CN=cn_luXyyBCGbysCERaz
Sat Sep 26 13:25:27 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: VERIFY KU OK
Sat Sep 26 13:25:27 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: Validating certificate extended key usage
Sat Sep 26 13:25:27 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Sat Sep 26 13:25:27 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: VERIFY EKU OK
Sat Sep 26 13:25:27 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: VERIFY X509NAME OK: CN=server_VvDpT3SPdeDdruUb
Sat Sep 26 13:25:27 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: VERIFY OK: depth=0, CN=server_VvDpT3SPdeDdruUb
Sat Sep 26 13:25:28 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: Control Channel: TLSv1.2, cipher TLSv1.2 DHE-RSA-AES128-GCM-SHA256, 3072 bit RSA
Sat Sep 26 13:25:28 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: [server_VvDpT3SPdeDdruUb] Peer Connection Initiated with [AF_INET]ff.gg.hh.ii:1xxxx
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: SENT CONTROL [server_VvDpT3SPdeDdruUb]: 'PUSH_REQUEST' (status=1)
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: PUSH: Received control message: 'PUSH_REPLY,dhcp-option DNS 1.0.0.1,dhcp-option DNS 1.1.1.1,redirect-gateway def1 bypass-dhcp,route-gateway 10.8.0.1,topology subnet,ping 10,ping-restart 120,ifconfig 10.8.0.2 255.255.255.0'
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: OPTIONS IMPORT: timers and/or timeouts modified
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: OPTIONS IMPORT: --ifconfig/up options modified
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: OPTIONS IMPORT: route options modified
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: OPTIONS IMPORT: route-related options modified
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: Outgoing Data Channel: Cipher 'AES-128-CBC' initialized with 128 bit key
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: Outgoing Data Channel: Using 256 bit message hash 'SHA256' for HMAC authentication
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: Incoming Data Channel: Cipher 'AES-128-CBC' initialized with 128 bit key
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: Incoming Data Channel: Using 256 bit message hash 'SHA256' for HMAC authentication
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: TUN/TAP device tun0 opened
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: TUN/TAP TX queue length set to 100
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: /sbin/ifconfig tun0 10.8.0.2 netmask 255.255.255.0 mtu 1500 broadcast 10.8.0.255
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: /sbin/route add -net ff.gg.hh.ii netmask 255.255.255.255 gw 192.168.1.254
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw 10.8.0.1
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw 10.8.0.1
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: Initialization Sequence Completed
Sat Sep 26 13:25:48 2020 authpriv.info dropbear[1920]: Child connection from 192.168.1.73:53022
Sat Sep 26 13:25:48 2020 authpriv.notice dropbear[1920]: Auth succeeded with blank password for 'root' from 192.168.1.73:53022
Sat Sep 26 13:29:26 2020 daemon.err uhttpd[1625]: luci: accepted login on /admin/status/syslog for root from 192.168.2.2
Here I notice particularly this:
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: /sbin/ifconfig tun0 10.8.0.2 netmask 255.255.255.0 mtu 1500 broadcast 10.8.0.255
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: /sbin/route add -net ff.gg.hh.ii netmask 255.255.255.255 gw 192.168.1.254
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: /sbin/route add -net 0.0.0.0 netmask 128.0.0.0 gw 10.8.0.1
Sat Sep 26 13:25:29 2020 daemon.notice openvpn(raspbpivpnloc1)[1776]: /sbin/route add -net 128.0.0.0 netmask 128.0.0.0 gw 10.8.0.1
And I see that, these 4 routes are being setup, instead of the 3 ones that I affected previously, this last one with
route add -net ff.gg.hh.ii netmask 255.255.255.255 gw 192.168.1.254
was maybe really missing for me, I need to test next time this happens
Is there any way to say to OpenVPN to automate this route update in the ovpn script, or to do some script that I can put in the up/down options in a separate script that can update this, avoiding the hassle of having to restart the computer every single time this happens?
My opvn script at the client is:
client
proto udp
remote myown.duckdns.org 1xxxx
dev tun
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
verify-x509-name server_VvDpT3SPdeDdruUb name
auth SHA256
auth-nocache
cipher AES-128-CBC
tls-client
tls-version-min 1.2
tls-cipher TLS-DHE-RSA-WITH-AES-128-GCM-SHA256
setenv opt block-outside-dns
verb 3
Thanks!!
Kind Regards