[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: iptables :( internet



Hello

Adrian Berardi (<adrian@datashare.com.ar>) wrote:

> Hi, i just installed debian & dhcp3.
> Im experiencing trouble configuring the iptables for using this box in
> a home network to acces internet.
> Some friend gave me this file and told me to execute
> "/etc/init.d/iptables load active". Withopu results.

What file? Is there anything attached to your message that I cannot see?

To make the iptables init script work, you have to configure your rules
and save them with /etc/init.d/iptables save active. Or you copy a file
containing the output of iptables-save on a properly configured system
to /var/lib/iptables/active. Then you can use /etc/init.d/iptables
start or /etc/init.d/iptables load active (that's the same).

You probably need at least to use two rules like these to make it work
(assuming ppp0 is the internet interface and eth0 is the local one).

iptables -A FORWARD -i ppp0 -o eth0 -m state --state RELATED,ESTABLISHED
-j ACCEPT
iptables -A FORWARD -i eth0 -o ppp0 -j ACCEPT

And don't forget to set /proc/sys/net/ipv4/ip_forward to 1.

To find out more on how iptables is configured to work as a gateway,
read the iptables howto:

<http://www.netfilter.org/unreliable-guides/packet-filtering-HOWTO/>

Or do a search on the web, there is plenty of information available. Try
masquerading iptables as keywords.

best regards
        Andreas Janssen

-- 
Andreas Janssen
andreas.janssen@bigfoot.com
PGP-Key-ID: 0xDC801674
Registered Linux User #267976



Reply to: