View Single Post
  #2   (View Single Post)  
Old 19th April 2012
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,983
Default

Things I can see:
  1. Your "server" macro is set to an address on a 192.158 network. This is close to, but is not part of an RFC 1918 "private network" block: 192.168. I believe this address is either a typo, or you have a improperly configured local network.
  2. Your $ext_if macro is set to lo0. This is a loopback interface. It is not external, so using a macro called "$ext_if" is bound to confuse readers of this configuration file.... including you. Loopback interfaces are entirely virtual, and only used for internal communication between process on the local system. No external communication is ever made in or out of this interface, unless packets are forwarded through it. Your first pass rule does packet forwarding. Well, it would, if ever used. See below.
  3. You have set skip on lo0. There will be no inspection of packets on lo0, so pass/block/match rules for lo0 traffic will not be evaluated. Read along with me from the pf.conf(5) man page:
    Code:
         set skip on <ifspec>
                 List interfaces for which packets should not be filtered.
                 Packets passing in or out on such interfaces are passed as if pf
                 was disabled, i.e. pf does not process them in any way.  This can
                 be useful on loopback and other virtual interfaces, when packet
                 filtering is not desired and can have unexpected effects.  ifspec
                 is only evaluated when the ruleset is loaded; interfaces created
                 later will not be skipped.
  4. Your pass rule does port forwarding ... but the only traffic that could possibly match this rule is locally generated on this system, since the traffic must be on the loopback interface. No external traffic, coming in from any physical NIC, will ever match this rule. And because of the set skip rule, any packets which might match this rule will never be evaluated. This rule, therefore, will never be matched and no packets will ever be forwarded.
  5. You add a block all rule after the pass. Even if the prior pass rule was altered to evaluate to true for some traffic, it would not matter, because this block follows it. Unless quick is used, the last matching rule wins.
  6. The antispoof rules expansion for $ext_if will not be evaluated, due to the set skip.
  7. The second block is blocking pings and other ICMP traffic on your loopback interface. None of these would be evaluated, due to the set skip, and would only evaluate true -- if you didn't have the set skip -- for packets you generate yourself on this system, to the loopback address, such as: $ ping 127.0.0.1. Even if you had a block rule here that made some sort of sense, it wouldn't matter, because of the prior block all already in effect.
  8. The last block rule is from the default pf.conf, and again, matters not at all due to the preceding block all.
Reply With Quote