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

    Portforward to different port not working

    Scheduled Pinned Locked Moved NAT
    8 Posts 3 Posters 999 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.
    • T
      thijs
      last edited by

      I've set-up about 10 portforwards but only the ones that map to the same port seem to be working. I've been testing and trying with 1 host but no matter what I try the port won't forward. I've moved the rules on both the Portforward as the Firewall Rules to the top, so no other rules can conflict. But only the 1 on 1 portforward is working (the 4949 forward, see attachment), but not the SSH portforward (1122 to 22).  The automatically created firewall rules also seem to be ok (see attachment).

      I've been testing from my VPS to see if the port opens but nmap's output is:

      PORT    STATE    SERVICE
      1122/tcp filtered availant-mgr
      4949/tcp open  munin

      What am I doing wrong? Let me know if you need more information so I can add that.

      I'm running version 2.2.2 on a dedicated machine with 2 ethernet ports.
      1-nat.PNG
      1-nat.PNG_thumb
      2-firewall.PNG
      2-firewall.PNG_thumb
      3-nat-ssh.PNG
      3-nat-ssh.PNG_thumb
      4-nat-munin.PNG
      4-nat-munin.PNG_thumb
      5-firewall-ssh.PNG
      5-firewall-ssh.PNG_thumb
      6-firewall-munin.PNG
      6-firewall-munin.PNG_thumb

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        It works just perfectly fine for loads of people. For starters, I would suggest to simply connect via SSH, instead of messing with nmap.

        1 Reply Last reply Reply Quote 0
        • T
          thijs
          last edited by

          @doktornotor:

          It works just perfectly fine for loads of people. For starters, I would suggest to simply connect via SSH, instead of messing with nmap.

          Yes, I've tried just connecting with SSH but it times out. As nmap shows, the port isn't opened/forwarded.

          1 Reply Last reply Reply Quote 0
          • D
            doktornotor Banned
            last edited by

            Anything in the firewall logs?

            1 Reply Last reply Reply Quote 0
            • T
              thijs
              last edited by

              Nothing  :(

              1 Reply Last reply Reply Quote 0
              • D
                doktornotor Banned
                last edited by

                Well, then I'd say you are hunting ghosts in completely wrong place. Check if there's some SSH listening on HOST_CS and whether it allows connections from outside the LAN. Otherwise, Diagnostics - Packet Capture.

                1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator
                  last edited by

                  Yeah rules look find from first glance.. I would validate that ssh is listening on your host_cs box.. So you can ssh to it from other local machines?

                  So on 2.2.2 and currently changing ports for forward from 8443 to 443, and that works fine.. And I just duplicated your setup of 1122 to 22 and works just fine from one of my vps.

                  I would just test with ssh vs nmap as well..

                  sshfromoutsideto1122.png
                  sshfromoutsideto1122.png_thumb

                  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.8, 24.11

                  1 Reply Last reply Reply Quote 0
                  • T
                    thijs
                    last edited by

                    Removed all NAT rules and associated firewall rules and rebooted the system. Then I created only the 2 rules for 1122->22 and 4949->4949 again, now it works! The configuration is still the same as on the screenshots I have attached in the first post. So I guess it's solved now  8)

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.