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

Support for security such as Firewalls and securing linux
Post Reply
deltamail
Posts: 16
Joined: 2006/10/02 19:50:39

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

Post by deltamail » 2006/10/02 19:58:57

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.

ixeous
Posts: 113
Joined: 2005/07/07 13:01:59

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

Post by ixeous » 2006/10/03 13:14:29

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

Post Reply

Return to “CentOS 4 - Security Support”