All of lore.kernel.org
 help / color / mirror / Atom feed
* destination nat onto the same network
@ 2004-06-17 12:18 ro0ot
  2004-06-17 12:46 ` Antony Stone
  0 siblings, 1 reply; 2+ messages in thread
From: ro0ot @ 2004-06-17 12:18 UTC (permalink / raw)
  To: netfilter

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-06-17 12:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-17 12:18 destination nat onto the same network ro0ot
2004-06-17 12:46 ` Antony Stone

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.