Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 19/20 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 27th August 2012, 06:44 AM
siegfried Offline
Registered User
 
Join Date: Nov 2005
Posts: 53
windows_7firefox
Ping & sshd works, ssh does not. Iptables port closed?

I'm using virtual box 4.1.20 on a windows 7 host and fedora 17 guest. Windows can ping fedora and fedora can ping windows.

sshd is running on fedora because I "ssh 127.0.0.1" works. However, cygwin ssh on windows times out.

I've been experiment with different network adapaters and discovered that if I use the "NAT" adapter, I can "yum install emacs" and that worked.

So, I think I need to open up port 22 for ssh to get in. Can someone give me the commands to open the ssh port (22 I think?) so I can use ssh to transfer files?

I tried using samba, but I'm guess that does not work for the same reason.

I think I need to run some iptables command... Can someone guide me please?

Thanks
Siegfried
Reply With Quote
  #2  
Old 27th August 2012, 07:51 AM
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,765
linuxfirefox
Re: Ping & sshd works, ssh does not. Iptables port closed?

Use the gui tool. system-config-firewall
The check the sshd server port 22 tcp tag and hit the 'apply' button or whatever it's called.
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
  #3  
Old 27th August 2012, 07:58 PM
siegfried Offline
Registered User
 
Join Date: Nov 2005
Posts: 53
windows_7firefox
Re: Ping & sshd works, ssh does not. Iptables port closed?

Thanks. Port 22 is already checked in the gui tool you mentioned and cygwin ssh still says the same thing: "ssh: connect to host 192.168.1.119 port 22: Connection time out".

I can ping both ways....

What could be wrong? Why is cygwin ssh timing out?

What else can I check?

:ssh siegfried@192.168.1.119" from the fedora guest to itself works fine!

Arggghhh! this is fustrating!

Thanks for the prompt responses so far!

Siegfried
Reply With Quote
  #4  
Old 27th August 2012, 08:26 PM
PabloTwo Online
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 6,080
linuxchrome
Re: Ping & sshd works, ssh does not. Iptables port closed?

When I setup ssh/sshd on my F16 laptop so I could ssh into it from my dekstop pc, besides allowing port 22 in the firewall on the laptop, I discovered I also had to "allow" the network device on that port (for that network service actually) before I could connect to the laptop. In the case of my laptop, connected via wireless, that was network device em2. I configured that via the console based firewall (system-config-firewall-tui). I don't know where in the GUI firewall config app you do that.

---------- Post added at 03:26 PM ---------- Previous post was at 03:09 PM ----------

Here's what the firewall config file looks like on my laptop after setting both the wired and wireless LAN ports to "trusted" via the console firewall configuration utility.
Code:
[paul@CarCrusher ~]$ sudo cat /etc/sysconfig/system-config-firewall
# Configuration file for system-config-firewall

--enabled
--trust=eth+
--trust=wlan+
--service=ssh
By default, no network device is trusted, so attempts to ssh into the machine are blocked, even though sshd is running and port 22 is open.

Last edited by PabloTwo; 27th August 2012 at 08:37 PM.
Reply With Quote
  #5  
Old 27th August 2012, 08:35 PM
Bazu135 Offline
Registered User
 
Join Date: Aug 2011
Location: Luton, UK
Age: 28
Posts: 291
linuxfirefox
Re: Ping & sshd works, ssh does not. Iptables port closed?

I had a similar problem between two of my Fedora machines - everything else connected without issues, but one pair had problems, and only one way between them.

In the end, I got exasperated enough that I disabled the server machine's firewall completely, which allowed me to connect. After that, I signed out, re-enabled the firewall, and tried again - and it worked! Not sure what the issue was, but it's worked fine since
__________________
I generally use two tools - trial and error. They fix most things eventually!
Reply With Quote
  #6  
Old 27th August 2012, 10:19 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,814
linuxfirefox
Re: Ping & sshd works, ssh does not. Iptables port closed?

Check the sshd configuration file /etc/ssh/sshd_config and make sure the entry for "ListenAddress" is 0.0.0.0.

That is the default, but if it got set to 127.0.0.1 then it will work for loopback, but not for anything else.
Reply With Quote
  #7  
Old 28th August 2012, 10:20 PM
siegfried Offline
Registered User
 
Join Date: Nov 2005
Posts: 53
windows_7firefox
Re: Ping & sshd works, ssh does not. Iptables port closed?

Shucks! Same error from cygwin ssh client: timeout! I tried Pablo's suggestion and jpollard's suggestion. Now what? Can someone guide me in turning off the firewall completely as Bazu suggested?

Thanks!
Siegfried
Reply With Quote
  #8  
Old 28th August 2012, 11:08 PM
Bazu135 Offline
Registered User
 
Join Date: Aug 2011
Location: Luton, UK
Age: 28
Posts: 291
linuxfirefox
Re: Ping & sshd works, ssh does not. Iptables port closed?

I just did it through the GUI (system-config-firewall) - there's a big red 'disable' button at the top
__________________
I generally use two tools - trial and error. They fix most things eventually!
Reply With Quote
  #9  
Old 29th August 2012, 12:09 AM
Doug G Offline
Registered User
 
Join Date: Jul 2005
Posts: 640
windows_7chrome
Re: Ping & sshd works, ssh does not. Iptables port closed?

I just checked that I could ssh from cygwin to another 192.168.0.x computer on my LAN. One probably dumb question, is your windows host IP on the same network as your virtual box fedora? With KVM anyway, unless you specifically set up a bridged network connection , the VM network isn't accessible from the host network.
__________________
======
Doug G
======
Reply With Quote
  #10  
Old 29th August 2012, 09:23 PM
siegfried Offline
Registered User
 
Join Date: Nov 2005
Posts: 53
windows_7firefox
Re: Ping & sshd works, ssh does not. Iptables port closed?

[/COLOR]
Quote:
Originally Posted by Bazu135 View Post
I just did it through the GUI (system-config-firewall) - there's a big red 'disable' button at the top

Yahoo! I clicked that big red button and scp finally worked! I'm sooooo happy!

So, I guess this proves that I have selected the correct adapter (bridge)? (I found the choice of network adapters a little less than obvious).

So I guess I'll enable the NAT adapter so I can get to the outside world too?

So does anyone have any more suggestions that could help me make this (scp/ssh) work with the firewall enabled? I'd like to know how to do that and I've taken all the other suggestions above.

I have not played with the wizard in the GUI. I wonder if that would do anything beyond what I've already done by clicking the check box for sshd?

Hmmm... Can anyone tell me what I should be seeing in the firewall config file after clicking the checkbox for sshd? Maybe I'm not saving the results of the GUI dialog correctly? Hmmm... Well I did run the GUI just now (prior to disabling the firewall) and I did see that sshd checkbox was still checked from yesterday so that makes me think it was saved correctly. Nevertheless: can someone post their firewall config file for which sshd works from the outside?

Thanks,
Siegfried

Last edited by siegfried; 29th August 2012 at 09:25 PM.
Reply With Quote
Reply

Tags
closed, iptables, ping, port, ssh, sshd, works

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sshd and port 666 blittle Servers & Networking 6 3rd April 2009 07:20 AM
sshd won't start on any port other than 22 drachoe Servers & Networking 11 18th August 2008 03:21 PM
SSHD not port forwarding and cannot ping local interfaces SlipperyDuck Servers & Networking 4 4th July 2007 08:25 AM
Port Scanner IPTABLES RULESET that works idiosync Security and Privacy 1 16th March 2007 08:01 AM
Port 20 closed for security reason larka06 Security and Privacy 25 26th January 2006 05:02 PM


Current GMT-time: 14:03 (Thursday, 21-08-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat