is this correct ?
Hi All !
I'm a newbie in iptables.
I have a linux box with ppp connection to internet (dynamic IP), eth0 192.168.0.1 and a Windows box 192.168.0.3 connected to eth0. I strive to allow *everything* from my home network, and disallow anyone to connect to my home network, eg. drop all the incoming connections to my ppp0 interface.
Can anyone say if my config below is correct (/etc/sysconfig/iptables) ? Well, it seems to work as expected, but it is so simple,
may be I'm missing some important security points ?
------
*nat
-A POSTROUTING -o ppp0 -j MASQUERADE
COMMIT
*mangle
COMMIT
*filter
-A INPUT -i ppp0 -p icmp -j ACCEPT
# disabling not established and not related connections -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A INPUT -i ppp0 -j DROP
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
COMMIT
Quoted 3 lines · Aleksandr Guidrevitch
Can anyone say if my config below is correct (
/etc/sysconfig/iptables) ? Well, it seems to work as expected, but it is so simple,
may be I'm missing some important security points ?
You are certainly missing some important security.
Take a look at some of the documentation for netfilter, referenced from the netfilter website, such as Oskar Andreasson's excellent tutorial at
http://iptables-tutorial.frozentux.net/iptables-tutorial.html and pay particular attention to the meaning of the INPUT, FORWARD and OUTPUT chains. Specifically, packets being routed *through* the firewall from your LAN to the Internet (or vice versa) do *not* go through INPUT or OUTPUT.....
Regards,
Antony.
Quoted 20 lines
------
*nat
-A POSTROUTING -o ppp0 -j MASQUERADE
COMMIT*mangle
COMMIT*filter
-A INPUT -i ppp0 -p icmp -j ACCEPT# disabling not established and not related connections(quoted diff) +0
-2-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A INPUT -i ppp0 -j DROP:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]COMMIT
Signature · 6 lines
Anyone that's normal doesn't really achieve much.
- Mark Blair, Australian rocket engineer
Please reply to the list;
please don't CC me.