jamesmcm / vopono

Run applications through VPN tunnels with temporary network namespaces
GNU General Public License v3.0
826 stars 44 forks source link

Reliable access to services in network namespace #211

Open SocietasCooperationis opened 1 year ago

SocietasCooperationis commented 1 year ago

I have several services running in network namespaces with vopono that need to be reached from outside the network namespace and on the LAN and other network interfaces. Since the IP addresses of the network namespaces constantly change (seems to be dependent on startup order which can be different between restarts or when services are manually restarted) simply forwarding connections from 192.168.X.X to 10.200.1.X is not a proper solution.

Could vopono add a feature to open ports so that they are accessible on all network interfaces or a couple command line arguments to specify what other interfaces beside 10.200.1.X to bind to?

jamesmcm commented 1 year ago

Hey,

Could you explain the issue a little more? It should already be available on all interfaces IIRC since it binds to the unspecified address - https://github.com/jamesmcm/basic_tcp_proxy/blob/master/src/lib.rs#L22-L25

But it'd be good to have a small example to replicate the issue.