• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Port Forwarding into Docker Containers not working

Scheduled Pinned Locked Moved NAT
9 Posts 3 Posters 2.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    sokratz
    last edited by Dec 13, 2020, 3:53 PM

    I'm having an odd issue and I can't tell if it's on the Docker networking side or the PFense side.. I have two working NATs setup (plex and a web server) that were just simple to setup. However, when I try to port forward into a docker container I can't seem to get it to work.

    External DNS is working fine and dandy to my WAN IP

    Setup looks a little bit like this:
    Synology DiskStation listening on 5051 for DSM - works great internal or external via Port Forwarding. Internal IP is 192.168.0.144:5051.

    Plex Server running on windows host using 32400 - works great internal or external via Port Forwarding. Internal IP is 192.168.0.245:32400

    Docker container running on Synology. Publishing port 192.168.0.144:32003 to internal container port 8989 - Works fine internally but can't get any NAT response.

    Docker bridge network is 172.17.0.0/16 and this container is running on 172.17.0.4

    My guess is there's something to do with the response back from the docker container that I don't have configured right?

    Any tips?

    Thanks much!

    J 1 Reply Last reply Dec 13, 2020, 4:49 PM Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator @sokratz
      last edited by Dec 13, 2020, 4:49 PM

      @sokratz said in Port Forwarding into Docker Containers not working:

      192.168.0.144:32003

      Are you forwarding to that port?

      Your docker network would have nothing to do with anything.

      An intelligent man is sometimes forced to be drunk to spend time with his fools
      If you get confused: Listen to the Music Play
      Please don't Chat/PM me for help, unless mod related
      SG-4860 24.11 | Lab VMs 2.7.2, 24.11

      1 Reply Last reply Reply Quote 0
      • S
        sokratz
        last edited by Dec 13, 2020, 4:54 PM

        Yah. I'm forwarding to 32003. I've setup a variety of containers and none seem reachable. I can see the rules get hit on the pfsense side as well.

        J 1 Reply Last reply Dec 13, 2020, 4:58 PM Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator @sokratz
          last edited by Dec 13, 2020, 4:58 PM

          Well look to your containers then..

          If pfsense sends the traffic to the IP and port - there is nothing else it can do..

          Can your containers talk to the internet?

          An intelligent man is sometimes forced to be drunk to spend time with his fools
          If you get confused: Listen to the Music Play
          Please don't Chat/PM me for help, unless mod related
          SG-4860 24.11 | Lab VMs 2.7.2, 24.11

          1 Reply Last reply Reply Quote 0
          • S
            sokratz
            last edited by Dec 13, 2020, 4:58 PM

            omg... synology firewall...

            hours and hours of waste.

            #Facepalm.

            J 1 Reply Last reply Dec 13, 2020, 5:00 PM Reply Quote 0
            • J
              johnpoz LAYER 8 Global Moderator @sokratz
              last edited by Dec 13, 2020, 5:00 PM

              @sokratz said in Port Forwarding into Docker Containers not working:

              #Facepalm.

              That is pretty much the fix for every single port forward issue I have seen here in 10+ years.. It always comes down to pebkac ;)

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.7.2, 24.11

              S D 2 Replies Last reply Dec 13, 2020, 5:40 PM Reply Quote 0
              • S
                sokratz @johnpoz
                last edited by Dec 13, 2020, 5:40 PM

                @johnpoz lol. sometimes you just need to post the question to think critically about something. maybe someone will get lucky and see this. That Syno firewall has tripped me up a whole slew of times. Thanks for placating me ;)

                J 1 Reply Last reply Dec 13, 2020, 9:50 PM Reply Quote 0
                • J
                  johnpoz LAYER 8 Global Moderator @sokratz
                  last edited by Dec 13, 2020, 9:50 PM

                  I have no problems helping users find where the issue is.. And yup - posting questions and having someone ask questions in return can quite often spark some insight to what was overlooked.

                  That is why the best thing when having such issues is to follow the traffic.. Sniffing will tell you instantly where the problem is.

                  A sniff showing pfsense sending the traffic to where you forwarded would get you looking to why there was no answer, etc.

                  Glad you got it sorted.

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                  1 Reply Last reply Reply Quote 0
                  • D
                    dragoangel @johnpoz
                    last edited by dragoangel Dec 27, 2020, 9:29 AM Dec 27, 2020, 9:28 AM

                    @johnpoz then please check this topic https://forum.netgate.com/topic/159354/pfsense-2-5-0-a-20201127-0650-nat-issues/1 and you will get fresh new expirience 😊

                    Latest stable pfSense on 2x XG-7100 and 1x Intel Xeon Server, running mutiWAN, he.net IPv6, pfBlockerNG-devel, HAProxy-devel, Syslog-ng, Zabbix-agent, OpenVPN, IPsec site-to-site, DNS-over-TLS...
                    Unifi AP-AC-LR with EAP RADIUS, US-24

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                      This community forum collects and processes your personal information.
                      consent.not_received