View previous topic :: View next topic |
Author |
Message |
JOS654 Tux's lil' helper
Joined: 15 Nov 2003 Posts: 101 Location: Spain - Malaga
|
Posted: Thu Oct 14, 2004 5:14 pm Post subject: problem with iptables init script |
|
|
well i`m having problems trying to setting up the init script for iptables when i try to initialise it i get this:
root@Bahamut pepe # /etc/init.d/iptables start
* Loading iptables state and starting firewall...
* Restoring iptables ruleset
iptables-restore: line 2 failed
so i search a little more and the problem is with the iptables-restore binary that gives me the following error:
iptables-restore /var/lib/iptables/rules-save -v
iptables-restore: line 1 failed
i tried to comment the first and second and third line but i get the same error
my /var/lib/iptables/rules-save:
root@Bahamut root # cat /var/lib/iptables/rules-save
iptables -F
iptables -t nat -F
iptables -A INPUT -s 127.0.0.1 -j ACCEPT
iptables -A INPUT -i eth0 -p TCP --dport 2664 -j ACCEPT
iptables -A INPUT -i eth0 -p ICMP --icmp-type 8 -j DROP
iptables -A INPUT -i eth0 -p ICMP --icmp-type 0 -m limit --limit 1/s -j ACCEPT
iptables -A INPUT -p icmp -m limit --limit 1/s -j ACCEPT
iptables -A INPUT -p TCP -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -p UDP -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -m state --state NEW,INVALID -j DROP
iptables -P INPUT DROP
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
kernel 2.6.8-gentoo iptables v1.2.11
P.D. yes i have /proc/sys/net/ipv4/all/forwarding 1
P.D.D. seems that i can manually configure iptables so the kernel looks well configured |
|
Back to top |
|
|
splooge l33t
Joined: 30 Aug 2002 Posts: 636
|
Posted: Thu Oct 14, 2004 5:56 pm Post subject: |
|
|
Heh. =)
Those rules are meant to be put into a script or run directly, not put into the iptables-save file.
After your rules are loaded, then type '/etc/init.d/iptables save' ... that will populate the iptables-save file appropriately. _________________ http://get.a.clue.de |
|
Back to top |
|
|
JOS654 Tux's lil' helper
Joined: 15 Nov 2003 Posts: 101 Location: Spain - Malaga
|
Posted: Thu Oct 14, 2004 8:46 pm Post subject: |
|
|
arf
i spent 5 hours yesteardy trying things to solve this
thanks you very much |
|
Back to top |
|
|
|