From: Jim Laurino <nfcan.x.jimlaur@dfgh.net>
To: netfilter@lists.netfilter.org
Subject: Re: DNAT problem / question (nfcan: addressed to exclusive sender for this address)
Date: Fri, 18 Jun 2004 12:29:02 -0400 [thread overview]
Message-ID: <20040618162902.GE1243@salty> (raw)
In-Reply-To: <519AD2BA94FC6E4DB5DE078B2E37CB10A76BA5@PDBEX01E.pdb.fsc.net> (from +nfcan+jimlaur+89aa08404c.Bert.Arnauts#fujitsu-siemens.com@spamgourmet.com on Fri, Jun 18, 2004 at 11:45:20 -0400)
On 2004.06.18 11:45, Arnauts Bert - Bert.Arnauts@fujitsu-
siemens.com wrote:
> Hello all,
>
> I am still stuck with my DNAT. I updated the information
> that was requested. Could you please check my config, if
> I execute this I can not ping my internal lan ip of this
> host 172.25.239.208 any more. I think this is really
> wierd. I included all kinds of information, hopefully
> enough for you guys to take a look at.
>
> Cheers,
>
> Bert
>
> $IPTABLES -t nat -A PREROUTING -d 172.25.239.220/27
> -j DNAT --to-destination 11.0.0.16
> $IPTABLES -t nat -A OUTPUT -d 172.25.239.220/27
> -j DNAT --to-destination 11.0.0.16
>
The dest ip address/mask pattern looks odd.
I am not sure how this address matching works,
but the way I imagine it to work is that a mask
is generated and applied to an address to test
and then this is compared to the address given.
That is, I think the address given is not
masked. If this is so, then there might be a
failure to match destination addresses.
I think a /27 mask is meant to select a
contiguous group of 27 addresses, that is
5 bits. I think masking the 5 low bits of
a number like 220 or 208 gives 192 (xC0)
and a rule like .192/27 would match addresses
in the range 192-223 (xC0-xDF),
where .220/27 might match nothing.
Of course, the code might be written another
way, where this would not be a problem.
You could try logging what is happening
or looking at the counts to see if the
rules are matching. I think this will do it:
iptables -L -t nat -nvx
Jim
next prev parent reply other threads:[~2004-06-18 16:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-18 15:45 DNAT problem / question Arnauts, Bert
2004-06-18 16:06 ` Patrick Leslie Polzer
2004-06-18 16:14 ` Antony Stone
2004-06-18 16:06 ` Antony Stone
2004-06-18 16:45 ` Patrick Leslie Polzer
2004-06-18 16:09 ` Rob Sterenborg
2004-06-18 16:29 ` Jim Laurino [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-06-20 22:24 Arnauts, Bert
2004-06-21 4:25 ` DNAT problem / question (nfcan: addressed to exclusive sender for this address) Jim Laurino
2004-06-21 9:14 Arnauts, Bert
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=20040618162902.GE1243@salty \
--to=nfcan.x.jimlaur@dfgh.net \
--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.