Помогите разобраться с IPFW -NAT -redirect_address (FreeBSD 6.4-RELEASE)
Код: Выделить всё
ifconfig
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
inet xxx.xxx.xxx.20 netmask 0xffffffxx broadcast xxx.xxx.xxx.23
inet xxx.xxx.xxx.18 netmask 0xffffffff broadcast xxx.xxx.xxx.18
ether 00:03:47:32:dc:0e
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
Код: Выделить всё
1 allow ip from any to any via em1
2 divert 8668 ip from any to xxx.xxx.xxx.18 in via em0
3 skipto 160 ip from 192.168.5.7 to any out via em0
4 allow ip from me to any out via em0
.
.
.
100 deny log logamount 1000 ip from any to any via em0
160 divert 8668 ip from 192.168.5.7 to any out via em0
165 allow ip from any to any
Код: Выделить всё
log
same_ports yes
use_sockets yes
port 8668
interface em0
redirect_address 192.168.5.7 xxx.xxx.xxx.18
На 192.168.5.7
Код: Выделить всё
netstat -an | grep 25
tcp4 0 0 *.25 *.* LISTEN