-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
Bug: VPN Port forwarding doesn't work always after restart and doesn't try again #2443
Comments
@qdm12 is more or less the only maintainer of this project and works on it in his free time.
|
Doesn't If it does, what wiki page did you visit? Maybe that information is not mentioned that much and could use some improvement. |
I tried this now and it didn't work. But I don't know why. I shutdown the tcp proxy container and added this to the gluetun container as environment variable: Maybe additional firewall rule needed? |
Please double check using those steps: Note this was fixed a few days ago only, so make sure you use the latest image (re-pull it). |
I can see the difference. In my scenario the application container is also using gluetun as docker network for outbound connections. Maybe this is why it doesn't work for me. I will now replace my application with the Portcheck container and give it a trial. Also with proton, sometimes I don't get a port (probably wrong Server without P2P), can gluetun in this scenario try to connect to another Server on it's own? At the moment I restart the container several times till I'm lucky to get a port. And I also have to restart applications because it breaks the docker network. |
That's irrelevant to the VPN server side port forwarding though, right? Outbound connections can go freely through the VPN, I don't see how this matters here.
This should not be the case since commit (part of v3.39 release and latest) 5d75bbc What error are you getting in your logs? |
Only restarting several times gave me randomly a server, which accepted my request. But I can confirm the portforwarding directly to my application to be working. Maybe last time i was not waiting enough time till the webserver was ready. Should i open another issuie regarding to still existing bug with not getting a port and not trying another server from the pool? |
✅ The two logs line here:
Did you remove some log lines On top of that, if you search IP address |
i have multiple gluetun containers running, because one container can only forward one port. Maybe there is a conflict between the containers. There is two problems. One is that the port becomes unavailable after some time, but this can be managed by restarting the tunnel. So usually i restart the tunnel with this command, because then I don't have to restart the container behind gluetun: docker exec applicationBehindGluetunContainer curl -X PUT http://localhost:8000/v1/openvpn/status Then the following logfile shows the console of the the gluetun container when it receives the stop signal.
The gluetun container now doesn't try to do anything. It is staying at this forever. Then i invoke the command docker exec applicationBehindGluetunContainer curl -X PUT http://localhost:8000/v1/openvpn/status several times till i get a working port forwarding. Also i see sometimes in the log this error:
The not retrying after failed port forwarding is the second problem. |
What's the feature 🧐
Currently the VPN-Provider assigns a random port. But my Application is listening on a fixed listen port. So I have to create another container and change the port manually before starting the container:
tcp-app:
image: tecnativa/tcp-proxy
container_name: tcp-app
environment:
LISTEN: ":35386" #here I have to put the random port from the vpn provider
TALK: "172.18.0.1:12345" #this is where the application runs
network_mode: "service:glue-app"
It totally works like that. I'm just looking for an easier and more automated way. Maybe TCP Proxy can be implemented within the gluetun container like we already have for shadowsocks and http proxy.
Extra information and references
No response
The text was updated successfully, but these errors were encountered: