Skip to contentSkip to conversation

DNAT possible Bug?

DISCUSSION Jochen Radmacher 2 participants 3 messages Jan 27, 2003

lore
Share & tools
lore
#0 lore raw

I'm using a DNAT- Rule to Forward a Port from my Router to my Server:

iptables -t nat -A PREROUTING -d <outsideip> -p tcp --dport 4000 \
-j DNAT --to 192.168.0.44:80

This works fine when I'm connecting from the outside. But If i try:

[email protected]# lynx <outsideip>:4000
this does not work. Her is the Output from /proc/net/ip_conntrack:

tcp 6 84 SYN_SENT src=192.168.0.44 dst=<outsideip> sport=33474 dport=4000 [UNREPLIED] src=192.168.0.44 dst=192.168.0.44 sport=80 dport=33474 use=1

Jochen

#1 lore raw

Do a quick google for...
"same network" +DNAT +netfilter

I know there was talk of adding this topic to the netfilter FAQ some time ago, since it is something a number of people have trouble with initially, but I don't know if it's in the faq.

Enjoy,

Darrell Dieringer - Madison, WI

Quoted 29 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Jochen Radmacher
Sent: Monday, January 27, 2003 11:13 AM
To: [email protected]
Subject: DNAT possible Bug?

I'm using a DNAT- Rule to Forward a Port from my Router to my Server:

iptables -t nat -A PREROUTING -d <outsideip> -p tcp --dport 4000 \
-j DNAT --to 192.168.0.44:80

This works fine when I'm connecting from the outside. But If i try:

[email protected]# lynx <outsideip>:4000
this does not work. Her is the Output from /proc/net/ip_conntrack:

tcp 6 84 SYN_SENT src=192.168.0.44 dst=<outsideip> sport=33474
dport=4000 [UNREPLIED] src=192.168.0.44 dst=192.168.0.44 sport=80 dport=33474 use=1

Jochen

#2 lore raw

Shame on me... :-[ it's in the HOWTO:
http://www.netfilter.org/documentation/HOWTO/NAT-HOWTO-10.html

Quoted 12 lines · Darrell Dieringer

Do a quick google for...
"same network" +DNAT +netfilter

I know there was talk of adding this topic to the netfilter FAQ some time ago, since it is something a number of people have trouble with initially, but I don't know if it's in the faq.

Enjoy,

Darrell Dieringer - Madison, WI

[..]