Able to ssh but not able to browse centos server

2

I recently installed the CentOs server on the VM and I am using a Host Only Interface, and have set the IP address of the host and Centos. I am able to SSH from the terminal of the host to Centos but I am not able to access the test website from my browser.

Can anyone tell me what can be done to access the test website?

Amit Nandan Periyapatna

Posted 2012-12-02T20:22:13.787

Reputation: 123

Try to look at netstat -l -n, if your web server is listening on port you want. Try to telnet webserver port from your host. – week – 2012-12-02T20:31:00.850

Answers

1

Don't use Host-Only networking. This completely isolates the virtual machine from the Internet and provides connectivity only to the virtual machine host.

Instead, use bridged or NAT networking.


Also, CentOS has a built in firewall and it's turned on by default. You need to disable it or run system-config-firewall-tui as root to reconfigure it.

Michael Hampton

Posted 2012-12-02T20:22:13.787

Reputation: 11 744

Thank you Micheal, but I do not need the internet access, I just want to access the test website from the host through the browser using the IP address that I have set to the Guest in the VM. – Amit Nandan Periyapatna – 2012-12-02T20:28:59.463

I've updated my answer. Sounds like you may have a firewall issue. – Michael Hampton – 2012-12-02T20:30:13.660

There is no firewall wall tui on my centos, all i can find is the system-config-network-tui. Is there any other way that I can disable the firewall? One small doubt, since I am able to ssh, doesn't it meant that the firewall has been disabled? – Amit Nandan Periyapatna – 2012-12-02T20:33:53.840

You probably need to install it, then: yum install system-config-firewall-tui – Michael Hampton – 2012-12-02T20:36:26.897

Is there any other way that i can disable the firewall? – Amit Nandan Periyapatna – 2012-12-02T20:38:03.380

Thank you Micheal, my apache was down, set it up and then bought the iptables down. working without any hassle now! – Amit Nandan Periyapatna – 2012-12-02T20:44:15.247