multipath-tcp / mptcp

⚠️⚠️⚠️ Deprecated 🚫 Out-of-tree Linux Kernel implementation of MultiPath TCP. 👉 Use https://github.com/multipath-tcp/mptcp_net-next repo instead ⚠️⚠️⚠️
https://github.com/multipath-tcp/mptcp_net-next
Other
889 stars 335 forks source link

OpenVPN tunnel restart with every new interface connection. #466

Closed saurabh-benlycos closed 2 years ago

saurabh-benlycos commented 2 years ago

I have set up a device with MPTCP v0.95.1 and Openvpn v2.4.4 in ubuntu 18.04 (Kernel 4.19.126). Problem Statement: Whenever I am connecting more than one interface with the device the tun0 is getting restarted. What did I do wrong? How can I resolve this? Below is my Syslog.

Mar  8 17:52:03 xyz systemd[1]: Starting resolvconf-pull-resolved.service...
Mar  8 17:52:03 xyz systemd[1]: Started resolvconf-pull-resolved.service.
Mar  8 17:52:03 xyz systemd[1]: Stopping OpenVPN connection to test99...
Mar  8 17:52:03 xyz ovpn-test99[28181]: event_wait : Interrupted system call (code=4)
Mar  8 17:52:03 xyz ovpn-test99[28181]: /sbin/ip route del 15.207.248.149/32
Mar  8 17:52:03 xyz ovpn-test99[28181]: /sbin/ip route del 0.0.0.0/1
Mar  8 17:52:03 xyz ovpn-test99[28181]: /sbin/ip route del 128.0.0.0/1
Mar  8 17:52:03 xyz ovpn-test99[28181]: /etc/openvpn/update-systemd-resolved tun0 1500 1554 10.8.0.3 255.255.255.0 init
Mar  8 17:52:03 xyz update-systemd-resolved: Link 'tun0' going down
Mar  8 17:52:03 xyz openvpn[28181]: <14>Mar  8 17:52:03 update-systemd-resolved: Link 'tun0' going down
Mar  8 17:52:03 xyz ovpn-test99[28181]: Closing TUN/TAP interface
Mar  8 17:52:03 xyz ovpn-test99[28181]: /sbin/ip addr del dev tun0 10.8.0.3/24
Mar  8 17:52:03 xyz systemd-networkd[622]: tun0: Link DOWN
Mar  8 17:52:03 xyz systemd-networkd[622]: tun0: Lost carrier
Mar  8 17:52:03 xyz systemd[1]: Stopping ifup for tun0...
Mar  8 17:52:03 xyz systemd[1]: Starting resolvconf-pull-resolved.service...
Mar  8 17:52:03 xyz ovpn-test99[28181]: SIGTERM[hard,] received, process exiting
Mar  8 17:52:03 xyz systemd[1]: Started resolvconf-pull-resolved.service.
Mar  8 17:52:03 xyz systemd[1]: Stopped OpenVPN connection to test99.
Mar  8 17:52:03 xyz root: interface : tun0 vpn down
Mar  8 17:52:03 xyz systemd[1]: Starting OpenVPN connection to test99...
Mar  8 17:52:03 xyz systemd[1]: Stopped ifup for tun0.
Mar  8 17:52:03 xyz ovpn-test99[24215]: Unrecognized option or missing or extra parameter(s) in /etc/openvpn/test99.conf:16: block-outside-dns (2.4.4)
Mar  8 17:52:03 xyz ovpn-test99[24215]: OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 14 2019
Mar  8 17:52:03 xyz systemd[1]: Started OpenVPN connection to test99.
Mar  8 17:52:03 xyz ovpn-test99[24215]: library versions: OpenSSL 1.1.1  11 Sep 2018, LZO 2.08
Mar  8 17:52:03 xyz ovpn-test99[24215]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Mar  8 17:52:03 xyz ovpn-test99[24215]: ******* WARNING *******: '--auth none' was specified. This means no authentication will be performed on received packets, meaning you CANNOT trust that the data received by the remote side have NOT been manipulated. PLEASE DO RECONSIDER THIS SETTING!
Mar  8 17:52:03 xyz ovpn-test99[24215]: Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Mar  8 17:52:03 xyz ovpn-test99[24215]: Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Mar  8 17:52:03 xyz ovpn-test99[24215]: Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Mar  8 17:52:03 xyz ovpn-test99[24215]: Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Mar  8 17:52:03 xyz ovpn-test99[24215]: TCP/UDP: Preserving recently used remote address: [AF_INET]15.207.248.149:1194
Mar  8 17:52:03 xyz ovpn-test99[24215]: Socket Buffers: R=[87380->87380] S=[16384->16384]
Mar  8 17:52:03 xyz ovpn-test99[24215]: Attempting to establish TCP connection with [AF_INET]15.207.248.149:1194 [nonblock]

Mar  8 17:52:04 xyz ovpn-test99[24215]: TCP connection established with [AF_INET]15.207.248.149:1194
Mar  8 17:52:04 xyz ovpn-test99[24215]: TCP_CLIENT link local: (not bound)
Mar  8 17:52:04 xyz ovpn-test99[24215]: TCP_CLIENT link remote: [AF_INET]15.207.248.149:1194
Mar  8 17:52:04 xyz ovpn-test99[24215]: TLS: Initial packet from [AF_INET]15.207.248.149:1194, sid=4c0ec41d 827753a5

Mar  8 17:52:04 xyz ovpn-test99[24215]: VERIFY OK: depth=1, CN=ChangeMe
Mar  8 17:52:04 xyz ovpn-test99[24215]: VERIFY KU OK
Mar  8 17:52:04 xyz ovpn-test99[24215]: Validating certificate extended key usage
Mar  8 17:52:04 xyz ovpn-test99[24215]: ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Mar  8 17:52:04 xyz ovpn-test99[24215]: VERIFY EKU OK
Mar  8 17:52:04 xyz ovpn-test99[24215]: VERIFY OK: depth=0, CN=server
Mar  8 17:52:04 xyz ovpn-test99[24215]: WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1539', remote='link-mtu 1507'
Mar  8 17:52:04 xyz ovpn-test99[24215]: WARNING: 'cipher' is used inconsistently, local='cipher AES-256-CBC', remote='cipher [null-cipher]'
Mar  8 17:52:04 xyz ovpn-test99[24215]: WARNING: 'keysize' is used inconsistently, local='keysize 256', remote='keysize 0'
Mar  8 17:52:04 xyz ovpn-test99[24215]: Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, 2048 bit RSA
Mar  8 17:52:04 xyz ovpn-test99[24215]: [server] Peer Connection Initiated with [AF_INET]15.207.248.149:1194

Mar  8 17:52:05 xyz ovpn-test99[24215]: SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)

Mar  8 17:52:05 xyz ovpn-test99[24215]: PUSH: Received control message: 'PUSH_REPLY,redirect-gateway def1 bypass-dhcp,dhcp-option DNS 8.8.8.8,dhcp-option DNS 8.8.4.4,route-gateway 10.8.0.1,topology subnet,ping 10,ping-restart 120,ifconfig 10.8.0.3 255.255.255.0,peer-id 0,cipher AES-256-GCM'
Mar  8 17:52:05 xyz ovpn-test99[24215]: OPTIONS IMPORT: timers and/or timeouts modified
Mar  8 17:52:05 xyz ovpn-test99[24215]: OPTIONS IMPORT: --ifconfig/up options modified
Mar  8 17:52:05 xyz ovpn-test99[24215]: OPTIONS IMPORT: route options modified
Mar  8 17:52:05 xyz ovpn-test99[24215]: OPTIONS IMPORT: route-related options modified
Mar  8 17:52:05 xyz ovpn-test99[24215]: OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Mar  8 17:52:05 xyz ovpn-test99[24215]: OPTIONS IMPORT: peer-id set
Mar  8 17:52:05 xyz ovpn-test99[24215]: OPTIONS IMPORT: adjusting link_mtu to 1626
Mar  8 17:52:05 xyz ovpn-test99[24215]: OPTIONS IMPORT: data channel crypto options modified
Mar  8 17:52:05 xyz ovpn-test99[24215]: Data Channel: using negotiated cipher 'AES-256-GCM'
Mar  8 17:52:05 xyz ovpn-test99[24215]: Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Mar  8 17:52:05 xyz ovpn-test99[24215]: Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Mar  8 17:52:05 xyz ovpn-test99[24215]: ROUTE_GATEWAY 192.168.8.1/255.255.255.0 IFACE=lan0 HWADDR=0c:5b:8f:27:9a:64
Mar  8 17:52:05 xyz ovpn-test99[24215]: TUN/TAP device tun0 opened
Mar  8 17:52:05 xyz ovpn-test99[24215]: TUN/TAP TX queue length set to 100
Mar  8 17:52:05 xyz ovpn-test99[24215]: do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Mar  8 17:52:05 xyz ovpn-test99[24215]: /sbin/ip link set dev tun0 up mtu 1500
Mar  8 17:52:05 xyz systemd-networkd[622]: tun0: Link UP
Mar  8 17:52:05 xyz systemd-networkd[622]: tun0: Gained carrier
Mar  8 17:52:05 xyz systemd-networkd[622]: tun0: Gained IPv6LL
Mar  8 17:52:05 xyz systemd-udevd[24301]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable.
Mar  8 17:52:05 xyz ovpn-test99[24215]: /sbin/ip addr add dev tun0 10.8.0.3/24 broadcast 10.8.0.255
Mar  8 17:52:05 xyz networkd-dispatcher[710]: WARNING:Unknown index 38 seen, reloading interface list
Mar  8 17:52:05 xyz ovpn-test99[24215]: /etc/openvpn/update-systemd-resolved tun0 1500 1554 10.8.0.3 255.255.255.0 init
Mar  8 17:52:05 xyz update-systemd-resolved: Link 'tun0' coming up
Mar  8 17:52:05 xyz openvpn[24215]: <14>Mar  8 17:52:05 update-systemd-resolved: Link 'tun0' coming up
Mar  8 17:52:05 xyz update-systemd-resolved: Adding DNS Routed Domain .
Mar  8 17:52:05 xyz openvpn[24215]: <14>Mar  8 17:52:05 update-systemd-resolved: Adding DNS Routed Domain .
Mar  8 17:52:05 xyz update-systemd-resolved: Adding IPv4 DNS Server 8.8.8.8
Mar  8 17:52:05 xyz openvpn[24215]: <14>Mar  8 17:52:05 update-systemd-resolved: Adding IPv4 DNS Server 8.8.8.8
Mar  8 17:52:05 xyz update-systemd-resolved: Adding IPv4 DNS Server 8.8.4.4
Mar  8 17:52:05 xyz openvpn[24215]: <14>Mar  8 17:52:05 update-systemd-resolved: Adding IPv4 DNS Server 8.8.4.4
Mar  8 17:52:05 xyz update-systemd-resolved: SetLinkDNS(38 2 2 4 8 8 8 8 2 4 8 8 4 4)
Mar  8 17:52:05 xyz openvpn[24215]: <14>Mar  8 17:52:05 update-systemd-resolved: SetLinkDNS(38 2 2 4 8 8 8 8 2 4 8 8 4 4)
Mar  8 17:52:05 xyz systemd[1]: resolvconf-pull-resolved.service: Start request repeated too quickly.
Mar  8 17:52:05 xyz systemd[1]: resolvconf-pull-resolved.service: Failed with result 'start-limit-hit'.
Mar  8 17:52:05 xyz systemd[1]: Failed to start resolvconf-pull-resolved.service.
Mar  8 17:52:05 xyz systemd[1]: resolvconf-pull-resolved.service: Start request repeated too quickly.
Mar  8 17:52:05 xyz systemd[1]: resolvconf-pull-resolved.service: Failed with result 'start-limit-hit'.
Mar  8 17:52:05 xyz systemd[1]: Failed to start resolvconf-pull-resolved.service.
Mar  8 17:52:05 xyz update-systemd-resolved: SetLinkDomains(38 1 . true)
Mar  8 17:52:05 xyz openvpn[24215]: <14>Mar  8 17:52:05 update-systemd-resolved: SetLinkDomains(38 1 . true)
Mar  8 17:52:05 xyz systemd[1]: resolvconf-pull-resolved.service: Start request repeated too quickly.
Mar  8 17:52:05 xyz systemd[1]: resolvconf-pull-resolved.service: Failed with result 'start-limit-hit'.
Mar  8 17:52:05 xyz systemd[1]: Failed to start resolvconf-pull-resolved.service.
Mar  8 17:52:05 xyz ovpn-test99[24215]: /sbin/ip route add 15.207.248.149/32 via 192.168.8.1
Mar  8 17:52:05 xyz ovpn-test99[24215]: /sbin/ip route add 0.0.0.0/1 via 10.8.0.1
Mar  8 17:52:05 xyz ovpn-test99[24215]: /sbin/ip route add 128.0.0.0/1 via 10.8.0.1
Mar  8 17:52:05 xyz ovpn-test99[24215]: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Mar  8 17:52:05 xyz ovpn-test99[24215]: Initialization Sequence Completed
Mar  8 17:52:05 xyz systemd[1]: Found device /sys/subsystem/net/devices/tun0.
Mar  8 17:52:05 xyz systemd[1]: Started ifup for tun0.
Mar  8 17:52:05 xyz systemd[1]: resolvconf-pull-resolved.service: Start request repeated too quickly.
Mar  8 17:52:05 xyz systemd[1]: resolvconf-pull-resolved.service: Failed with result 'start-limit-hit'.
Mar  8 17:52:05 xyz systemd[1]: Failed to start resolvconf-pull-resolved.service.
Mar  8 17:52:06 xyz systemd[1]: Reloading OpenBSD Secure Shell server.
Mar  8 17:52:06 xyz root: interface : tun0 vpn up
Mar  8 17:52:06 xyz systemd[1]: Reloaded OpenBSD Secure Shell server.
Mar  8 17:52:06 xyz sh[24331]: net.ipv4.ip_forward = 1
Mar  8 17:52:06 xyz sh[24331]: net.ipv4.tcp_congestion_control = olia
Mar  8 17:52:06 xyz sh[24331]: net.mptcp.mptcp_checksum = 0
Mar  8 17:52:06 xyz sh[24331]: net.mptcp.mptcp_debug = 0
Mar  8 17:52:06 xyz sh[24331]: net.mptcp.mptcp_enabled = 1
Mar  8 17:52:06 xyz sh[24331]: net.mptcp.mptcp_path_manager = fullmesh
Mar  8 17:52:06 xyz sh[24331]: net.mptcp.mptcp_scheduler = default
Mar  8 17:52:06 xyz sh[24331]: net.mptcp.mptcp_syn_retries = 3
Mar  8 17:52:06 xyz sh[24331]: 1
Mar  8 17:52:06 xyz sh[24331]: 1
matttbe commented 2 years ago

Hi

Probably best to report this to OpenVPN users/devs ML.

Indeed, I don't think you will get any support about that here because I'm not sure to find the link with the MPTCP kernel. I'm then going to close this ticket but if you see the link, please re-open it.