Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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 ?

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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