Filter rule association question

  • 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!

  • LAYER 8 Global Moderator

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

  • That makes sense, thanks for the clarification!

Log in to reply