есть набор следующих правил ipfw:
#!/bin/sh
fwcmd="/sbin/ipfw"
natdcmd="/sbin/natd"
int_if="rl0"
ext_if="xl0"
${fwcmd} -f flush
${natdcmd} -s -m -u -a 192.168.10.254
${fwcmd} add 10 allow icmp from any to any
${fwcmd} add 304 deny ip from any to 192.168.0.0/16 out via ${ext_if}
${fwcmd} add 305 deny ip from any to 10.0.0.0/16 out via ${ext_if}
${fwcmd} add 306 deny ip from any to 172.16.0.0/12 out via ${ext_if}
${fwcmd} add 308 allow udp from any to 192.168.0.254 8888 via ${int_if}
${fwcmd} add 309 allow udp from 192.168.0.254 to any via ${int_if}
${fwcmd} ad