OpenVPN Tap Bridge Crashes ASUS RT-AX86U Router
Posted: Sat May 27, 2023 9:44 am
Hello,
I hope somebody can help here. Thank you in advance! I have also reached out to ASUS support (useless) as well as the asuswrt-merlin project (they're trying but I don't think they really understand the issue).
For several years, I have successfully run an Ethernet Bridge over OpenVPN between two locations -- one in Boston, USA and the other in Madrid, Spain. I need the Layer 2 broadcast support, which is why I have this set up. My router in Boston is the RT-AC86U currently running OpenVPN 2.6.0 with ASUSWRT-MERLIN FW 386.10, and my router in Madrid is the RT-AC68U running OpenVPN 2.6.3 with ASUSWRT-MERLIN FW 386.11.
I am trying to update my Madrid router to the much newer and more powerful ASUS RT-AX86U PRO but the same configuration that works on the older RT-AC68U crashes the RT-AX86U PRO. I get a kernel panic just after the tap device is opened and the OpenVPN initialization is completed. For what it's worth, in the RT-AX86U PRO vpn web interface, just after the OpenVPN client has started there is a warning saying VPN failed and "routing conflict".
The way I have my VPN set up, both sides are on the same subnet -- 192.168.15.x 255.255.255.0. DHCP servers on each side give out addresses -- on the Boston side from 100-179 and on the Madrid side from 180-254. I have a script running that, via edtables, blocks each side from seeing the other side's DHCP server, and with the working setup Nmap confirms that the ports are blocked correctly.
I don't understand why the Bridge CLIENT configuration works with the old router and not with the new one. With the new router, I have the exact same issue whether I run the stock ASUS FW (which has OpenVPN 2.4.12), or whether I upgrade it to the ASUSWRT-MERLIN FW (which has OpenVPN 2.6.3). Several times, by tailing the syslog over SSH, I have captured part of the kernel panic -- but never the whole dump. This is what it looks like with the stock ASUS FW:
May 27 03:52:33 vpnclient5[8521]: OpenVPN 2.4.12 arm-buildroot-linux-gnueabi [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Oct 12 2022
May 27 03:52:33 vpnclient5[8521]: library versions: OpenSSL 1.1.1n 15 Mar 2022, LZO 2.10
May 27 03:52:33 vpnclient5[8522]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
May 27 03:52:33 vpnclient5[8522]: TCP/UDP: Preserving recently used remote address: [AF_INET](My remote IP address -- replace by text for security):1194
May 27 03:52:33 vpnclient5[8522]: Socket Buffers: R=[524288->524288] S=[524288->524288]
May 27 03:52:33 vpnclient5[8522]: UDP link local: (not bound)
May 27 03:52:33 vpnclient5[8522]: UDP link remote: [AF_INET](My remote IP address -- replace by text for security):1194
May 27 03:52:33 vpnclient5[8522]: TLS: Initial packet from [AF_INET](My remote IP address -- replace by text for security):1194, sid=141f2619 fa8bcb51
May 27 03:52:33 vpnclient5[8522]: VERIFY OK: depth=1, C=TW, ST=TW, L=Taipei, O=ASUS, CN=RT-AC86U, emailAddress=me@myhost.mydomain
May 27 03:52:33 vpnclient5[8522]: VERIFY KU OK
May 27 03:52:33 vpnclient5[8522]: Validating certificate extended key usage
May 27 03:52:33 vpnclient5[8522]: ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
May 27 03:52:33 vpnclient5[8522]: VERIFY EKU OK
May 27 03:52:33 vpnclient5[8522]: VERIFY OK: depth=0, C=TW, ST=TW, L=Taipei, O=ASUS, CN=RT-AC86U, emailAddress=me@myhost.mydomain
May 27 03:52:34 vpnclient5[8522]: WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1586', remote='link-mtu 1602'
May 27 03:52:34 vpnclient5[8522]: WARNING: 'tun-mtu' is used inconsistently, local='tun-mtu 1532', remote='tun-mtu 1500'
May 27 03:52:34 vpnclient5[8522]: WARNING: 'cipher' is used inconsistently, local='cipher BF-CBC', remote='cipher AES-128-CBC'
May 27 03:52:34 vpnclient5[8522]: Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, 1024 bit RSA
May 27 03:52:34 vpnclient5[8522]: [RT-AC86U] Peer Connection Initiated with [AF_INET](My remote IP address -- deleted for privacy):1194
May 27 03:52:35 vpnclient5[8522]: SENT CONTROL [RT-AC86U]: 'PUSH_REQUEST' (status=1)
May 27 03:52:35 vpnclient5[8522]: PUSH: Received control message: 'PUSH_REPLY,route 0.0.0.0 255.255.255.255 net_gateway,route-gateway dhcp,ping 15,ping-restart 60,peer-id 0,cipher AES-256-GCM'
May 27 03:52:35 vpnclient5[8522]: OPTIONS IMPORT: timers and/or timeouts modified
May 27 03:52:35 vpnclient5[8522]: OPTIONS IMPORT: route options modified
May 27 03:52:35 vpnclient5[8522]: OPTIONS IMPORT: route-related options modified
May 27 03:52:35 vpnclient5[8522]: OPTIONS IMPORT: peer-id set
May 27 03:52:35 vpnclient5[8522]: OPTIONS IMPORT: adjusting link_mtu to 1657
May 27 03:52:35 vpnclient5[8522]: OPTIONS IMPORT: data channel crypto options modified
May 27 03:52:35 vpnclient5[8522]: Data Channel: using negotiated cipher 'AES-256-GCM'
May 27 03:52:35 vpnclient5[8522]: Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
May 27 03:52:35 vpnclient5[8522]: Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
May 27 03:52:35 vpnclient5[8522]: TUN/TAP device tap15 opened
May 27 03:52:35 vpnclient5[8522]: TUN/TAP TX queue length set to 100
May 27 03:52:35 vpnclient5[8522]: /etc/openvpn/ovpnc-up 5 tap15 1500 1585 init
May 27 03:52:35 vpnclient5: WARNING: Replace default vpn gateway by using 0.0.0.0/1 and 128.0.0.0/1
May 27 03:52:35 vpnclient5[8522]: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
May 27 03:52:35 vpnclient5[8522]: Initialization Sequence Completed
May 27 03:52:47 kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000000000002b8
May 27 03:52:47 kernel: Mem abort info:
May 27 03:52:47 kernel: ESR = 0x96000007
May 27 03:52:47 kernel: Exception class = DABT (current EL), IL = 32 bits
May 27 03:52:47 kernel: SET = 0, FnV = 0
May 27 03:52:47 kernel: EA = 0, S1PTW = 0
May 27 03:52:47 kernel: Data abort info:
May 27 03:52:47 kernel: ISV = 0, ISS = 0x00000007
May 27 03:52:47 kernel: CM = 0, WnR = 0
May 27 03:52:47 kernel: user pgtable: 4k pages, 39-bit VAs, pgdp = 000000000963c35a
May 27 03:52:47 kernel: [00000000000002b8] pgd=000000003390f003, pud=000000003390f003, pmd=000000002171a003, pte=0000000000000000
The ovpn client configuration file was generated by my router in Boston. For the sake of this post, I have removed the certificates and any private information. Is there anything wrong with the configuration?
# Config generated by Asuswrt-Merlin 386.10, requires OpenVPN 2.4.0 or newer.client
dev tap
# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel
# if you have more than one.
;dev-node MyTap
proto udp
remote (My remote DYNDNS Host Name, deleted for privacy) 1194
resolv-retry infinite
nobind
float
ncp-ciphers AES-256-GCM:AES-128-GCM:AES-256-CBC:AES-128-CBC
auth SHA256
comp-lzo adaptive
keepalive 15 60
remote-cert-tls server
Do you have any ideas what might be causing the kernel panic and how to solve it?
Thank you for reading this and helping! (And sorry if I didn't format this post correctly. I tried to use the oconf= option but it the preview it didn't seem to work)
Andy
I hope somebody can help here. Thank you in advance! I have also reached out to ASUS support (useless) as well as the asuswrt-merlin project (they're trying but I don't think they really understand the issue).
For several years, I have successfully run an Ethernet Bridge over OpenVPN between two locations -- one in Boston, USA and the other in Madrid, Spain. I need the Layer 2 broadcast support, which is why I have this set up. My router in Boston is the RT-AC86U currently running OpenVPN 2.6.0 with ASUSWRT-MERLIN FW 386.10, and my router in Madrid is the RT-AC68U running OpenVPN 2.6.3 with ASUSWRT-MERLIN FW 386.11.
I am trying to update my Madrid router to the much newer and more powerful ASUS RT-AX86U PRO but the same configuration that works on the older RT-AC68U crashes the RT-AX86U PRO. I get a kernel panic just after the tap device is opened and the OpenVPN initialization is completed. For what it's worth, in the RT-AX86U PRO vpn web interface, just after the OpenVPN client has started there is a warning saying VPN failed and "routing conflict".
The way I have my VPN set up, both sides are on the same subnet -- 192.168.15.x 255.255.255.0. DHCP servers on each side give out addresses -- on the Boston side from 100-179 and on the Madrid side from 180-254. I have a script running that, via edtables, blocks each side from seeing the other side's DHCP server, and with the working setup Nmap confirms that the ports are blocked correctly.
I don't understand why the Bridge CLIENT configuration works with the old router and not with the new one. With the new router, I have the exact same issue whether I run the stock ASUS FW (which has OpenVPN 2.4.12), or whether I upgrade it to the ASUSWRT-MERLIN FW (which has OpenVPN 2.6.3). Several times, by tailing the syslog over SSH, I have captured part of the kernel panic -- but never the whole dump. This is what it looks like with the stock ASUS FW:
May 27 03:52:33 vpnclient5[8521]: OpenVPN 2.4.12 arm-buildroot-linux-gnueabi [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Oct 12 2022
May 27 03:52:33 vpnclient5[8521]: library versions: OpenSSL 1.1.1n 15 Mar 2022, LZO 2.10
May 27 03:52:33 vpnclient5[8522]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
May 27 03:52:33 vpnclient5[8522]: TCP/UDP: Preserving recently used remote address: [AF_INET](My remote IP address -- replace by text for security):1194
May 27 03:52:33 vpnclient5[8522]: Socket Buffers: R=[524288->524288] S=[524288->524288]
May 27 03:52:33 vpnclient5[8522]: UDP link local: (not bound)
May 27 03:52:33 vpnclient5[8522]: UDP link remote: [AF_INET](My remote IP address -- replace by text for security):1194
May 27 03:52:33 vpnclient5[8522]: TLS: Initial packet from [AF_INET](My remote IP address -- replace by text for security):1194, sid=141f2619 fa8bcb51
May 27 03:52:33 vpnclient5[8522]: VERIFY OK: depth=1, C=TW, ST=TW, L=Taipei, O=ASUS, CN=RT-AC86U, emailAddress=me@myhost.mydomain
May 27 03:52:33 vpnclient5[8522]: VERIFY KU OK
May 27 03:52:33 vpnclient5[8522]: Validating certificate extended key usage
May 27 03:52:33 vpnclient5[8522]: ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
May 27 03:52:33 vpnclient5[8522]: VERIFY EKU OK
May 27 03:52:33 vpnclient5[8522]: VERIFY OK: depth=0, C=TW, ST=TW, L=Taipei, O=ASUS, CN=RT-AC86U, emailAddress=me@myhost.mydomain
May 27 03:52:34 vpnclient5[8522]: WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1586', remote='link-mtu 1602'
May 27 03:52:34 vpnclient5[8522]: WARNING: 'tun-mtu' is used inconsistently, local='tun-mtu 1532', remote='tun-mtu 1500'
May 27 03:52:34 vpnclient5[8522]: WARNING: 'cipher' is used inconsistently, local='cipher BF-CBC', remote='cipher AES-128-CBC'
May 27 03:52:34 vpnclient5[8522]: Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, 1024 bit RSA
May 27 03:52:34 vpnclient5[8522]: [RT-AC86U] Peer Connection Initiated with [AF_INET](My remote IP address -- deleted for privacy):1194
May 27 03:52:35 vpnclient5[8522]: SENT CONTROL [RT-AC86U]: 'PUSH_REQUEST' (status=1)
May 27 03:52:35 vpnclient5[8522]: PUSH: Received control message: 'PUSH_REPLY,route 0.0.0.0 255.255.255.255 net_gateway,route-gateway dhcp,ping 15,ping-restart 60,peer-id 0,cipher AES-256-GCM'
May 27 03:52:35 vpnclient5[8522]: OPTIONS IMPORT: timers and/or timeouts modified
May 27 03:52:35 vpnclient5[8522]: OPTIONS IMPORT: route options modified
May 27 03:52:35 vpnclient5[8522]: OPTIONS IMPORT: route-related options modified
May 27 03:52:35 vpnclient5[8522]: OPTIONS IMPORT: peer-id set
May 27 03:52:35 vpnclient5[8522]: OPTIONS IMPORT: adjusting link_mtu to 1657
May 27 03:52:35 vpnclient5[8522]: OPTIONS IMPORT: data channel crypto options modified
May 27 03:52:35 vpnclient5[8522]: Data Channel: using negotiated cipher 'AES-256-GCM'
May 27 03:52:35 vpnclient5[8522]: Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
May 27 03:52:35 vpnclient5[8522]: Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
May 27 03:52:35 vpnclient5[8522]: TUN/TAP device tap15 opened
May 27 03:52:35 vpnclient5[8522]: TUN/TAP TX queue length set to 100
May 27 03:52:35 vpnclient5[8522]: /etc/openvpn/ovpnc-up 5 tap15 1500 1585 init
May 27 03:52:35 vpnclient5: WARNING: Replace default vpn gateway by using 0.0.0.0/1 and 128.0.0.0/1
May 27 03:52:35 vpnclient5[8522]: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
May 27 03:52:35 vpnclient5[8522]: Initialization Sequence Completed
May 27 03:52:47 kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000000000002b8
May 27 03:52:47 kernel: Mem abort info:
May 27 03:52:47 kernel: ESR = 0x96000007
May 27 03:52:47 kernel: Exception class = DABT (current EL), IL = 32 bits
May 27 03:52:47 kernel: SET = 0, FnV = 0
May 27 03:52:47 kernel: EA = 0, S1PTW = 0
May 27 03:52:47 kernel: Data abort info:
May 27 03:52:47 kernel: ISV = 0, ISS = 0x00000007
May 27 03:52:47 kernel: CM = 0, WnR = 0
May 27 03:52:47 kernel: user pgtable: 4k pages, 39-bit VAs, pgdp = 000000000963c35a
May 27 03:52:47 kernel: [00000000000002b8] pgd=000000003390f003, pud=000000003390f003, pmd=000000002171a003, pte=0000000000000000
The ovpn client configuration file was generated by my router in Boston. For the sake of this post, I have removed the certificates and any private information. Is there anything wrong with the configuration?
# Config generated by Asuswrt-Merlin 386.10, requires OpenVPN 2.4.0 or newer.client
dev tap
# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel
# if you have more than one.
;dev-node MyTap
proto udp
remote (My remote DYNDNS Host Name, deleted for privacy) 1194
resolv-retry infinite
nobind
float
ncp-ciphers AES-256-GCM:AES-128-GCM:AES-256-CBC:AES-128-CBC
auth SHA256
comp-lzo adaptive
keepalive 15 60
remote-cert-tls server
Do you have any ideas what might be causing the kernel panic and how to solve it?
Thank you for reading this and helping! (And sorry if I didn't format this post correctly. I tried to use the oconf= option but it the preview it didn't seem to work)
Andy