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

Is there a bug with NAT? Just trying to redirect traffic from 1 IP to another, nothing works.

NAT
3
12
1.2k
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.
  • G
    genericuser8674
    last edited by Jul 15, 2022, 1:45 AM

    Very simple, just any traffic originating from the LAN going to example IP 1.2.3.4 will instead go to 5.6.7.8.

    I tried this with port forwarding, 1:1, and outbound and nothing works! What am I doing wrong? I'm not specifying ports, I'm choosing any/all ports.
    So when I ping 1.2.3.4, it should go to 5.6.7.8, but that's not happening.

    V 1 Reply Last reply Jul 15, 2022, 10:18 AM Reply Quote 0
    • V
      viragomann @genericuser8674
      last edited by Jul 15, 2022, 10:18 AM

      @genericuser8674
      No, this work flawlessly with a simple portforwarding rule.

      Ensure that you select the LAN interface and that you add a NAT rule for each protocol you need, since there is no "any".
      The default protocol value is TCP. You can change it to TCP/UDP, which covers already the most connections. But for ping you need an additional rule for ICMP.

      G 1 Reply Last reply Jul 15, 2022, 2:42 PM Reply Quote 0
      • G
        genericuser8674 @viragomann
        last edited by Jul 15, 2022, 2:42 PM

        @viragomann Thanks, I tried that. I added both TCP/UDP and ICMP with any port. I pointed the destination to an internal webserver and even my own computer, but the ping always times out.

        You can try yourself. I put in 1.2.3.4 and redirect to 10.1.2.3 or whatever your own computer's internal IP is.

        J V 2 Replies Last reply Jul 15, 2022, 4:01 PM Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator @genericuser8674
          last edited by johnpoz Jul 15, 2022, 4:09 PM Jul 15, 2022, 4:01 PM

          @genericuser8674 works here..

          Without some specifics of what your trying to do - nobody can help you

          login-to-view

          Clearly that is not actually 1.2.3.4, because look at the response time of less than 1ms, sure isn't out on the interent, etc.

          Is 1.2.3.4 your wan IP and your trying to setup nat reflection?

          whatever your own computer's internal IP is.

          Are you trying to redirect that back to your source PC? Your going to have to give us some details, post up what you have actually done - because works just fine here..

          Pinging 1.2.3.4 from my pc 192.168.9.100,

          login-to-view

          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

          G 1 Reply Last reply Jul 15, 2022, 6:04 PM Reply Quote 0
          • G
            genericuser8674 @johnpoz
            last edited by genericuser8674 Jul 15, 2022, 6:05 PM Jul 15, 2022, 6:04 PM

            @johnpoz How did you get ANY in the protocol section? It doesn't let me do that. I'm on the latest CE version.

            login-to-view

            This is what I'm using to ping.

            login-to-view

            10.1.2.3 is an internal webserver, firewall disabled; I can ping it fine if I ping it directly but the port forward doesn't work.

            I tried each of the 4 options in NAT reflection too.

            J 1 Reply Last reply Jul 15, 2022, 7:01 PM Reply Quote 0
            • J
              johnpoz LAYER 8 Global Moderator @genericuser8674
              last edited by johnpoz Jul 15, 2022, 7:05 PM Jul 15, 2022, 7:01 PM

              @genericuser8674 I am not having any problems with it.. 2.6 doesn't seem to have the any option in port forwards.

              But just updated to 2.7 and it does, I am running 22.05 on my pfsense.

              Let me test your port forward example using my lab pfsense

              So I change my pc 192.168.9.100 to use my lab pfsense at 192.168.9.148 as its gateway.

              Create the port forwards, made sure wan rule were ok. You doing any policy routing that would force traffic out a gateway or vpn? This could be causing you an issue.

              But I can port forward 1.2.3.4 to myself at 192.168.9.100 just fine

              login-to-view

              you can see my firewall rule was triggered that allows the port forward.

              login-to-view

              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

              G 1 Reply Last reply Jul 15, 2022, 9:55 PM Reply Quote 0
              • G
                genericuser8674 @johnpoz
                last edited by Jul 15, 2022, 9:55 PM

                @johnpoz Is your lab also on 2.6? I'm thinking this is a 2.6 issue. I can't upgrade anymore, it says I'm already on the latest.

                And isn't that firewall rule redundant since you already have the "default allow LAN to any"?

                J 1 Reply Last reply Jul 15, 2022, 9:58 PM Reply Quote 0
                • J
                  johnpoz LAYER 8 Global Moderator @genericuser8674
                  last edited by johnpoz Jul 15, 2022, 9:59 PM Jul 15, 2022, 9:58 PM

                  @genericuser8674 It was just there to show you it is evaluated.

                  It was on 2.6 and any was not there, I updated it to 2.7 which is dev

                  Change it in the update section.

                  login-to-view

                  I looked when it was on 2.6 and there was no any setting, like 22.05 has - but when I updated to 2.7 it does have the any option.

                  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

                  G 1 Reply Last reply Jul 16, 2022, 3:33 PM Reply Quote 0
                  • V
                    viragomann @genericuser8674
                    last edited by Jul 15, 2022, 10:20 PM

                    @genericuser8674 said in Is there a bug with NAT? Just trying to redirect traffic from 1 IP to another, nothing works.:

                    I added both TCP/UDP and ICMP with any port. I pointed the destination to an internal webserver and even my own computer, but the ping always times out.
                    You can try yourself. I put in 1.2.3.4 and redirect to 10.1.2.3 or whatever your own computer's internal IP is.

                    According to your example IPs I was talking about redirecting a public destination to another one.
                    Redirecting to an internal IP would not work with TCP if source and redirect IP are within the same network segment.
                    But it should work with ICMP (ping) though.
                    For TCP you would also need a masquerading rule in addition.

                    1 Reply Last reply Reply Quote 0
                    • G
                      genericuser8674 @johnpoz
                      last edited by Jul 16, 2022, 3:33 PM

                      @johnpoz OK then, so it's a bug with the 2.6 version.

                      J 1 Reply Last reply Jul 16, 2022, 3:35 PM Reply Quote 0
                      • J
                        johnpoz LAYER 8 Global Moderator @genericuser8674
                        last edited by Jul 16, 2022, 3:35 PM

                        @genericuser8674 how is it a bug that it doesn't list any? That is not a "bug" that is a feature that is not available in that version.

                        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

                        G 1 Reply Last reply Jul 17, 2022, 11:43 PM Reply Quote 0
                        • G
                          genericuser8674 @johnpoz
                          last edited by Jul 17, 2022, 11:43 PM

                          @johnpoz said in Is there a bug with NAT? Just trying to redirect traffic from 1 IP to another, nothing works.:

                          @genericuser8674 how is it a bug that it doesn't list any? That is not a "bug" that is a feature that is not available in that version.

                          Post about a bug in 2.6 CE.
                          Proceeds to test it on 2.7 and say iT's A fEaTuRe, NoT a BuG!
                          🤦

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