Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    NAT Port Forward vs Firewall Rule

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 4 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.
    • P
      Peter847
      last edited by

      Could someone help me improve my understanding of PfSense?

      I have a device on my network that has its DNS servers hard coded so I use a NAT port forward rule to catch everything it sends on port 53 and redirect it to the DNS server of my choice.  I copied the setup from one of the posts in this forum.  Is there any reason why I should use the NAT rule, can I just achieve the same thing with a standalone Firewall rule and dispense the linked NAT rule?

      Peter

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

        how would your firewall rule redirect traffic to say 8.8.8.8 on udp to the IP address your redirecting too..

        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 26.07 | Lab VMs 2.9.0, 26.07

        1 Reply Last reply
        Reply Quote 0
        • K
          kpa
          last edited by

          NAT stands for "Network Address Translation". In PF (and pfSense) this process is totally separate from the packet filtering process. The packet filtering process does just filtering as the name suggests, if you want to do any sort of address translation you have to use the NAT engine of PF and its RDR and NAT rules.

          1 Reply Last reply
          Reply Quote 0
          • P
            Peter847
            last edited by

            Ah, yes! 

            I thought the NAT linked firewall rule was just the same as any other firewall rule but I now see that the "destination" section of the NAT rule is the destination for the redirected packet whereas the destination for a normal firewall rule just selects the packets for Pass/Reject.  Correct?

            Peter

            1 Reply Last reply
            Reply Quote 0
            • DerelictD
              Derelict LAYER 8 Netgate
              last edited by

              The complement each other / work in tandem.

              You can forward the port but without the firewall rule no traffic will pass.

              You can add the firewall rule but without the port forward there will be no inbound traffic for the destination address (usually an RFC1918 address).

              Chattanooga, Tennessee, USA
              A comprehensive network diagram is worth 10,000 words and 15 conference calls.
              DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
              Do Not Chat For Help! NO_WAN_EGRESS(TM)

              1 Reply Last reply
              Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post
              Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
              Privacy Policy · Cookie Policy