Jump to content


Photo

Help with port forwarding and docker

docker port forwarding

  • Please log in to reply
1 reply to this topic

#1 remmina

remmina

    Newbie

  • New Members
  • Pip
  • 3 posts

Posted 07 April 2018 - 07:42 PM

My setup is as follows. I have a docker setup where i run my vpn server in one container and my transmission application in another container. My transmission container uses the vpn container as a gateway which works quite nice. My only problem is that i'm unable to forward my peer listening port from my airvpn connection to the transmission container. I have added the port forwarding at airvpn.org but dont know how to forward it to my transmission container.

 

I guess I have to add some iptables rules to my vpn gateway, which uses openvpn+iptables to connect airvpn servers.

 

Does anyone have an idea of how to configure iptables to handle port forwarding?



#2 joshrivers

joshrivers

    Newbie

  • New Members
  • Pip
  • 1 posts

Posted 09 April 2018 - 12:51 AM

I'm currently undoing openVpn-in-docker in my setup to simplify this stuff. I'm going to just have a whole VM allocated to locked down vpn traffic and run my transmission/etc inside of that VM.

 

Docker is doing some excruciatingly clever things with IPTables already in order to create network devices, and route traffic around between 'containers' (which are a fiction on top of a lot of low level Kernel capabilities). None of it is magic or incomprehensible, but it can be complex and occasionally buggy. I was happy with dockerized openvpn until I wanted to add flexibility...thats when I decided it was too much effort.

 

If you're still up for learning it (and I'd start with a good iptables tutorial) I'd refer you to https://github.com/haugene/docker-transmission-openvpn which is a openvpn/transmission all-in-one, and this gist https://github.com/sebgl/htpc-download-box which has some direction on sharing network interfaces between containers using network_mode in the container instantiation.

 

Good luck!







Similar Topics Collapse


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

Servers online. Online Sessions: 15270 - BW: 56328 Mbit/sYour IP: 54.162.133.222Guest Access.