From mboxrd@z Thu Jan 1 00:00:00 1970 From: ro0ot Subject: destination nat onto the same network Date: Thu, 17 Jun 2004 20:18:53 +0800 Sender: netfilter-admin@lists.netfilter.org Message-ID: <40D18C2D.9030700@phreaker.net> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Content-Type: text/plain; charset="us-ascii"; format="flowed" To: netfilter@lists.netfilter.org 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