2

after having this issue this morning I have done A LOT of reading of other questions. So hopefully I can provide plenty of info to assist in solving this

I can SSH using standard port 22 to the VM using either Bridged or Host-only networking. However when I try and visit a website (at this stage only hoping to see the welcome page) I get ERR_CONNECTION_REFUSED

  • I'm using VirtualBox 4.3.26 on OS X 10.10.3
  • The VM with the problem is CentOS 7 base
  • I have installed Apache2 (httpd) using yum
  • Apache is running
  • No issues with Ping
  • Internet connectivity fine fro mwithin VM when using any networking mode
  • SELinux is disabled
  • IPtables is disabled
  • SSH on 22 works fine

Netstat says we are listening on 80

tcp        0      0 :::80    :::*     LISTEN
  • I have an Ubuntu 14.10-server VM with no issues. Just installed Apache2 with apt-get and am able to see the welcome page at 192.168.0.102 (IP while testing with Bridged mode) as read from ifconfig same as I'm trying to do with CentOS

Does anyone know what my issue could be?

I can't think where the request is possibly being refused.

  • Have you started Apache on Centos? It doesn't automatically start after installation like with Ubuntu. I use Virtualbox a lot, and usually install a desktop VM instead of the server version if it's for local use only. It gives the same functionality, and a lot more convenience. You can use Firefox in the VM itself, as well as all the other GUI tools. – SPRBRN May 14 '15 at 9:24
  • Yes, Ill update the OP – joevallender May 14 '15 at 9:26
  • What do the httpd logs tell you? – SPRBRN May 14 '15 at 9:49
  • Nothing appears in access or error log unless, for instance I wget localhost from the VM itself – joevallender May 14 '15 at 10:06
8

By default CentOS 7 comes with firewalld installed. Check it is configured properly or disabled.

systemctl stop firewalld
systemctl disable firewalld
| improve this answer | |
  • YES!!! Thanks Jorge. You know what? I was Googling 'centos firewall other than iptables' earlier. Didn't see this though. – joevallender May 14 '15 at 10:20
-1

It is really not recommended to disable the firewall, instead you could have run lokkit -s http to open up the port 80.

| improve this answer | |
  • This does not answer the author's question, this is more of a comment, then an answer. – Ramhound Jun 9 '15 at 11:17
  • It does have me interested though. @HawkEye are you saying that lokkit will configure both iptables and the firewalld mentioned in the accepted answer? I've never seen it before – joevallender Jun 9 '15 at 14:31
  • @joevallender - I have no clue about that, but let me know if it works for you! :) – HawkEye Jun 10 '15 at 6:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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