-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Connecting to services outside of the host machine #37
Comments
That's an interesting point. I don't think there is an easy way out for this except through by using On the other hand, you might be able to achieve what you want by exposing your plex server online (check out Caddy with Let's Encrypt https 👍) and telling your service to go talk to your Plex server at https://yourplexdomainname.com for example. |
so i managed to connect to to plex through my external IP address, thanks for the tip. would be interesting to look into the Iptable options as it is something else to learn. thanks for the help |
Be warned that accessing your Plex server through its public Ip address means the connection is unencrypted from your PIA VPN server Endpoint to your IP address. That's why https comes into play to encrypt the connection. I'll look for iptables to solve this but I'm quite busy unfortunately currently. |
I'll look into it. Have you tried using the |
I'll have to look into it. I took my raspberry pis to work for a mini dev environment so it is currently not running my media server setup. |
I'm also struggling with this. I have managed to allow LAN access to my services using |
I will dig into the issue. |
@qdm12 it's interesting... on Docker Desktop I can access the services behind the container using the host's IP, but I can't on the Debian distros I've tried. If you run TCPTRACK on one of the containers behind the PIA shared-namespace, you can see that when you attempt to access the port from outside of the host, the originating IP is your IP (of course), but when you attempt to access it from the host itself, or any container on the bridge network (even using the host's IP), the incoming IP will always appear as the gateway of the pia_vpn bridge network. Most interestingly, the origin IP is ALWAYS the bridge gateway on Docker Desktop, regardless of where you're accessing the service from. It's also important to note that after it hits the container behind PIA, it never gets past "SYN". It could be related to this in some way: docker/for-mac#180 Attempt to connect from another device on my test LAN: Successful attempt to connect using the <host_ip>:<service_port> on another container:
This didn't resolve the issue for me, neither did disabling the firewall using the flag you created a few hours ago. ...I'm sort of stumped. The iptables are also identical between the Desktop and Linux versions. It truly seems like traffic just stops dead once it hits the service if the origin IP is anything other than the gateway address. EDIT: aha... ColinHebert/pia-openvpn#4 |
Wait @zkhcohen sorry if I misunderstood you, but are you trying to make a container connected to gluetun (pia) access a service on another machine in your LAN (that's the topic of this issue)? Or are you trying something else? Because the issue you referenced seem to be something else, please open another issue if so. Thanks! |
Sorry, to clarify, technically the 'service' on another machine in my LAN is just access to the web GUI of the service on the VPN container network, but you could easily extend this to inter-service communication in general. See the README I just discovered here: EDIT: The issue I referenced seems related in that the way that addresses are routed and how they appear to the containers of bridge networks seems fundamentally different in certain situations (OS in particular). I have noticed the same effect when investigating the LAN communication issues when using shared-namespaces. Unfortunately no one can seem to identify the cause. |
That is another irrelevant problem. This issue is about a connected container to reach another service on the physical lan. Although it may sound similar, inter service communication doesn't work that way because of vpn-ish routing-ish issues. Reaching a port of a container using the gluetun network stack is documented in the readme of the repo. Please create another issue describing your configuration (docker run, docker-compose etc.) so I can help you figure it out. Also Docker desktop on osx/windows uses a linux virtual machine with strange port forwarding, so that may be why it works... Thanks! |
(Just a note to future myself) That might be possible adding an ip route of the LAN via the tunnel interface (tun0) instead of via the default interface (eth0), If anyone feels like trying you could try running the container (as docker exec gluetun ip route add 192.168.1.0/24 via 10.0.0.1 dev tun0 Maybe the |
Hey guys, I think this is solved by using the |
I'll close for now until someone encounters the issue again. |
I'm also trying to access gluetun services from WAN. Has anyone found a working solution for this? |
so my current setup has 5 containers running on my raspberry pi which are the following:
PIA
Sonarr
Radarr
Jackett
Qbittorrent
all the containers run their networking through the PIA container via Network_mode: "container:pia"
i am able to get these containers to talk to each other by referencing localhost(127.0.0.1) followed by the service port number but i am having trouble connecting them to services which are on other host devices
radarr and sonarr have a feature where is will tell plex to scan for a new episode/movie once sonarr has finished renaming/organizing the file. I run Plex from my nas drive but the containers have an issue connecting. is there some settings i can change to allow them to talk to other devices?
The text was updated successfully, but these errors were encountered: