Port forwarding for Docker images.


Wilmo

Recommended Posts

<edit>

 

* ok... so... after weeks of struggling with this "problem" i asked a friend; who took ONE look at it and within about 3 seconds said..."there's your problem". IN Plex Settings --> Server --> Remote Access ... you have to put a tick in the "Manually specify public port" and then input the port you forwarded by your router.

 

* For some reason I assumed that you would only use this if you were chanign the default port from the standard 32400.

 

* So... PROBLEM FIXED! Thanks /u/fuckmywetsocks

 

</edit>

 

 

 

I've paid £80 for a plus license, and am having difficulties with UnRAID... I emailed limetech directly but never had a response.

 

Please can someone help me understand port forwarding to Docker images in UnRAID. Specifically, Plex.

 

My firewall/router/DHCP/Gateway/DNS is a VM on UnRAID (Sophos UTM). This works fine. I can surf the internet.

 

I;ve got the plexinc Docker image set up, and have forwarded all the relevant ports from Sophos UTM, to the internal IP address of the UnRAID server.

 

However, Plex / Transmission / any other Docker permenantly reports that they cannot connect to the Plex server on the forwarded port.

 

It doesn't seem to matter if the Docker image uses "host" or "bridged" network set up... the ports are never opened properly.

 

However, on a actual physical machine on my network, port forwarding works fine. So its got something to do with Docker.

 

I;ve searched and asked questions on reddit etc... and peoples response are usually "well that should work fine... so we can;t help".

 

Please can limetech offer some advice on port forwarding for Docker images?

Link to comment

If you use bridged mode, docker will create a private network with a separate IP from your unRAID subnet.

 

If you use host mode, it will use your unRAID IP subnet.

 

If you have your Docker set to host mode, inside Plex, what is the IP address that is listed under Settings -> Server -> Remote Access?

Link to comment

I've paid £80 for a plus license, and am having difficulties with UnRAID... I emailed limetech directly but never had a response.

 

Please can someone help me understand port forwarding to Docker images in UnRAID. Specifically, Plex.

 

My firewall/router/DHCP/Gateway/DNS is a VM on UnRAID (Sophos UTM). This works fine. I can surf the internet.

 

I;ve got the plexinc Docker image set up, and have forwarded all the relevant ports from Sophos UTM, to the internal IP address of the UnRAID server.

 

However, Plex / Transmission / any other Docker permenantly reports that they cannot connect to the Plex server on the forwarded port.

 

It doesn't seem to matter if the Docker image uses "host" or "bridged" network set up... the ports are never opened properly.

 

However, on a actual physical machine on my network, port forwarding works fine. So its got something to do with Docker.

 

I;ve searched and asked questions on reddit etc... and peoples response are usually "well that should work fine... so we can;t help".

 

Please can limetech offer some advice on port forwarding for Docker images?

 

Port forwarding in your firewall doesn't have anything to do with your internal network.

So for docker containers to speak to each other you have to use the ports you configured the containers to use.

If you want one container to speak to another you use the IP of unraid and the port of the container you want to connect to.

 

I haven't set up any apps to talk to plex, so don't know how to do it. I didn't think any one could talk to plex, but plex only looks for changes in your library and then adds the new content.

Link to comment

Thanks for your response!

 

If i set the docker image to "host" it carries the 192.168.1.X address of my network.

If I set the docker to "bridged" it carries a 172.xxx.xxx.xxx address... which is no good as it isn;t on my network!

 

:-)

 

 

I've paid £80 for a plus license, and am having difficulties with UnRAID... I emailed limetech directly but never had a response.

 

Please can someone help me understand port forwarding to Docker images in UnRAID. Specifically, Plex.

 

My firewall/router/DHCP/Gateway/DNS is a VM on UnRAID (Sophos UTM). This works fine. I can surf the internet.

 

I;ve got the plexinc Docker image set up, and have forwarded all the relevant ports from Sophos UTM, to the internal IP address of the UnRAID server.

 

