View Single Post
  #2   (View Single Post)  
Old 6th February 2024
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,989
Default

I see what I believe are PF configuration errors.
  • You have provisioned `from any to port 5900`. I believe you want either `from any to any port 5900` or `any to (self) port 5900`. The grammar expects a host to follow "to", with as in this case, an optional port number.
  • You have provisioned `to athn0` but i believe you meant `on athn0`, since PF expects the operand following "to" to refer to a host or multiple hosts, not to an interface.
I recommend caution when ever you use `from`, `to`, `in`, and `on` as these limit what traffic matches the rule, and it is easy to make mistakes.

If the intent is to "permit both UDP and TCP traffic from anywhere that uses destination port 5900 to pass in both directions, if the traffic transits through athn0" then this rule should suffice:
Code:
pass on athn0 proto { tcp udp } from any to any port 5900
Reply With Quote