Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple openvpn interfaces restart badly #37

Open
532910 opened this issue Oct 21, 2024 · 0 comments
Open

multiple openvpn interfaces restart badly #37

532910 opened this issue Oct 21, 2024 · 0 comments

Comments

@532910
Copy link

532910 commented Oct 21, 2024

Steps to reproduce:

  1. configure multiple openvpn servers
  2. service openvpn restart

Expected result: reconfigured network for each openvpn interface brought up
Actually, the expected result is achieved in less than about 10% of tries. In other 90% only one of interfaces get configured fully.

good run:

daemon.notice netifd: Network device 'mTunUdp' link is down
daemon.notice netifd: Interface 'm_tun_udp' has link connectivity loss
daemon.notice netifd: Interface 'm_tun_udp' is now down
daemon.err netifd[1006]: interface_queue_event(124): Queue hotplug handler for interface 'm_tun_udp', event 'ifdown'
daemon.err netifd[1006]: call_hotplug(100): Call hotplug handler for interface 'm_tun_udp', event 'ifdown' (none)
daemon.err netifd[1006]: device_remove_user(1113): Remove user for device 'mTunUdp', refcount=1
daemon.err netifd[1006]: device_set_present(951): Network device 'mTunUdp' is no longer present
daemon.err netifd[1006]: interface_set_available(487): Interface 'm_tun_udp', available=0
daemon.err netifd[1006]: device_release(731): Release Network device mTunUdp, new active count: 0
daemon.notice netifd: Interface 'm_tun_udp' is disabled
daemon.err netifd[1006]: device_set_present(951): Network device 'mTunTcp' is no longer present
daemon.err netifd[1006]: interface_set_available(487): Interface 'm_tun_tcp', available=0
daemon.err netifd[1006]: interface_queue_event(124): Queue hotplug handler for interface 'm_tun_tcp', event 'ifdown'
daemon.notice netifd: Interface 'm_tun_tcp' is now down
daemon.err netifd[1006]: interface_queue_event(124): Queue hotplug handler for interface 'm_tun_tcp', event 'ifdown'
daemon.err netifd[1006]: device_release(731): Release Network device mTunTcp, new active count: 0
daemon.notice netifd: Interface 'm_tun_tcp' is disabled
daemon.err netifd[1006]: device_remove_user(1113): Remove user for device 'mTunTcp', refcount=1
daemon.err netifd[1006]: task_complete(109): Complete hotplug handler for interface 'm_tun_udp'
daemon.err netifd[1006]: call_hotplug(100): Call hotplug handler for interface 'm_tun_tcp', event 'ifdown' (none)
daemon.err netifd[1006]: device_set_present(951): Network device 'mTunTcp' is now present
daemon.err netifd[1006]: interface_set_available(487): Interface 'm_tun_tcp', available=1
daemon.err netifd[1006]: device_claim(694): Claim Network device mTunTcp, new active count: 1
daemon.notice netifd: Network device 'mTunTcp' link is down
daemon.err netifd[1006]: device_claim(714): claim Network device mTunTcp failed: -1
daemon.notice netifd: Interface 'm_tun_tcp' has link connectivity loss
daemon.err netifd[1006]: task_complete(109): Complete hotplug handler for interface 'm_tun_tcp'

ip rule shows:

...
3:      from all iif mTunUdp lookup ino
4:      from all iif mTunTcp lookup ino
...

bad run:

daemon.err netifd[1006]: device_set_present(951): Network device 'mTunUdp' is now present
daemon.err netifd[1006]: interface_set_available(487): Interface 'm_tun_udp', available=1
daemon.err netifd[1006]: device_claim(694): Claim Network device mTunUdp, new active count: 1
daemon.notice netifd: Interface 'm_tun_udp' is enabled
daemon.notice netifd: Network device 'mTunUdp' link is up
daemon.notice netifd: Interface 'm_tun_udp' has link connectivity
daemon.notice netifd: Interface 'm_tun_udp' is setting up now
daemon.err netifd[1006]: __device_add_user(1037): Add user for device 'mTunUdp', refcount=2
daemon.err netifd[1006]: interface_queue_event(124): Queue hotplug handler for interface 'm_tun_udp', event 'ifup'
daemon.notice netifd: Interface 'm_tun_udp' is now up
daemon.err netifd[1006]: call_hotplug(100): Call hotplug handler for interface 'm_tun_udp', event 'ifup' (mTunUdp)
daemon.notice netifd: Network device 'mTunTcp' link is up
daemon.notice netifd: Interface 'm_tun_tcp' has link connectivity
daemon.err netifd[1006]: task_complete(109): Complete hotplug handler for interface 'm_tun_udp'

as a result configured routes not get applied for mTunTcp

ip rule shows:

...
3:      from all iif mTunUdp lookup ino
...

I have this issue only restarting openvpn manually, after reboot all is configured correctly.

/etc/config/network:

config interface 'm_tun_tcp'
        option device 'mTunTcp'
        option proto 'none'
        option auto '1'

config interface 'm_tun_udp'
        option device 'mTunUdp'
        option proto 'none'
        option auto '1'

config rule
        option in 'm_tun_tcp'
        option lookup 'ino'

config rule
        option in 'm_tun_udp'
        option lookup 'ino'

/etc/config/openvpn:

config openvpn m_tun_tcp
	option enabled 1
	option config /etc/openvpn/server/m-tun-tcp.conf

config openvpn m_tun_udp
	option enabled 1
	option config /etc/openvpn/server/m-tun-udp.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant