I had a perfectly working iptables but after server restart it won't start giving me Setting chains to policy ACCEPT: security raw nat mangle fi[FAILED] error.
I haven't changed anything in /etc/iptables.

I uninstalled iptables yum uninstall iptables and installed it again.

Now it's even worse :( I'm getting:

Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: security raw nat mangle fi[FAILED]
Unloading iptables modules: Opening /proc/modules: No such file or directory
grep: /proc/modules: No such file or directory
Opening /proc/modules: No such file or directory
grep: /proc/modules: No such file or directory

How come /proc/modules is missing now?

I'm using CentOS 5. My iptables rules:

iptables -F INPUT
iptables -F OUTPUT

IPT="iptables"
ALLOWED="
XXX.XXX.XXX.XXX #list of allowed IP addresses
"

$IPT -I INPUT -p tcp --dport 80 -j ACCEPT
$IPT -I INPUT -p tcp --dport 443 -j ACCEPT

$IPT -I INPUT -p tcp --dport 3456 -j ACCEPT

for ip in $ALLOWED
do
    $IPT -I INPUT -p tcp -s $ip -j ACCEPT
done

$IPT -A INPUT -m state --state ESTABLISHED -j ACCEPT

$IPT -A INPUT -p icmp --icmp-type echo-request -m limit --limit 5/s -j ACCEPT

$IPT -A INPUT -i lo -j ACCEPT
$IPT -A OUTPUT -o lo -j ACCEPT

$IPT -A INPUT -p tcp --dport 53 -j ACCEPT
$IPT -A INPUT -p udp --dport 53 -j ACCEPT

What should I do?

link|improve this question

feedback

1 Answer

First check why your /proc/modules is not available ! /proc is it mounted ? remount it if not are you root ? on my Ubuntu, everybody can read /proc/modules. Do you change your kernel before rebooting ? If yes, this new kernel is maybe incomplete (or doesn't support /proc, or the modules). Do you have iptables compiled in kernel or in modules ?

link|improve this answer
Server reboot was due to failed power socket so nothing was changed or installed prior to the reboot. I do have root access. The problem with /proc/modules only appeared when I reinstalled iptables. – 6bytes Jun 30 '10 at 11:05
/proc is mounted mount | grep proc /dev/proc on /proc type proc (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) – 6bytes Jun 30 '10 at 11:12
Do you have the other files in /proc ? If you type 'iptables -L -n -v' is there an answer ? – Dom Jun 30 '10 at 12:14
Lots of files in there iptables -L -n -v Chain INPUT (policy ACCEPT 72824 packets, 42M bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 71056 packets, 86M bytes) pkts bytes target prot opt in out source destination – 6bytes Jun 30 '10 at 12:17
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.