How to add to and edit iptables
If you're using a firewall on your server, you'll want to edit your IPtables. Here's how you can add new IPs or edit existing ones. Remember port 22 is for ssh and port 21 for FTP.
- vi /etc/sysconfig/iptables
Edit the IPs in /etc/sysconfig/iptables. Then save changes and run this command to commit changes
- service iptables restart
Successful service iptables restart should result in this:
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: [ OK ]
Example of what iptables should look like
Or search google for "example iptables config file"