wfg / docker-openvpn-client

OpenVPN client with killswitch and proxy servers; built on Alpine
MIT License
353 stars 107 forks source link

Implementing routes so that non-loopback hosts can connect to SOCKS/HTTP proxy #29

Closed wt4smith closed 2 years ago

wt4smith commented 3 years ago

Currently only the machine running the docker image can access the proxy. Few routes that I lifted from this post https://serverfault.com/a/660106 solve that enabling LAN / Internet access.

Let me know if you want a PR.

wfg commented 3 years ago

I use the proxy with a separate machine regularly. My VPN container runs on my server and I connect to it with my desktop. Does this not work for you?

wt4smith commented 3 years ago

It didn't. Opening other ports with netcat in the container didn't work either as long as openvpn was connected. Are you forwarding the proxy port using SSH? That would put it on lo interface.

wfg commented 3 years ago

No, I'm just using FoxyProxy in Firefox to connect directly to the proxy. The proxies listen on eth0 inside the container which I have mapped to the underlying host.

I can think of a couple things that could cause an issue like this:

  1. Are the proxy port(s) being published? https://github.com/wfg/docker-openvpn-client#http_proxy-and-socks_proxy
  2. Is the computer you're connecting from included in SUBNETS? https://github.com/wfg/docker-openvpn-client#subnets
wt4smith commented 3 years ago

Ah, the difference is in 2. This one is not possible for me as I need the proxy to be accessible form the Internet.

wfg commented 3 years ago

Does it work if the kill switch is off?