Why the behavior of LOCAL OUTPUT DNAT changes?
My System is Fedora Core 3.
When I use two different kernel, things happend like this:
#iptables --version
iptables v1.3.0
*******************************************************************************
#uname -r
2.6.9-1.667
#iptables -F
#iptables -t nat -F
#iptables -t nat -I OUTPUT -j DNAT -p tcp --to-destination 127.0.0.1:10000
#
[1] 3487
#listening on [any] 10000 ...
#nc 1.2.3.4 5678&
connect to [127.0.0.1] from cocteau.hellwolf-misty.org [127.0.0.1] 32774
#netstat -tn
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address
State
tcp 0 0 172.16.7.93:32777 1.2.3.4:5678
ESTABLISHED
tcp 0 0 127.0.0.1:10000 127.0.0.1:32777
ESTABLISHED
*******************************************************************************
#uname -r
2.6.11-1.27_FC3
#iptables -F
#iptables -t nat -F
#iptables -t nat -I OUTPUT -j DNAT -p tcp --to-destination 127.0.0.1:10000
#nc -lvvvv -p 10000&
[2] 4661
#listening on [any] 10000 ...
#nc 1.2.3.4 5678&
[3] 4662
#
[3]+ Exit 1 nc 1.2.3.4 5678
And why?
Quoted 7 lines
#nc 1.2.3.4 5678&
[3] 4662
#
[3]+ Exit 1 nc 1.2.3.4 5678And why?
Looks like CONFIG_IP_NF_NAT_LOCAL is not activated.
However, beginning with 2.6.11 ..NAT_LOCAL as a #define symbol does not exist anymore and is always set to yes.
Jan Engelhardt
Signature · 2 lines
| Gesellschaft fuer Wissenschaftliche Datenverarbeitung Goettingen, | Am Fassberg, 37077 Goettingen, www.gwdg.de