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

    Firewall vs NAT

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 2 Posters 1.1k 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.
    • M Offline
      madivad
      last edited by

      I humbly apologise if my question is too stupid, but having come from only ever using ISP supplied modem/routers (and for a short time MANY years ago, a smoothwall firewall—which was very easy to use), I'm struggling with some aspects of pfSense.

      When setting firewall or NAT rules there seems to be a correlating rule in opposing section.

      I know I'm missing something, but what appears in the firewall rule seems very similar to the NAT rule.

      What's the difference?

      edit: If you'd prefer, please refer me to some "simple" documentation on it. I don't mind reading and learning myself. But everything I'm getting just confuses me more

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

        The NAT rule (a port forward) translates the destination address/port as traffic arrives on the interface.

        After that, a firewall rule passing the traffic is necessary or it will be blocked. That rule must pass the translated traffic. For instance, if you translate connections to WAN address port TCP/80 to an inside server 192.168.1.100 TCP/8080, the firewall must pass traffic destined for 192.168.1.100 TCP/8080.

        Neither will work without the other in that case.

        Hard to give you "simple" documentation on a subject that can get a little complicated. You really have to understand what a port forward is really doing. If you don't have the pfSense book (see sig) then:

        https://doc.pfsense.org/index.php/How_can_I_forward_ports_with_pfSense

        https://doc.pfsense.org/index.php/Port_Forward_Troubleshooting

        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
        • M Offline
          madivad
          last edited by

          Thanks Derelict, I know other posts have basically said the same thing, but the succinctness of that answer is perfect (and perfectly understood). And I already have those two tabs open elsewhere in other windows. That was probably my biggest error (and I'm guessing traps a few newbies) about the destination IP and Port, and now that I've been using it a few days, it's perfectly understood. Cheers

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