Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hi there,
I have a few servers where I want iptables to be disablet. But everytime the server boots iptables are startet!
[root@redhat ~]# chkconfig iptables --list
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
I tried the following without any luck:
chkconfig iptables off
chkconfig --level 2345 iptables off
in what way are they started? What does a "service iptables status" say? if there is no symlink in /etc/rc3.d/ (if you're on runlevel 3) to the iptables service script, then someone on your system has done something abnormal to make it run, IF it is running.
So it is NOT being started on boot. So either something else we can't really speculate on, is happening... er... something in /etc/rc.local maybe?? OR you're maybe not correct in saying the service is starting. Why do you think it is starting?
well im pretty clueless - just tried to reboot again.
[root@redhat rc5.d]# service iptables status
Firewall is stopped.
[root@redhat rc5.d]# chkconfig iptables --list
iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@redhat rc5.d]shutdown -r now
After reboot
[root@redhat ~]# /etc/init.d/iptables status
and yes it was started....
[root@redhat ~]# uptime
14:32:33 up 2 min
nothing in rc.local or inittab containing iptables
Note that the iptables is NOT a service. What that service you're turning on and off is actually a distribution specific configuration wrapper for configuring iptables. starting it will flush out any existing rules and then add all rules defined in /etc/sysconfig/iptables. The netfilter modules which the iptables command interfaces with are not anything to do with this "service" version.
So when the service is still stopped, you may well still have rules in there, and "iptables -vnL" should always work unless you actually unload the netfilter modules, which you should have no reason to do.
You'll probably have an explicit drop / reject at the bottom of the chain, so adding an Accept after it will not achieve anything.
So run "iptables -vnL", do the rules match up with /etc/sysconfig/iptables? (or is it iptables-save?) If possible, I would certainly suggest just improving the rulebase to permit the connection whilst remaining secure, but I've naturally no idea if you're running a good rulebase in the first place to fully advocate adding it in or not.
In terms of advising how to most easily add the new rule in, I would suggest editing that config file directly and restarting the iptables service. It is possible to use something like "service iptables save" to write the config file, but in terms of describing it here, it's much vaguer.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.