Hello,
I'm trying to tag http packets to route access based on source IP but it looks like tag doesn't stick.
In /etc/pf.conf, I got this
rdr is working fine but "tagged PRIVATE" rules are never caught. Any help will be greatly appreciated.
I'm trying to tag http packets to route access based on source IP but it looks like tag doesn't stick.
In /etc/pf.conf, I got this
Code:
# === TRANSLATION
no rdr on lo0 from any to any
nat on $ext_if from <public> to any -> ($ext_if)
nat on $ext_if from <private> to any tag PRIVATE -> ($ext_if)
rdr on $ext_if inet proto tcp from <trusted> to ($ext_if) port 80 tag PRIVATE -> $proxy port 81
rdr on $ext_if proto tcp from !<trusted> to ($ext_if) port 80 -> $proxy port 81
# === FILTERING
pass in log quick on $ext_if inet proto tcp from <trusted> to $proxy port 81 tagged PRIVATE
pass in log quick on $ext_if inet proto tcp from any to $proxy port 81
pass in log quick on $int_if inet proto tcp from $proxy to <public> port $webports
pass in log quick on $int_if inet proto tcp from $proxy to <private> port $webports tagged PRIVATE
pass out log on $int_if inet proto tcp from $proxy to <public> port $webports
pass out log on $int_if inet proto tcp from $proxy to <private> port $webports tagged PRIVATE