All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bo Jacobsen" <subs@systemhouse.dk>
To: netfilter@lists.netfilter.org
Subject: Redirection to local lan, isn't DNAT method unsafe.
Date: Thu, 1 Apr 2004 10:25:06 +0200	[thread overview]
Message-ID: <002a01c417c2$d94db7e0$de0aa8c0@comp> (raw)
In-Reply-To: 40696C1A.5080400@personalsoft.com.br

I use DNAT to redirect traffic from the external lan eth0 (192.168.1.1) to a
specific host (192.168.10.10) on the internal lan (eth1) like this:

iptables -t nat -A PREROUTING  -p tcp --dport 80  -d 192.168.1.1 -j DNAT 
    --to 192.168.10.10 -i eth0

and then I allow the redirected traffic:
iptables -a FORWARD -p tcp --dport 80  -d 192.168.10.10 ........

It works as expected but with this aproach, it's actually possible from the outside
to find out what internal ip, the http server is located at !.
All one has to do is sending to 192.168.10.1, 192.168.10.2, 192.168.10.3 etc.  (to 
eth0 on the outside) until one hits the server. The rules allows it.

I have not been able to figure out how to solve this problem.


Any suggestions.

Thanks in advance
Bo Jacobsen




  parent reply	other threads:[~2004-04-01  8:25 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 ` Bo Jacobsen [this message]
2004-04-01  8:37   ` Redirection to local lan, isn't DNAT method unsafe Antony Stone
2004-04-01  8:55     ` Bo Jacobsen
2004-04-01  9:05       ` Antony Stone
2004-04-01  9:42         ` Bo Jacobsen
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='002a01c417c2$d94db7e0$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.