diff options
author | piso <piso@FreeBSD.org> | 2006-12-29 21:59:17 +0000 |
---|---|---|
committer | piso <piso@FreeBSD.org> | 2006-12-29 21:59:17 +0000 |
commit | 0db606a3b135b207a944e841f0142c30f4f43ceb (patch) | |
tree | 69ec3c3af60d727edf88005d9af7a9beb78e73fe /sys/netinet/raw_ip.c | |
parent | d392a291a28a8cbedf2cc9398d4a03c8467d8c3d (diff) | |
download | FreeBSD-src-0db606a3b135b207a944e841f0142c30f4f43ceb.zip FreeBSD-src-0db606a3b135b207a944e841f0142c30f4f43ceb.tar.gz |
Summer of Code 2005: improve libalias - part 2 of 2
With the second (and last) part of my previous Summer of Code work, we get:
-ipfw's in kernel nat
-redirect_* and LSNAT support
General information about nat syntax and some examples are available
in the ipfw (8) man page. The redirect and LSNAT syntax are identical
to natd, so please refer to natd (8) man page.
To enable in kernel nat in rc.conf, two options were added:
o firewall_nat_enable: equivalent to natd_enable
o firewall_nat_interface: equivalent to natd_interface
Remember to set net.inet.ip.fw.one_pass to 0, if you want the packet
to continue being checked by the firewall ruleset after being
(de)aliased.
NOTA BENE: due to some problems with libalias architecture, in kernel
nat won't work with TSO enabled nic, thus you have to disable TSO via
ifconfig (ifconfig foo0 -tso).
Approved by: glebius (mentor)
Diffstat (limited to 'sys/netinet/raw_ip.c')
-rw-r--r-- | sys/netinet/raw_ip.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index c6900b2..51fe333 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -389,6 +389,8 @@ rip_ctloutput(struct socket *so, struct sockopt *sopt) case IP_FW_GET: case IP_FW_TABLE_GETSIZE: case IP_FW_TABLE_LIST: + case IP_FW_NAT_GET_CONFIG: + case IP_FW_NAT_GET_LOG: /* * XXXRW: Isn't this checked one layer down? Yes, it * is. @@ -458,6 +460,8 @@ rip_ctloutput(struct socket *so, struct sockopt *sopt) case IP_FW_TABLE_ADD: case IP_FW_TABLE_DEL: case IP_FW_TABLE_FLUSH: + case IP_FW_NAT_CFG: + case IP_FW_NAT_DEL: /* * XXXRW: Isn't this checked one layer down? */ |