All of lore.kernel.org
 help / color / mirror / Atom feed
From: Old Cowhand <oldcowhanddoug@yahoo.com>
To: netfilter@lists.netfilter.org
Subject: DNAT question
Date: Thu, 11 Mar 2004 18:14:55 -0800 (PST)	[thread overview]
Message-ID: <20040312021455.35089.qmail@web21323.mail.yahoo.com> (raw)

Hello everyone--

I have what should be a simple configuration for
proxy, but it doesn't seem to work, and I don't know
why.  I've reproduced the problem in multiple
locations with different 2.4 kernels.  Here's the test
layout in ASCII (I hope you're using monospaced
fonts!):

                                   |--Web server
       eth0                   eth1 |  192.168.64.15/24
PC---------------Linux 2.4.19-------
172.16.1.2/30    172.16.1.1/30     |
                 192.168.64.1/24   |--Web server
                                      192.168.64.5/24

My DNAT rule:

iptables -t nat -A PREROUTING -s 172.16.1.2 -d
192.168.64.5 -p tcp --dport 80 -j DNAT --to
192.168.64.15

In tcpdump, I see the HTTP request come from the PC
with a destination of .5 on eth0.  I see the DNAT rule
match in iptables -L -n -v -t nat.  I see the HTTP
request go on eth1 to .15 (DNAT rule works).  I see
the HTTP server at .15 reply to 172.16.1.2 on eth1. 
The data is dropped and never returned after that. 
The reply never appears on eth0.

ip_conntrack shows SYN_SENT [UNREPLIED] on that
connection.

A few notes:

1) The PC can talk directly to .15's Web server with
no problems.  Routing is just fine.

2) If I configure .5 on the Linux box and ditch the
second Web server, everything works normally.

3) The DNAT rule is the ONLY iptables rule in place.

4) I have no dynamic routing, proxy arp, route filters
or other configurations in place.  It's simple static
routing.

I'm stumped.  Ultimately, I want to be able to take IP
addresses for my customers and point any Web requests
to a server that returns a page saying "Sorry, you
didn't pay your bill."  That's why #2 above won't work
for me in the long run.

Does anyone have any ideas?

Thanks in advance,

Doug

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com


             reply	other threads:[~2004-03-12  2:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-12  2:14 Old Cowhand [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-02-14 20:48 dnat question James Edward Stickland
2006-02-15  0:23 ` Edmundo Carmona
2005-10-07  3:32 Gene Dellinger
2004-06-14 17:05 DNAT question Arnauts, Bert
2004-06-14 14:35 Arnauts, Bert
2004-06-14 14:51 ` Antony Stone
2004-06-14 15:12 ` John A. Sullivan III
2004-06-15 11:40 ` John A. Sullivan III
2004-02-23 21:23 dnat question John Black
2004-02-24  4:18 ` John A. Sullivan III
2004-02-25 15:48   ` Antony Stone
2004-02-24  8:56 ` Antony Stone
     [not found] <3F1FDDFB.469242E1@goyaike.com>
2003-07-24 14:15 ` DNAT question Chris Wilson
2003-07-25  2:41   ` Rio Martin.
2003-07-24  7:00 Rio Martin.
2003-07-24  8:29 ` Philip Craig
2003-07-24  8:56   ` Rio Martin.
2003-07-24  9:42     ` Chris Wilson
2003-07-24 13:37       ` Gonzalez, Federico
2003-07-24 14:16         ` Cedric Blancher

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=20040312021455.35089.qmail@web21323.mail.yahoo.com \
    --to=oldcowhanddoug@yahoo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.