I have remote FreeBSD server with name server inside jail. My rules are:
Despite having
my dns server is still getting queries from IP addresses on the <blacklist>.
What am I missing here?
Code:
ext_if="em0"
ext_ip="X.X.X.X"
jail_net="10.0.0.0/24"
ns_ip="10.0.0.1"
icmp_types = "echoreq"
table <blacklist> persist file "/etc/pf/blacklist"
table <trusted> persist file "/etc/pf/trusted"
set block-policy drop
set loginterface $ext_if
set skip on { lo0 lo1 lo2 lo3 lo4 lo5 lo6 lo7 lo8 lo9 lo10 }
# nat
nat on $ext_if from $jail_net to any -> ($ext_if)
# jail rdr
rdr on $ext_if proto { tcp, udp } from !<blacklist> to $ext_ip port 53 -> $ns_ip
rdr on $ext_if proto { tcp, udp } from any to $ext_ip port 953 -> $ns_ip
# filtering
block log all
pass in quick from <trusted> to any
block quick from <blacklist> to any
pass in quick proto icmp from any to any
pass in quick on $ext_if inet proto tcp from any to $ext_ip port 22 keep state
pass out quick on $ext_if to any keep state
pass in inet proto udp from any to $ns_ip port 53
pass in inet proto { tcp, udp } from any to $ns_ip port 953
Despite having
Code:
block quick from <blacklist> to any
What am I missing here?