LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-08-2004, 12:58 PM   #1
jmg1894
LQ Newbie
 
Registered: Jun 2004
Posts: 16

Rep: Reputation: 0
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
 
Old 07-08-2004, 01:11 PM   #2
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Rep: Reputation: 30
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!
 
Old 07-08-2004, 01:26 PM   #3
jmg1894
LQ Newbie
 
Registered: Jun 2004
Posts: 16

Original Poster
Rep: Reputation: 0
Everything seemed to go through but I am still unable to ssh or ftp. What else am I missing?
 
Old 07-08-2004, 02:23 PM   #4
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Rep: Reputation: 30
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...
 
Old 07-08-2004, 02:30 PM   #5
jmg1894
LQ Newbie
 
Registered: Jun 2004
Posts: 16

Original Poster
Rep: Reputation: 0
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.
 
Old 07-08-2004, 02:42 PM   #6
jeffreybluml
Member
 
Registered: Mar 2004
Location: Minnesota
Distribution: Fedora Core 1, Mandrake 10
Posts: 405

Rep: Reputation: 30
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...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is Allowing SSH Safe? Optimistic Linux - Security 10 03-21-2005 01:58 PM
Allowing Jabber through firewall. TheRealDeal Linux - Security 2 03-19-2005 11:34 PM
firewall not allowing dhcp? sarah_t_s Linux - Networking 2 07-25-2004 08:05 AM
allowing IP traffic on firewall - unsafe? complus Linux - Security 4 09-04-2003 03:57 PM
Allowing for incoming ssh InsaneBob Linux - Software 11 04-12-2003 01:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration