blob: badec5edb3fd8c914f82aeb5b144409833f3739c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
Miscellaneous NAT Configuration Tips
Don't forget to add "net.inet.ip.forwarding=1" to /etc/sysctl.conf or NAT will
not work. NAT requires IP packet forwarding.
Don't forget to add "option IPFILTER" (and maybe "option IPFILTER_LOG"
if you want ipmon(8) to work) to the kernel config file or NAT will
not work. NAT requires the IPF packet filter.
You must have IPF enabled even if you aren't using it for anything or
NAT will not work. The standard way to do this is to make sure
/etc/ipf.rules is installed and edit /etc/rc.conf changing
"ipfilter=NO" to "ipfilter=YES" then reboot.
When you bring up NAT it needs the interface to have an address. If you are
using the ppp0 interface unless you start pppd from /etc/rc you cannot start
NAT there. Instead, in the /etc/ppp/ip-up shell script add
/sbin/ipnat -CF -f /etc/ipnat.rules
to start NAT when the link comes up and the interface has an address.
|