From: "Bo Jacobsen" <subs@systemhouse.dk>
To: netfilter@lists.netfilter.org
Subject: Re: Redirection to local lan, isn't DNAT method unsafe.
Date: Thu, 1 Apr 2004 11:42:04 +0200 [thread overview]
Message-ID: <008601c417cd$9900d680$de0aa8c0@comp> (raw)
In-Reply-To: 200404011005.30735.Antony@Soft-Solutions.co.uk
> > > It is normally recommended *not* to do filtering in the nat or mangle
> > > tables, however in this case if you really want to do what you say then
> > > that is the solution.
> > >
> > > iptables -I PREROUTING -t nat -s 192.168.1.0/24 -d 192.168.10.10 -p tcp
> > > --dport 80 -j DROP
> > >
> > > Note the -I which inserts the rule before the prerouting rule you listed
> > > above.
> >
> > Thanks.
> >
> > > however in this case if you really want to do what you say then that is
> > > the solution.
> >
> > Is there another and better way to redirect traffic to the inside ?
>
> Well, DNAT is normally used to map externally-accessible public IPs to real
> internal systems on non-routable 10.x.y.z, 172.16.a.b or 192.168.c.d
> addresses, therefore the problem never arises (since people across the
> Internet can't send packets to the real private addresses even if they knew
> what they were).
>
> There's isn't a "better" way to redirect traffic to other IP addresses,
> however why do you think it's a problem for people to use the "real" address
> instead of the one you're telling them to use. They have access to the
> machine, so why does it really matter which address they use to connect to
> it?
>
> Regards,
>
> Antony.
>
The problem is that many hosts, with this setup, actually is connected to the
internet using a public ip, and beeing able to resolve internal ip-information is not
good.
Bo
next prev parent reply other threads:[~2004-04-01 9:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-30 12:46 Redirecting ports on localhost Fabiano Bonin
2004-03-30 13:00 ` David Cannings
2004-04-01 8:25 ` Redirection to local lan, isn't DNAT method unsafe Bo Jacobsen
2004-04-01 8:37 ` Antony Stone
2004-04-01 8:55 ` Bo Jacobsen
2004-04-01 9:05 ` Antony Stone
2004-04-01 9:42 ` Bo Jacobsen [this message]
2004-04-01 9:55 ` Antony Stone
2004-04-01 12:43 ` Bo Jacobsen
2004-04-01 22:20 ` Unknown, Alistair Tonner
[not found] ` <200404011720.57604.Alistair Tonner <>
2004-04-01 22:52 ` Antony Stone
2004-04-22 3:49 ` Alexander Samad
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='008601c417cd$9900d680$de0aa8c0@comp' \
--to=subs@systemhouse.dk \
--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.