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

    Filter rule association question

    Scheduled Pinned Locked Moved NAT
    3 Posts 2 Posters 840 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.
    • B
      bl0bby
      last edited by

      I'm setting up pfsense with multiple Virtual IPs which I need to forward to several internal machines. For example, if I have the external IPs x.x.x.201, 202, and 203, I might want to forward port 80 to 8080, and port 22 to 22, from 202 to an internal machine at 192.x.x.100 and forward 500 and 4500 from 203 to 192.x.x.101.

      When I set up the port forwarding, I tried "Add an associated filter rule" which created a firewall rule automatically. However, when I look at the rule it is not restricted to incoming port 80 (for example), but allows Any source, then restricts the destination to 8080.

      Just so I'm clear, is the reason for this that the rule will allow any traffic to be seen by the forwarding rules, which will only allow traffic intended for port 80 to pass through and be redirected to 8080? Or do the forwarding rules come first, and then the firewall rules kick in?

      Lastly, how exactly does the "Pass" option work, and would that be a better choice for me than "Add an associated filter rule" in this case?

      Thanks for any advice!

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

        You will notice that the dest is the IP of your port forward, and yes port forwards come before firewall rules

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

        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
        • B
          bl0bby
          last edited by

          That makes sense, thanks for the clarification!

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