-
Notifications
You must be signed in to change notification settings - Fork 592
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
Port forwarding #438
Comments
This working for me: services:
openvpn_client:
image: dperson/openvpn-client
cap_add:
- NET_ADMIN
volumes:
- ./client.ovpn:/vpn/client.conf
command: "-c /vpn/client.conf"
devices:
- /dev/net/tun:/dev/net/tun
web:
image: my_image
network_mode: "service:openvpn_client" In the openvpn server (APT Distro), assuming web docker compose service is listening 8080 port and 2.2.2.2 is the public server ip address, and the openvpn subnet is 10.8.0.0 (cat /etc/openvpn/server.conf):
Open http://2.2.2.2:8080 Should work. |
Thanks for the reply. Im still having no joy :-( Ive added 209.250.230.194 is the public ip, and 192.0.2.2 is the fixed address of the container using the vpn (ie the tun0 ip) still no packets getting through |
I have a docker application that is using the network connection provided by the open-vpn client. My application needs to receive udp packets on port 42000. The connection is working fine , other than udp packets on 42000 are not reaching the application.
I cannot seem to open port 42000 using the -p 42000;udp option.
I start the openvpn client with:
docker run -it --cap-add=NET_ADMIN --device /dev/net/tun --name open-vpn --dns 8.8.4.4 -p 42000:42000/udp -v /root/Documents/openvpn:/vpn -d dperson/openvpn-client -r 192.0.2.0/24 -p 42000;udp
the openvpn client responds with bash: udp: command not found...
How should I be opening this port?
The text was updated successfully, but these errors were encountered: