ipfw3nat: kernel NAT without libalias
authorBill Yuan <bycn82@dragonflybsd.org>
Fri, 13 Apr 2018 04:25:53 +0000 (04:25 +0000)
committerBill Yuan <bycn82@dragonflybsd.org>
Fri, 13 Apr 2018 04:25:53 +0000 (04:25 +0000)
commit936e3df8407a4355546904e5115a254b482c5f3a
tree536fdafe3ece73d5fdd99c3e8623569ddadb6a39
parent5945821c55b6616cfcf51bf873f267f1cf67f114
ipfw3nat: kernel NAT without libalias

More than just one address can be configured in each NAT
configuraton and each coming packet will be translated to
one of these addresses randomly.

e.g.
    ipfw3 nat 1 config ip 192.168.1.1 192.168.1.2

A schedule will automatically purge the expired translations.
and its interval can be configure via below sysctl variables.
    net.inet.ip.fw3_nat.udp_timeout
    net.inet.ip.fw3_nat.tcp_timeout
    net.inet.ip.fw3_nat.icmp_timeout
sbin/ipfw3/ipfw3.8
sbin/ipfw3/ipfw3nat.c
sbin/ipfw3/ipfw3nat.h
sys/net/ipfw3_nat/ip_fw3_nat.c
sys/net/ipfw3_nat/ip_fw3_nat.h