LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-19-2005, 12:57 AM   #1
adamliu
LQ Newbie
 
Registered: May 2005
Posts: 1

Rep: Reputation: 0
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.
 
Old 05-19-2005, 02:16 AM   #2
mcosta
Member
 
Registered: Jan 2005
Location: Spain
Distribution: Debian
Posts: 44

Rep: Reputation: 16
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.
 
Old 05-20-2005, 03:55 AM   #3
ilnli
Member
 
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 413

Rep: Reputation: 32
place this rule at the top of the chain

iptables -I INPUT 1 -i eth0 -m tcp -p tcp -dport 22 -j ACCEPT
 
Old 05-20-2005, 10:10 AM   #4
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
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

Last edited by Capt_Caveman; 05-20-2005 at 10:12 AM.
 
  


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
rc.firewall didnt exist.. slazer Slackware 6 10-31-2005 01:35 AM
Why does Redhat 9 search for drives that dont exist during bootup? glenn69 Linux - Newbie 9 08-12-2004 01:48 PM
Does it exist a secure POP or IMAP or SSH that can be used by outlook express? Bjorkli Linux - Networking 1 05-28-2004 03:08 AM
pdbedit does not exist in redhat asp55 Linux - Networking 1 12-28-2003 01:42 PM
RH7.2 , VNC & Firewall - can they co-exist ? RedHat123 Linux - Networking 1 09-02-2002 09:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:05 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