Listing 5: Nameserver rules
# Add input rule for nameserver -> me
ipfwadm -I -a accept -P udp -V 193.78.174.33 -S 193.78.174.34 53 -D
193.78.174.33
# Add input rule for Internet -> nameserver (masqueraded)
ipfwadm -I -a accept -P udp -S 0.0.0.0/0 53 -D 194.109.13.150
# Add input rule for nameserver -> Internet (will masquerade)
ipfwadm -I -a accept -P udp -V 193.78.174.33 -S 193.78.174.34 53 -D 0.0.0.0/0
53
# Add forwarding rules for nameserver
ipfwadm -F -a masquerade -P udp -V 193.78.174.33 -S 193.78.174.34 53 -D
0.0.0.0/0 53
# Add output rule for me -> nameserver
ipfwadm -O -a accept -P udp -V $TRUSTIF -S 193.78.174.33 -D 193.78.174.34 53
# Add output rule for nameserver -> Internet
ipfwadm -O -a accept -P udp -S 194.109.13.150 -D 0.0.0.0/0 53
# Add output rule for Internet -> nameserver (masqueraded)
ipfwadm -O -a accept -P udp -V 193.78.174.33 -S 0.0.0.0/0 53 -D 193.78.174.34 53
|