Page 1 of 1

how to Open SSH and other port in IPtables by default.

Posted: 2006/10/02 19:58:57
by deltamail
IPtables is installed by default in CentOS4.x and when we restart the server we can ssh it block the port 22.
We tried to see the /etc/sysconfig/iptables but there is no such file there is
/etc/sysconfig/iptables-config
We installed apf. But when we start apf we get following error.

iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.11: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.


Can anyone guide how can we open specific port in iptables only.

Kindly suggest.

how to Open SSH and other port in IPtables by default.

Posted: 2006/10/03 13:14:29
by ixeous
You need to use the iptables-save command to save your ruleset. By default, the command will dump the rule list to stdout so you need to redirect it to /etc/sysconfig/iptables-config

# iptables-save > /etc/sysconfig/iptables-config