Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
problem with iptables init script
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
JOS654
Tux's lil' helper
Tux's lil' helper


Joined: 15 Nov 2003
Posts: 101
Location: Spain - Malaga

PostPosted: Thu Oct 14, 2004 5:14 pm    Post subject: problem with iptables init script Reply with quote

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
View user's profile Send private message
splooge
l33t
l33t


Joined: 30 Aug 2002
Posts: 636

PostPosted: Thu Oct 14, 2004 5:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
JOS654
Tux's lil' helper
Tux's lil' helper


Joined: 15 Nov 2003
Posts: 101
Location: Spain - Malaga

PostPosted: Thu Oct 14, 2004 8:46 pm    Post subject: Reply with quote

arf :lol:
i spent 5 hours yesteardy trying things to solve this :cry:
thanks you very much :P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum