Allowing ssh ftp through the firewall
I have a new install of RedHat 9.0 and I believe I blocked myself from being able to ssh and ftp to this new server. How do I reconfigure the firewall to allow ssh and ftp? During the setup I choose the middle setting for the firewall config. thanks
|
Here you go...just do this...
# /sbin/iptables -A INPUT -j ACCEPT -m state --state NEW -p tcp --dport 22 --syn do that as root, and it'll open up port 22, which is the port used for ssh/ftp. Add the following line to /etc/sysconfig/network to stop the scripts from modifying your custom firewall: FIREWALL_MODS=no Finally you save your firewall configuration to /etc/sysconfig/iptables and enable it with: # /sbin/service iptables save # /sbin/chkconfig iptables on Now you should be good to go... Thanks go to LQ member hazza for this info... Good luck! |
Everything seemed to go through but I am still unable to ssh or ftp. What else am I missing?
|
Whatkind of response are you getting when you try? Is this just an authentication problem, or indeed related to the firewall?
Please post the response you get when trying to ssh into your machine... |
I get no response when I try to ftp or ssh. Just a timeout. I'm only assuming its a firewalll setting. I use lokkit but it never saves my settings and is always on the highest settting when I go back and check it.
|
Are you behind a router? Also, are you sure sshd is running? you might want to try
/sbin/service sshd start to make sure it's running. If you are behind a router, you'll need to forward port 22 from your router to the box running ssh. Otherwise, I'm just about out of ideas...aside from checking /var/log/messages for info regarding this... |
All times are GMT -5. The time now is 08:00 PM. |