Closed whispy closed 7 years ago
I figured it out. I had to fiddle with the iptables on the server. I had to add the following to my PREROUTING
table:
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport {port I want routed} -j DNAT --to-destination {openvpn-client's tun ip}
Glad you were able to get things working.
I'm trying to route a docker container for AirDC++ (p2p application https://hub.docker.com/r/gangefors/airdcpp-webclient/) through the openvpn-client image to an openvpn server I have running on a VPS.
I can get the AirDC++ web UI to connect through the VPN to a hub (basically, a DC++ server) and other users can access my files. However, I cannot access other users' files. Looking around, this issue is usually (in non-Docker, non-VPN cases) caused by the required ports for the P2P connection not being forwarded (more general info: http://dcplusplus.sourceforge.net/webhelp/settings_connectivity_manual.html). The specific ports I'm trying to open/forward are
14237/tcp
,21248/udp
, and21933/tcp
.The logs in the openvpn-client container show that it is connecting to the openvpn server properly, and the VPN is being initialized.
For testing purposes, I changed the AirDC++ container from using your openvpn-client container's network, and ran it using the default docker network through my LAN. The AirDC++ container connected fine and I was able to properly access other users' files. Upon changing it back to using the openvpn-client container's network, I became unable to access other users' files. As such, I believe that the openvpn-client container is somehow not forwarding the required ports through to the VPN server.
My run command for the AirDC++ container looks like (removed volume links):
Then, the run command for the openvpn-client container looks like:
I've read through the instructions in the README, and believed that the
-p '<port>'
option would do what I needed, but that doesn't appear to be the case.Please let me know if you have any idea how I can get this working. Thanks for making such a great Docker image, and thanks for taking the time to read this.