However, Plex / Transmission / any other Docker permenantly reports that they cannot connect to the Plex server on the forwarded port.

 

It doesn't seem to matter if the Docker image uses "host" or "bridged" network set up... the ports are never opened properly.

 

However, on a actual physical machine on my network, port forwarding works fine. So its got something to do with Docker.

 

I;ve searched and asked questions on reddit etc... and peoples response are usually "well that should work fine... so we can;t help".

 

Please can limetech offer some advice on port forwarding for Docker images?

 

Port forwarding in your firewall doesn't have anything to do with your internal network.

So for docker containers to speak to each other you have to use the ports you configured the containers to use.

If you want one container to speak to another you use the IP of unraid and the port of the container you want to connect to.

 

I haven't set up any apps to talk to plex, so don't know how to do it. I didn't think any one could talk to plex, but plex only looks for changes in your library and then adds the new content.

Link to comment

Thanks for your input, although I think you mis-understand... my docker images can talk to one another on their designated ports fine. Its the EXTERNAL access that I cannot acheive... i.e. access to a docker image from outside my network

 

Thanks

 

I've paid £80 for a plus license, and am having difficulties with UnRAID... I emailed limetech directly but never had a response.

 

Please can someone help me understand port forwarding to Docker images in UnRAID. Specifically, Plex.

 

My firewall/router/DHCP/Gateway/DNS is a VM on UnRAID (Sophos UTM). This works fine. I can surf the internet.

 

I;ve got the plexinc Docker image set up, and have forwarded all the relevant ports from Sophos UTM, to the internal IP address of the UnRAID server.

 

However, Plex / Transmission / any other Docker permenantly reports that they cannot connect to the Plex server on the forwarded port.

 

It doesn't seem to matter if the Docker image uses "host" or "bridged" network set up... the ports are never opened properly.

 

However, on a actual physical machine on my network, port forwarding works fine. So its got something to do with Docker.

 

I;ve searched and asked questions on reddit etc... and peoples response are usually "well that should work fine... so we can;t help".

 

Please can limetech offer some advice on port forwarding for Docker images?

 

Port forwarding in your firewall doesn't have anything to do with your internal network.

So for docker containers to speak to each other you have to use the ports you configured the containers to use.

If you want one container to speak to another you use the IP of unraid and the port of the container you want to connect to.

 

I haven't set up any apps to talk to plex, so don't know how to do it. I didn't think any one could talk to plex, but plex only looks for changes in your library and then adds the new content.

Link to comment

In bridge mode completely ignore the internal IP... Doesn't matter

 

Forward the port to your server's IP:docker host port and everything will work just fine.  No different than having one container talk to another.  Always use the server IP and the applicable host port

 

I would also suggest using protection accessing the containers from the outside.

Link to comment

Thanks for your input, although I think you mis-understand... my docker images can talk to one another on their designated ports fine. Its the EXTERNAL access that I cannot acheive... i.e. access to a docker image from outside my network

 

Thanks

 

I've paid £80 for a plus license, and am having difficulties with UnRAID... I emailed limetech directly but never had a response.

 

Please can someone help me understand port forwarding to Docker images in UnRAID. Specifically, Plex.

 

My firewall/router/DHCP/Gateway/DNS is a VM on UnRAID (Sophos UTM). This works fine. I can surf the internet.

 

I;ve got the plexinc Docker image set up, and have forwarded all the relevant ports from Sophos UTM, to the internal IP address of the UnRAID server.

 

However, Plex / Transmission / any other Docker permenantly reports that they cannot connect to the Plex server on the forwarded port.

 

It doesn't seem to matter if the Docker image uses "host" or "bridged" network set up... the ports are never opened properly.

 

However, on a actual physical machine on my network, port forwarding works fine. So its got something to do with Docker.

 

I;ve searched and asked questions on reddit etc... and peoples response are usually "well that should work fine... so we can;t help".

 

