From: "Chen Ding" <ding@packetlink.com>
To: netfilter@lists.netfilter.org
Subject: NAT Forwarding Problem
Date: Mon, 16 Sep 2002 13:22:40 -0500 [thread overview]
Message-ID: <001201c25dae$0d31dee0$6501a8c0@JCC> (raw)
[-- Attachment #1: Type: text/plain, Size: 2740 bytes --]
Hi All,
I have encountered a wiered (or maybe a stupid) problem with iptables NAT forwarding.
----------------------------------------------------------------------------------------------------------------------------------------------------------
Settings:
----------------------------------------------------------------------------------------------------------------------------------------------------------
I have four machines in the setting:
Machine A: 192.168.1.81 RedHat 7.3
Machine B: 192.168.1.17 RedHat 7.3
Machine C: 192.168.1.101 Microsoft XP
Machine D: An public IP address RedHat 7.3
On Machine A, I have just one Rule:
iptables -t nat -A PREROUTING -d 192.168.1.81 -j DNAT --to-destination 192.168.1.17
On Machine A, B, and D, ipchains were disabled, iptables were enabled. Running rpm -q iptables gave me:
iptables-1.2.5-3
On Machine B/D, no rules were set, defauled to accept all.
-----------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Problems:
-----------------------------------------------------------------------------------------------------------------------------------------------------------
pings:
1. Machine C to ping 192.168.1.81: OK (should actually ping 192.168.1.17)
2. Machine C to ping 192.168.1.17: OK
3. Machine A to pring 192.168.1.17: OK
telnet:
1. Machine C to telnet 192.168.1.17: OK
2. Machine A to telnet 192.168.1.17: OK
3. Machine C to telnet 192.168.1.81: No response
According to the rule, when Machine C telneting Machine A, Machine A should forward packets to Machine B, resulting in telneting Machine B. If use netstat, it did tell us that Machine A forwarded several packets.
However, if I change the rule on Machine A to forward all packets to Machine D, everything works just fine. Machine C can telnet Machine A, which ends up telneting Machine D.
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Having struggled for several days, I am desperate!!!!!!!!! Your help is GREATLY appreciated!
My questions are:
1. Is there anything wrong in my understanding of iptables?
2. Anything wrong in the setting?
Thanks!
Chen Ding
[-- Attachment #2: Type: text/html, Size: 6686 bytes --]
next reply other threads:[~2002-09-16 18:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-16 18:22 Chen Ding [this message]
2002-09-16 19:27 ` NAT Forwarding Problem Antony Stone
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001201c25dae$0d31dee0$6501a8c0@JCC' \
--to=ding@packetlink.com \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox