My network adapter is set to “Bridged Adapter”. My CentOS (guest) IP is
192.168.0.4 and I am able to view Apache web server (port 80) from Windows 7 (host) but I am unable to SSH (port 22). I get “connection refused” from putty.
Here’s a screenshot of my iptables in CentOS:
If you are accessing the Apache HTTP Server welcome page using localhost and not the IP address, then it is possible that
dhcpcd is not running. Have you verified that
sshd is running?
First make sure you can connect to the CentOS VB
- Make sure sshd is running, the “connection refused message” usually means that sshd is not running.
- Your firewall configuration appears to be ok, but just in case disable it for testing.
- Also check your configuration in /etc/hosts.allow and /etc/hosts.deny, at least must have a line like:
sshd : 192.168.0. : allow