LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 10-11-2006, 09:33 AM   #1
ce_emre
LQ Newbie
 
Registered: Oct 2006
Posts: 6

Rep: Reputation: 0
how to open 22.port at firewall


I want to use ssh command and i can't use this, so i want to open the 22.port at firewall(using console commands).Please help me.

Thanks...
 
Old 10-11-2006, 10:19 AM   #2
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
/sbin/iptables -A INPUT -p tcp --dport 22 -j ACCEPT

Thats from memory, but that should equate to the following:
Allow incoming
Protocol tcp
destination port 22 (ssh)
Accept

The iptables command should be in /sbin
A few more tips though, you can specify that the incoming ssh clients are from a particular subnet or single IP address to restrict it more. You could sent them to another target (-j) so that they get filtered with more rules. That rule will only exist until you reboot unless you save it.

Last edited by musicman_ace; 10-11-2006 at 10:22 AM.
 
Old 10-11-2006, 12:00 PM   #3
sleepyEDB
Member
 
Registered: Dec 2005
Location: /USA/MI/Detroit/home
Distribution: MEPIS 6.5, Debian Etch & Sarge
Posts: 104

Rep: Reputation: 15
What distro are you running? Are you sure the ssh daemon is installed and/or running?

As root, do a:
Code:
netstat -a | grep LISTEN
and see if ssh shows up in the list of running services.

If not,
Code:
cd /etc/init.d
and see if ssh is listed there.

If not, you'll have to install the openssh-server package. How you do that, depends on your distro...


sleepy
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open port in Cisco PIX firewall aisalen Linux - General 8 12-15-2005 06:51 PM
Open LAN port through FIREWALL pbhat Fedora 2 08-12-2004 12:12 PM
how to open a port in the firewall redhat bosewicht Linux - Newbie 2 12-01-2003 09:15 PM
How to open port 25 in firewall greenranger Linux - Networking 13 03-19-2003 08:04 AM
firewall.rc.config says :"open port 8080" but nmap says port is closed saavik Linux - Security 2 02-14-2002 12:16 PM


All times are GMT -5. The time now is 01:29 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration