From: Tom Fischer <tom.fischer@ebuz.de>
To: netfilter@lists.netfilter.org
Subject: Re: DNAT-Problem
Date: Thu, 9 Sep 2004 12:29:31 +0200 [thread overview]
Message-ID: <20040909122931.3e8b4903@nixe> (raw)
In-Reply-To: <1094696804.1739.7.camel@wolfpack.ljm.dom>
On Wed, 08 Sep 2004 22:26:44 -0400
Jason Opperisano <opie@817west.com> wrote:
> On Wed, 2004-09-08 at 22:10, Tom Fischer wrote:
> > Hi,
> >
> > i have a problem with DNAT. We have to move some services for a few
> > days on another machine. So we want do DNAT on incoming Packets. I
> > set
> >
> > iptables -A PREROUTING -t nat -s 0/0 -d xxx.xxx.xxx.xxx -p tcp
> > --dport 9000-j DNAT --to xxx.xxx.xxx.xxx
>
> since you didn't provide your rules, i'm gonna haveta ask a really
> stupid question...
>
> did you execute that command with the old DNAT rule in place? if
> so--the new rule got appended to the end of the PREROUTING chain of
> the nat table, after the old rule; therefore, will never get matched.
>
> it would be helpful for us list-types to see the output of:
>
> iptables -t nat -vnL
This is the only rule.
[root@server4 root]# iptables -t nat -vnL
Chain PREROUTING (policy ACCEPT 645K packets, 35M bytes)
pkts bytes target prot opt in out source
destination 2 120 DNAT tcp -- * *
0.0.0.0/0 oldmachine tcp dpt:9000 to:newmachine
Chain POSTROUTING (policy ACCEPT 62473 packets, 3966K bytes)
pkts bytes target prot opt in out source
destination
Chain OUTPUT (policy ACCEPT 62441 packets, 3964K bytes)
pkts bytes target prot opt in out source
destination
>
> another thought--NAT happens first (PREROUTING), then filter rules.
> you will need to edit your filter rule to allow traffic to
> "newserver's" actual IP instead of "oldserver's" actual IP.
>
There are no Filterrules installed at the moment.
Tom
next prev parent reply other threads:[~2004-09-09 10:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-09 2:10 DNAT-Problem Tom Fischer
2004-09-09 2:26 ` DNAT-Problem Jason Opperisano
2004-09-09 10:29 ` Tom Fischer [this message]
2004-09-09 11:38 ` DNAT-Problem Jason Opperisano
2004-09-09 11:58 ` DNAT-Problem Tom Fischer
2004-09-09 13:26 ` DNAT-Problem Jason Opperisano
2004-09-09 14:13 ` DNAT-Problem Tom Fischer
2004-09-09 8:44 ` DNAT-Problem Abdul-Wahid Paterson
-- strict thread matches above, loose matches on Subject: below --
2004-05-02 10:20 DNAT-PROBLEM persaie persaie
2004-05-02 17:19 ` DNAT-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=20040909122931.3e8b4903@nixe \
--to=tom.fischer@ebuz.de \
--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.