LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to open the port 22 (ssh)? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-open-the-port-22-ssh-176277/)

dicou 04-30-2004 05:51 AM

How to open the port 22 (ssh)?
 
hi,
i've a question,
how can i open the port 22?
i'm a newbie, so can you explain very slowly please...
where can i do the iptables commands?
i know i have to do that : iptable -I INPUT -i eth0 -p tcp --dport 22 -j ACCEPT,
but i dont know how can i do it.
So plizz help.
I have a router modem and no firewall.
thx ;-)

dominant 04-30-2004 06:55 AM

Give #iptable -I INPUT -i eth0 -p tcp --dport 22 -j ACCEPT

Hexa 04-30-2004 10:40 AM

if your system is secured with iptables, and you are using a DROP policy:

iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
iptables -A OUTPUT -i eth0 -p tcp --sport 22 -j ACCEPT

Mathieu 04-30-2004 08:00 PM

Quote:

I have a router modem and no firewall.
If the firewall on your router is not active, than you will have to open port 22 (sshd) using the above mentioned command.
But first take a look at your iptables rules. It may already be open.

To do that, open a terminal window (console... command line).
To create, modify or remove rules, you have to be root.
Type the following command and enter the root password:
Code:

su -
To view your iptables rules, type:
Code:

iptables -vL

dicou 05-02-2004 12:37 PM

are you sure the command is 'iptables'?
because i have this :

root>iptable -vL
iptable: Command not found.


root>iptables -vL
iptables: Command not found.

so i don't understand.... :newbie:
:Pengy: :Pengy: :Pengy: :Pengy: :Pengy:
thx ;-)

Hexa 05-02-2004 01:12 PM

Maybe you don't have it installed. Or maybe you are using ipchains.
Which distro do you use?


All times are GMT -5. The time now is 09:19 PM.