Please can limetech offer some advice on port forwarding for Docker images?

 

Port forwarding in your firewall doesn't have anything to do with your internal network.

So for docker containers to speak to each other you have to use the ports you configured the containers to use.

If you want one container to speak to another you use the IP of unraid and the port of the container you want to connect to.

 

I haven't set up any apps to talk to plex, so don't know how to do it. I didn't think any one could talk to plex, but plex only looks for changes in your library and then adds the new content.

 

So what are you trying to do? You said that transmission and other containers couldn't talk to plex, but now you say they can talk to each other?

 

Are you trying to get the containers to talk to a plex server outside your network?

Or simply trying to access your containers from outside your network?

Link to comment

In sophos, you need to forward the plex ports to the plex ports on your unraid server.

 

So let's say when you set up the plex container, you map port 32400 on host (unraid) to port 32400 on the container (plex) in bridge mode.

Let's assume your unraid IP is 192.168.1.10 and the container IP is 172.37.1.1. That setting forwards 192.168.1.10:32400 to 172.37.1.1:32400

 

But you still need to forward 32400 on your router (sophos I assume) to unraid at 192.168.1.10

 

EDIT: I see in the original post that you said you forwarded ports from sophos to unraid, but have you tested it? Is sophos correctly forwarding outside (wan) ports to unraid?

Link to comment

Hello again,

 

To clarify, specifically I am trying to use my Plex docker image outside of my network. Because Plex uses port 32400 to access any given Plex server from outside, I;ve forwarded the ports via Sophos. However, upon testing open ports on my plex server from outside my network ... (by simply  using the native Plex "server --> Remote Access --> retry" button). I receieve the response "Not available outside your network" when it totally should be becuase all the necessary ports are forwarded!

 

Likewise... when i try to forward torrent traffic on a specific port in Transmission, Transmission consistently reports that the designated port is Closed.

 

So... thanks for your input. I'm just going to keep plugging away until I get something sorted.

 

 

 

Thanks for your input, although I think you mis-understand... my docker images can talk to one another on their designated ports fine. Its the EXTERNAL access that I cannot acheive... i.e. access to a docker image from outside my network

 

Thanks

 

I've paid £80 for a plus license, and am having difficulties with UnRAID... I emailed limetech directly but never had a response.

 

Please can someone help me understand port forwarding to Docker images in UnRAID. Specifically, Plex.

 

My firewall/router/DHCP/Gateway/DNS is a VM on UnRAID (Sophos UTM). This works fine. I can surf the internet.

 

I;ve got the plexinc Docker image set up, and have forwarded all the relevant ports from Sophos UTM, to the internal IP address of the UnRAID server.

 

However, Plex / Transmission / any other Docker permenantly reports that they cannot connect to the Plex server on the forwarded port.

 

It doesn't seem to matter if the Docker image uses "host" or "bridged" network set up... the ports are never opened properly.

 

However, on a actual physical machine on my network, port forwarding works fine. So its got something to do with Docker.

 

I;ve searched and asked questions on reddit etc... and peoples response are usually "well that should work fine... so we can;t help".

 

Please can limetech offer some advice on port forwarding for Docker images?

 

Port forwarding in your firewall doesn't have anything to do with your internal network.

So for docker containers to speak to each other you have to use the ports you configured the containers to use.

If you want one container to speak to another you use the IP of unraid and the port of the container you want to connect to.

 

I haven't set up any apps to talk to plex, so don't know how to do it. I didn't think any one could talk to plex, but plex only looks for changes in your library and then adds the new content.

 

So what are you trying to do? You said that transmission and other containers couldn't talk to plex, but now you say they can talk to each other?

 

Are you trying to get the containers to talk to a plex server outside your network?

Or simply trying to access your containers from outside your network?

Link to comment

By default, the Plex Docker image uses "Host" ... so i just left it at that....

 

I'm beginning to think that this is not Docker, but something to do with the Plex connection checker.

 

I'll keep plugging away.

 

In sophos, you need to forward the plex ports to the plex ports on your unraid server.

 

So let's say when you set up the plex container, you map port 32400 on host (unraid) to port 32400 on the container (plex) in bridge mode.

Let's assume your unraid IP is 192.168.1.10 and the container IP is 172.37.1.1. That setting forwards 192.168.1.10:32400 to 172.37.1.1:32400

 

But you still need to forward 32400 on your router (sophos I assume) to unraid at 192.168.1.10

 

EDIT: I see in the original post that you said you forwarded ports from sophos to unraid, but have you tested it? Is sophos correctly forwarding outside (wan) ports to unraid?

Link to comment

Hello again,

 

To clarify, specifically I am trying to use my Plex docker image outside of my network. Because Plex uses port 32400 to access any given Plex server from outside, I;ve forwarded the ports via Sophos. However, upon testing open ports on my plex server from outside my network ... (by simply  using the native Plex "server --> Remote Access --> retry" button). I receieve the response "Not available outside your network" when it totally should be becuase all the necessary ports are forwarded!

 

Likewise... when i try to forward torrent traffic on a specific port in Transmission, Transmission consistently reports that the designated port is Closed.

 

So... thanks for your input. I'm just going to keep plugging away until I get something sorted.

 

 

 

Thanks for your input, although I think you mis-understand... my docker images can talk to one another on their designated ports fine. Its the EXTERNAL access that I cannot acheive... i.e. access to a docker image from outside my network

 

Thanks

 

I've paid £80 for a plus license, and am having difficulties with UnRAID... I emailed limetech directly but never had a response.

 

Please can someone help me understand port forwarding to Docker images in UnRAID. Specifically, Plex.

 

My firewall/router/DHCP/Gateway/DNS is a VM on UnRAID (Sophos UTM). This works fine. I can surf the internet.

 

I;ve got the plexinc Docker image set up, and have forwarded all the relevant ports from Sophos UTM, to the internal IP address of the UnRAID server.

 

However, Plex / Transmission / any other Docker permenantly reports that they cannot connect to the Plex server on the forwarded port.

 

It doesn't seem to matter if the Docker image uses "host" or "bridged" network set up... the ports are never opened properly.

 

However, on a actual physical machine on my network, port forwarding works fine. So its got something to do with Docker.

 

I;ve searched and asked questions on reddit etc... and peoples response are usually "well that should work fine... so we can;t help".

 

Please can limetech offer some advice on port forwarding for Docker images?

 

Port forwarding in your firewall doesn't have anything to do with your internal network.

So for docker containers to speak to each other you have to use the ports you configured the containers to use.

If you want one container to speak to another you use the IP of unraid and the port of the container you want to connect to.

 

I haven't set up any apps to talk to plex, so don't know how to do it. I didn't think any one could talk to plex, but plex only looks for changes in your library and then adds the new content.

 

So what are you trying to do? You said that transmission and other containers couldn't talk to plex, but now you say they can talk to each other?

 

Are you trying to get the containers to talk to a plex server outside your network?

Or simply trying to access your containers from outside your network?

 

 

Be sure that you use unraids IP in sophos, as aptalca says in the post above yours and that you use a port that is mapped in your container template.

Link to comment

Thank you for your input. It was helpful indeed. Turns out i needed to put a tick in the "manually specifiy public port"

 

Thanks for your help.

 

 

Here's how my Plex Server and pfSense port settings are setup, it might give you an idea...

 

Plex Settings:

 

plexport.jpg

 

NAT Port Forward Setting:

 

pfsenseplex.jpg

 

Firewall Rule Setting:

 

plexfirewall.jpg

 

Not sure how relevant this is to your setup but it might help.

Link to comment

Thank you for your help on this...

 

<edit>

 

* ok... so... after weeks of struggling with this "problem" i asked a friend; who took ONE look at it and within about 3 seconds said..."there's your problem". IN Plex Settings --> Server --> Remote Access ... you have to put a tick in the "Manually specify public port" and then input the port you forwarded by your router.

 

* For some reason I assumed that you would only use this if you were chanign the default port from the standard 32400.

 

* So... PROBLEM FIXED! Thanks /u/fuckmywetsocks

 

</edit>

 

Hello again,

 

To clarify, specifically I am trying to use my Plex docker image outside of my network. Because Plex uses port 32400 to access any given Plex server from outside, I;ve forwarded the ports via Sophos. However, upon testing open ports on my plex server from outside my network ... (by simply  using the native Plex "server --> Remote Access --> retry" button). I receieve the response "Not available outside your network" when it totally should be becuase all the necessary ports are forwarded!

 

Likewise... when i try to forward torrent traffic on a specific port in Transmission, Transmission consistently reports that the designated port is Closed.

 

So... thanks for your input. I'm just going to keep plugging away until I get something sorted.

 

 

 

Thanks for your input, although I think you mis-understand... my docker images can talk to one another on their designated ports fine. Its the EXTERNAL access that I cannot acheive... i.e. access to a docker image from outside my network

 

Thanks

 

I've paid £80 for a plus license, and am having difficulties with UnRAID... I emailed limetech directly but never had a response.

 

Please can someone help me understand port forwarding to Docker images in UnRAID. Specifically, Plex.

 

My firewall/router/DHCP/Gateway/DNS is a VM on UnRAID (Sophos UTM). This works fine. I can surf the internet.

 

I;ve got the plexinc Docker image set up, and have forwarded all the relevant ports from Sophos UTM, to the internal IP address of the UnRAID server.

 

However, Plex / Transmission / any other Docker permenantly reports that they cannot connect to the Plex server on the forwarded port.

 

It doesn't seem to matter if the Docker image uses "host" or "bridged" network set up... the ports are never opened properly.

 

However, on a actual physical machine on my network, port forwarding works fine. So its got something to do with Docker.

 

I;ve searched and asked questions on reddit etc... and peoples response are usually "well that should work fine... so we can;t help".

 

Please can limetech offer some advice on port forwarding for Docker images?

 

Port forwarding in your firewall doesn't have anything to do with your internal network.

So for docker containers to speak to each other you have to use the ports you configured the containers to use.

If you want one container to speak to another you use the IP of unraid and the port of the container you want to connect to.

 

I haven't set up any apps to talk to plex, so don't know how to do it. I didn't think any one could talk to plex, but plex only looks for changes in your library and then adds the new content.

 

So what are you trying to do? You said that transmission and other containers couldn't talk to plex, but now you say they can talk to each other?

 

Are you trying to get the containers to talk to a plex server outside your network?

Or simply trying to access your containers from outside your network?

 

 

Be sure that you use unraids IP in sophos, as aptalca says in the post above yours and that you use a port that is mapped in your container template.

Link to comment
  • 2 years later...

Would like to clarify on this.  I'm using bridge mode on Docker containers.  I also would like Docker container to be accessible from outside.  Mainly, I use Deluge Torrent client.  I need to seed, hence, so tweaking Sophos firewall open ports is a must.  Deluge uses port 8112.  Is this where I forward ports from outside to?  Inside Deluge, there is also fields such as inbound/ outbound ports.  What should I do with this?  Are the numbers in these fields required in Sophos XG?  Do I need to forward to them?  Currently, site where I download says I'm not seeding.

Link to comment

Port forwarding for containers in a nutshell:

 

If container is running in bridge or host mode, you forward the appropriate host port to the IP of the server.

 

If running with a dedicated IP address, you forward the appropriate host port to the IP of the container.

 

If you've got your modem (with integrated router) going to another router / firewall, then your modem has to put that particular device in its DMZ so that the modem doesn't interfere.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.