Can firewall and ssh co-exist in RedHat 9.0?
Hi,
In redHat 9.0, When I use ssh to connect another server, it seems the firewall must be stopped. My question is-- Is it possible to use ssh without closing firewall?How? Is the firewall still needed or not if ssh connection is used? Thanks. |
You need to tell to the firewall to open the port 22. Sure red hat has a GUI for that. Anyway the command to do that is:
iptables -A INPUT -i eth0 -m tcp -p tcp -dport 22 -j ACCEPT Please note rebooting clears the firewall config, so I recommend you to use the GUI. |
place this rule at the top of the chain
iptables -I INPUT 1 -i eth0 -m tcp -p tcp -dport 22 -j ACCEPT |
Slight syntax errors in the above rules that will keep them from loading. Should be --dport not -dport, like this:
iptables -I INPUT 1 -i eth0 -m tcp -p tcp --dport 22 -j ACCEPT |
All times are GMT -5. The time now is 03:01 AM. |