So, I'm probably overcomplicating things but the purpose of this exercise is as much functional as it is educational.
I set up a jail using ezjail for my nameserver and assigned it an IP of 192.168.0.4 on a local loopback interface lo1
The nsd daemon in the jail is running on port 53
I'm trying to have pf port forward port 53 from the external interface to the internal 192.168.0.4.
Internal drill commands on the server work, such as:
drill @192.168.0.4 ANY testdomain.lan
External drill commands to the server do not work:
drill @1.2.3.4 ANY testdomain.lan
Error: error sending query: Could not send or receive, because of network error
My pf.conf looks like this:
Any theories? Do you need more information?
I set up a jail using ezjail for my nameserver and assigned it an IP of 192.168.0.4 on a local loopback interface lo1
The nsd daemon in the jail is running on port 53
I'm trying to have pf port forward port 53 from the external interface to the internal 192.168.0.4.
Internal drill commands on the server work, such as:
drill @192.168.0.4 ANY testdomain.lan
External drill commands to the server do not work:
drill @1.2.3.4 ANY testdomain.lan
Error: error sending query: Could not send or receive, because of network error
My pf.conf looks like this:
Code:
#PUBLIC IP
IP_PUB="1.2.3.4"
IP_JAIL_NSD="192.168.0.4"
ext_if=vtnet0
jail_if="lo1"
NET_JAIL="192.168.0.0/29"
#PACKET NORMALIZATION
scrub in all
#Allow outbound connections from within the jails
nat pass on $ext_if from lo1:network to any -> (vtnet0)
#nameserver jail at 192.168.0.4
rdr pass on $ext_if proto {udp,tcp} from any to $IP_PUB port 53 -> $IP_JAIL_NSD port 53
Any theories? Do you need more information?