<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: allow the internet access from LAN using IPTABLES in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/allow-the-internet-access-from-lan-using-iptables/m-p/3758569#M84117</link>
    <description>but I have a very strange problem with this script.&lt;BR /&gt;&lt;BR /&gt;If I run it, my DNS server running on the same machine doesn't work anymore and the server is completely hanging.&lt;BR /&gt;I cannot shutdown the machine, because name server could not be stopped !&lt;BR /&gt;&lt;BR /&gt;knows someone what's wrong and howto solve this problem ?</description>
    <pubDate>Fri, 24 Mar 2006 17:41:46 GMT</pubDate>
    <dc:creator>'chris'</dc:creator>
    <dc:date>2006-03-24T17:41:46Z</dc:date>
    <item>
      <title>allow the internet access from LAN using IPTABLES</title>
      <link>https://community.hpe.com/t5/operating-system-linux/allow-the-internet-access-from-lan-using-iptables/m-p/3758566#M84114</link>
      <description>hi&lt;BR /&gt;&lt;BR /&gt;my network:&lt;BR /&gt;&lt;BR /&gt;internet &amp;amp; ipsec gateway:&lt;BR /&gt;eth0 -&amp;gt; external interface (internet)&lt;BR /&gt;eth1 -&amp;gt; internal interface (LAN)&lt;BR /&gt;&lt;BR /&gt;LAN:&lt;BR /&gt;LOCAL_LAN="192.168.115.0/24"&lt;BR /&gt;&lt;BR /&gt;remote networks:&lt;BR /&gt;REMOTE_LAN1="192.168.0.0/24"&lt;BR /&gt;REMOTE_LAN2="192.168.1.0/24"&lt;BR /&gt;REMOTE_LAN3="192.168.2.0/24"&lt;BR /&gt;&lt;BR /&gt;ipsec works without problems and I can reach remote networks &lt;BR /&gt;from any LAN machine,&lt;BR /&gt;but cannot access the Internet from the LAN machines&lt;BR /&gt;&lt;BR /&gt;what's wrong ?&lt;BR /&gt;&lt;BR /&gt;I'm using this firewall script:&lt;BR /&gt;&lt;BR /&gt;#!/bin/sh&lt;BR /&gt;&lt;BR /&gt;EXT_IF="eth0"&lt;BR /&gt;INT_IF="eth1"&lt;BR /&gt;LOCAL_LAN="192.168.115.0/24"&lt;BR /&gt;REMOTE_LAN1="192.168.0.0/24"&lt;BR /&gt;REMOTE_LAN2="192.168.1.0/24"&lt;BR /&gt;REMOTE_LAN3="192.168.2.0/24"&lt;BR /&gt;IPTABLES="/sbin/iptables"&lt;BR /&gt;&lt;BR /&gt;$IPTABLES -F&lt;BR /&gt;$IPTABLES -t nat -F&lt;BR /&gt;$IPTABLES -t mangle -F&lt;BR /&gt;&lt;BR /&gt;$IPTABLES -P INPUT DROP&lt;BR /&gt;$IPTABLES -P FORWARD DROP&lt;BR /&gt;$IPTABLES -P OUTPUT ACCEPT&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$IPTABLES -A INPUT -p tcp -m multiport --dport 21,22,53,80,443 -i eth0 -j ACCEPT&lt;BR /&gt;$IPTABLES -A INPUT -p udp --dport 53 -i eth0 -j ACCEPT # DNS per udp&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# Mark VPN packets&lt;BR /&gt;$IPTABLES -t mangle -A PREROUTING -i $EXT_IF -p esp -j MARK --set-mark 1 #VPN&lt;BR /&gt;&lt;BR /&gt;$IPTABLES -t nat -A PREROUTING -m state --state RELATED,ESTABLISHED -j ACCEPT&lt;BR /&gt;$IPTABLES -t nat -A PREROUTING -s $REMOTE_LAN1 -i $EXT_IF -m mark --mark 1 -j ACCEPT&lt;BR /&gt;$IPTABLES -t nat -A PREROUTING -s $REMOTE_LAN2 -i $EXT_IF -m mark --mark 1 -j ACCEPT&lt;BR /&gt;$IPTABLES -t nat -A PREROUTING -s $REMOTE_LAN3 -i $EXT_IF -m mark --mark 1 -j ACCEPT&lt;BR /&gt;&lt;BR /&gt;# Spoof protection&lt;BR /&gt;$IPTABLES -t nat -A PREROUTING -d $LOCAL_LAN -i $EXT_IF -j DROP&lt;BR /&gt;&lt;BR /&gt;$IPTABLES -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT&lt;BR /&gt;$IPTABLES -A INPUT -p icmp -j ACCEPT&lt;BR /&gt;$IPTABLES -A INPUT -i $EXT_IF -p udp -m udp --dport 500 -j ACCEPT #VPN&lt;BR /&gt;$IPTABLES -A INPUT -i $EXT_IF -m mark --mark 1 -j ACCEPT&lt;BR /&gt;&lt;BR /&gt;$IPTABLES -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT&lt;BR /&gt;$IPTABLES -A FORWARD -i $EXT_IF -m mark --mark 1 -j ACCEPT&lt;BR /&gt;$IPTABLES -A FORWARD -i $INT_IF -j ACCEPT&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# iptables -V&lt;BR /&gt;iptables v1.2.11&lt;BR /&gt;&lt;BR /&gt;# uname -a&lt;BR /&gt;Linux sarge.stable 2.6.8-2-686 #1 Tue Aug 16 13:22:48 UTC 2005 i686 GNU/Linux&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;chris&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Mar 2006 11:41:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/allow-the-internet-access-from-lan-using-iptables/m-p/3758566#M84114</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2006-03-24T11:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: allow the internet access from LAN using IPTABLES</title>
      <link>https://community.hpe.com/t5/operating-system-linux/allow-the-internet-access-from-lan-using-iptables/m-p/3758567#M84115</link>
      <description>Can you describe your topology a little better, how is connected? Where are REMOTE_LAN1 2 and 3? &lt;BR /&gt;&lt;BR /&gt;Ensure that name resolution is working. Check your clients DNS configuration. I will also suggest the use of squid proxy server to enable access control, cache, and bandwith saving.&lt;BR /&gt;&lt;BR /&gt;I assume that forwarding is enabled because you can reach remote networks.</description>
      <pubDate>Fri, 24 Mar 2006 14:02:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/allow-the-internet-access-from-lan-using-iptables/m-p/3758567#M84115</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2006-03-24T14:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: allow the internet access from LAN using IPTABLES</title>
      <link>https://community.hpe.com/t5/operating-system-linux/allow-the-internet-access-from-lan-using-iptables/m-p/3758568#M84116</link>
      <description>REMOTE_LAN1 2 and 3 are networks on the remote site &lt;BR /&gt;connected via ipsec tunnels.&lt;BR /&gt;&lt;BR /&gt;this machine is a dhcp / dns server as well.&lt;BR /&gt;&lt;BR /&gt;anyway I've found out:&lt;BR /&gt;&lt;BR /&gt;$IPTABLES -t nat -A POSTROUTING -s $LOCAL_LAN -o $EXT_IF -j SNAT --to external_ip_address&lt;BR /&gt;&lt;BR /&gt;greetings&lt;BR /&gt;chris</description>
      <pubDate>Fri, 24 Mar 2006 14:16:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/allow-the-internet-access-from-lan-using-iptables/m-p/3758568#M84116</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2006-03-24T14:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: allow the internet access from LAN using IPTABLES</title>
      <link>https://community.hpe.com/t5/operating-system-linux/allow-the-internet-access-from-lan-using-iptables/m-p/3758569#M84117</link>
      <description>but I have a very strange problem with this script.&lt;BR /&gt;&lt;BR /&gt;If I run it, my DNS server running on the same machine doesn't work anymore and the server is completely hanging.&lt;BR /&gt;I cannot shutdown the machine, because name server could not be stopped !&lt;BR /&gt;&lt;BR /&gt;knows someone what's wrong and howto solve this problem ?</description>
      <pubDate>Fri, 24 Mar 2006 17:41:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/allow-the-internet-access-from-lan-using-iptables/m-p/3758569#M84117</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2006-03-24T17:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: allow the internet access from LAN using IPTABLES</title>
      <link>https://community.hpe.com/t5/operating-system-linux/allow-the-internet-access-from-lan-using-iptables/m-p/3758570#M84118</link>
      <description># Allow loopback-device&lt;BR /&gt;$IPTABLES -A INPUT -i lo -j ACCEPT&lt;BR /&gt;&lt;BR /&gt;solved my problem !</description>
      <pubDate>Wed, 16 Aug 2006 17:59:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/allow-the-internet-access-from-lan-using-iptables/m-p/3758570#M84118</guid>
      <dc:creator>'chris'</dc:creator>
      <dc:date>2006-08-16T17:59:09Z</dc:date>
    </item>
  </channel>
</rss>

