[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ip masquerading and kernel 2.4
- To: linux-il(at-nospam)linux.org.il
- Subject: Re: ip masquerading and kernel 2.4
- From: Eran Levy <eranle(at-nospam)netvision.net.il>
- Date: Sun, 11 Mar 2001 00:58:53 +0200
- Delivered-To: linux.org.il-linux-il@linux.org.il
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
Hi mulix,
You can do that simply by:
iptables -P FORWARD ACCEPT
iptables -A FORWARD -i ppp0 -m state --state NEW,INVALID -j REJECT
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
The first line sets up the forwarding allowing you to use
the computer as a gateway, the next blocks any forwards
that come from our internet connection. The third line
enables IP Masquerade for anything going out on ppp0,
and finally the last line actually enables forwarding.
then, if you want to learn iptables I recommend this site:
http://www.linuxhelp.net under the Guides section you'll find how playing
with iptables.
At 00:35 11/03/01 +0200, you wrote:
hello,
would one of the people who have masquerading (or rather, SNAT if your ip
is static) working with kernel 2.4 and iptables please give me a shout and
their firewall script? i'm running into some weird problem here.
thanks in advance!
--
mulix
http://www.advogato.com/person/mulix
linux/reboot.h: #define LINUX_REBOOT_MAGIC1 0xfee1dead
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il
----
Regards,
Eran Levy.
E-mail: eranle@netvision.net.il
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il