LinuxQuestions.org
Visit Jeremy's Blog.
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 02-15-2005, 09:42 AM   #1
HeadNoodle
LQ Newbie
 
Registered: Feb 2005
Location: Grimsby/UK
Distribution: Fedora 3
Posts: 6

Rep: Reputation: 0
Question Help with ssh (possible firewall issue)


Hi,


I'm setting a text only Fedora 3 linux box up and want to enable ssh. I have loaded the sshd service and put in the added the following entries into iptables.

iptables -A INPUT -p TCP -i eth0 -s 0/0 --destination-port 22 -j ACCEPT
iptables -A INPUT -p UDP -i eth0 -s 0/0 --destination-port 22 -j ACCEPT

when doing a port scan remotely on the box port 22 isn't shown as open. Also when using PuTTY on a windows box i get Network error:No route to host. If i connect locally i can connect to ssh with no problem.

This is the first linux box i have attempted to setup so sorry if i am asking a stupid question.

 
Old 02-15-2005, 09:47 AM   #2
nhs
Member
 
Registered: Aug 2003
Location: Edinburgh, Scotland
Distribution: Gentoo
Posts: 246

Rep: Reputation: 30
The most likely problem is that rules are evaluated in order and you appended the rule to the end of the input chain. Any previous rule which DROPs or REJECTs the packet will be executed instead. Use -I INPUT 1 instead of -A INPUT and it should work (also I'm almost certain that SSH doesn't need UDP).
 
Old 02-15-2005, 09:48 AM   #3
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
When you say locally do you mean you are ssh'ing into the machine from the machine? When you try to access the machine remotely are you using an IP address, hostname, domainname? Do you have a router or any other device that may be blocking the connection?
 
Old 02-15-2005, 11:05 AM   #4
HeadNoodle
LQ Newbie
 
Registered: Feb 2005
Location: Grimsby/UK
Distribution: Fedora 3
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks for that nhs, it worked a treat. Didn't think of something as simple as that. Thanks for your help

Yeah Crashed_Again I was ssh'ing into the machine from the machine. As said above nhs' solution worked for me. Thanks for replying to my problem so quickly. I'm sure you will se me on this site quite a bit :P
 
  


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
[SSH] Issue logging in [SSH & Permissions] MD3 Linux - Networking 11 12-10-2006 10:25 AM
NAT- ssh Firewall Issue moejab Linux - Security 3 07-27-2005 05:25 PM
Firewall issue myself_rajat Linux - Networking 3 12-21-2004 01:06 AM
Firewall Issue benhalliday Linux - Software 1 08-06-2004 08:52 AM
ssh issue: /usr/bin/ssh -x -oFallBackToRsh no -l WeNdeL Linux - Software 1 03-04-2003 08:17 PM


All times are GMT -5. The time now is 08:33 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration