slingamn/namespaced-openvpn

Manually reconnecting namespaced-openvpn while other namespaces remain active from sudo ip netns exec

Futureknows opened this issue · 1 comments

When I use Firejail to route sandboxed applications to the protected VPN namespace, I can manually restart namespaced-openvpn to reconnect the VPN without terminating any of the sandboxed applications. When applications are launched with the sudo ip netns exec protected sudo -u $USER -i argument, namespaced-openvpn fails to manually restart after the original instance disconnects with error code such as:

ERROR:root:Namespace protected already has adapters [b'in-ns1@if26', b'in-ns2@if26'], exiting.
Closing all the applications with their unique namespaces allows namespaced-openvpn to be manually restarted and connect normally. Is there a simple method to restart namespaced-openvpn without first closing all the child namespace processes?

Interesting. This doesn't reproduce on my system, so I don't know what those interfaces are or where they're coming from.

Can you figure out when they're getting created, and what they are exactly? (e.g., with ip link output from inside the namespace?)