Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I had an Ubuntu guest VM previously running using Virtualbox on Windows Vista 32-bit. I recently (and happily) installed Windows 7 Ultimate 64-bit. So far I have the Ubuntu VM set up almost identically, sshd is running and listening on port 22, Virtualbox has a port-forwarding rule so that incoming traffic on the host from another port gets forwarded to 22 on the guest. I also have a rule in the Windows 7 Firewall to allow incoming traffic on this port. Edge traversal is enabled. There is also a rule on my router's firewall enabling traffic on this port. However, when I try to ssh from a remote system, I get a time-out. I can view the router logs to see that the packet is getting forwarded to the system, but I can't tell if Windows 7 is allowing it through correctly. I'm new to Windows 7 Firewall configuration, so maybe I did it wrong. Any help is appreciated.

share|improve this question
    
If you try to ssh from your Windows 7 host to Ubuntu VM, does that work? –  Janne Pikkarainen Aug 26 '10 at 9:22
    
putty to localhost:<port> returns "connection refused" –  REDace0 Aug 26 '10 at 17:51
add comment

2 Answers

Make sure that you added the firewall rule to the correct network type. Windows 7 differentiates between domain, private, and public networks. For instance, if the network your Win7 host is connected to is set as a "Home" (private) network, verify that you added the firewall rule to the Home ruleset.

share|improve this answer
    
Private Profile is active and the rule is under the Private Profile. –  REDace0 Aug 26 '10 at 17:53
    
Well then, carry on! :P –  Robert S Ciaccio Aug 27 '10 at 1:54
add comment
up vote 1 down vote accepted

Solved! Apparently, Virtualbox lost the rule I had made for port forwarding. I changed the port while I was at it because I accidentally posted it here. The steps were:

  1. Add pinhole to allow port through on router.
  2. Add Windows Firewall Inbound Connection rule to allow port on the correct profile, enable edge traversal.
  3. Run cmd.exe as Administrator (Start->"cmd"->Crtl+Shift+Enter). Execute "C:\Program Files\Oracle\Virtualbox\VBoxManage.exe" modifyvm "<vm_name>" --natpf1 "ssh,tcp,,<inbound_port>,,22"
share|improve this answer
    
Port 22 is the common ssh port. And if I know your IP I can still nmap and find your open ssh port. Setup a key/pair for authentication, potentially disable password authentication or at least make the password complex. –  Chris Aug 26 '10 at 18:21
    
Thanks for the tips. And thanks to the other posters for your help. –  REDace0 Aug 26 '10 at 18:42
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.