Jump to content
Not connected, Your IP:
Sign in to follow this  

Help with port forwarding and docker

Recommended Posts

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?

Share this post

Link to post

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!

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

  • Create New...