vpn-in-docker-compose icon indicating copy to clipboard operation
vpn-in-docker-compose copied to clipboard

Unable to access local network

Open declanshanaghy opened this issue 4 years ago • 1 comments

Hey, thanks so much for sharing this it helped me out soooo much. You should add one of those "Buy me a beer links" ;-P

I realize you probably didn't want to sign yourself up for IT support for any random person on github, 🤣 but would you mind sharing any pointers on something I'm doing wrong here? 🍻

My local network is not available within the network. I updated the LOCAL_IPS to my subnet which is 192.168.1.0/24 but that didn't fix it.

I was playing around and decided to add add a route to the local net just to see. When i did that I was able to ping the local IPs that the container is running on. But still can't reach anywhere else.

Here's the diff on my fork that Im running: https://github.com/nolar/vpn-in-docker-compose/compare/24427b10871037511e04c842203cdac9e50aecf7...declanshanaghy:b1469c390e86e9b9cf2338b1ed5d404eb63677dc

declanshanaghy avatar Feb 26 '21 19:02 declanshanaghy

Hello. Sorry for the late response — I somehow missed the notification email.

Can you please clarify what do you mean by "anywhere else"? The solution intentionally bans "anywhere else" going not via the tunnel interface in the iptables rules, and only allows local & special IPs here: https://github.com/nolar/vpn-in-docker-compose/blob/24427b10871037511e04c842203cdac9e50aecf7/generate-firewall.sh#L163-L166

Try playing with SPECIAL_IPS.

Or extend LOCAL_IPS to be something like LOCAL_IPS: "192.168.0.0/16 172.16.0.0/12 10.0.0.0/8" if you want incoming connections too.

A beer-link feature is now provided by GitHub as one-time donations ;-) https://github.com/sponsors/nolar?frequency=one-time

nolar avatar Apr 10 '21 16:04 nolar