Linux Netfilter discussions
 help / color / mirror / Atom feed
From: ro0ot <ro0ot@phreaker.net>
To: netfilter@lists.netfilter.org
Subject: destination nat onto the same network
Date: Thu, 17 Jun 2004 20:18:53 +0800	[thread overview]
Message-ID: <40D18C2D.9030700@phreaker.net> (raw)

Hi all,

I have one webserver inside my LAN but when I try to browse it via the 
hostname (eg. www.example.com) from a workstation inside my LAN, the 
browser can't reach the page.  Why?  From remote (outside), I can browse 
to the website.

Below is a simple diagram of my network: -

INTERNET <-> ROUTER <-> FIREWALL_IPTABLES <-> SWITCH <-> WEBSERVER + 
OTHER_WORKSTATIONS

Here is my simple firewall rules: -

$IPTABLES -P INPUT DROP
$IPTABLES -P FORWARD DROP
$IPTABLES -P OUTPUT DROP

$IPTABLES -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
$IPTABLES -A FORWARD -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
$IPTABLES -A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT

$IPTABLES -t nat -A PREROUTING -i $fwif -p tcp --dport 80 -j DNAT --to 
$webserver_ip

$IPTABLES -t nat -A POSTROUTING -o $fwif -j MASQUERADE

Regards,
ro0ot




             reply	other threads:[~2004-06-17 12:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-17 12:18 ro0ot [this message]
2004-06-17 12:46 ` destination nat onto the same network 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=40D18C2D.9030700@phreaker.net \
    --to=ro0ot@phreaker.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox