From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mattia Martinello Subject: Nat Date: Sun, 08 Sep 2002 22:43:51 +0200 Sender: netfilter-admin@lists.netfilter.org Message-ID: <3D7BB687.6010300@iol.it> 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. I wish to create a nat with masquerading to allow my LAN to access to Internet. I have two LANs: 192.168.1.x and 192.168.2.x. The server wich will make the masquerading has both two LANs with two ethernet card. How I can allow only one LAN to access Internet with ppp0 on the server? I tried these lines, but it doesn't work: iptables -t nat -F POSTROUTING iptables -t nat -A POSTROUTING -j DROP iptables -t nat -A POSTROUTING -s 192.168.1.0/255.255.255.0 -o ppp0 -j MASQUERADE What I can do? Thank you very much Bye Mattia Martinello