I'm able to ssh into host, but not to access it from browser - No route to host

1

I have a setup on my home lan like this:

  • router with OpenWRT OS which also acts as DHCP server
  • host machine - Debian Wheezy
  • guest OS on the host machine - CentOS 7 which only has one NIC which is setup as bridged
    • internet works from this machine
    • i can ping the host machine and the router also

I can connect to the guest machine from the host with ssh, but if I start my dev web server (i tried starting the dev server on port 3000, 8080 and 5000 ) on guest, I can't connect to it from within the browser on host.

I looked for firewall/iptables/selinux on guest and I think none is started.

What else should I try?

Tudor Constantin

Posted 2015-01-11T19:35:28.940

Reputation: 113

1The firewall service is called firewalld on CentOS 7. I have been burned by this before. – None – 2015-01-11T19:53:34.447

if you add that as an answer I'll accept it - service firewalld stop solved the issue – Tudor Constantin – 2015-01-11T20:07:01.637

1Would it be better to fix the firewall (rule) rather than stop it altogether? – Kinnectus – 2015-01-11T21:28:55.767

the VM is my dev machine - I'm not really concerned with security on it. But indeed - the correct solution is to configure the firewall instead of disabling it :) – Tudor Constantin – 2015-01-15T08:02:20.053

Answers

3

As people commented you would be better to add the rule as an exception and restart the service:

firewall-cmd --permanent --zone=public --add-port=80/tcp
systemctl restart firewalld.service

Andy

Posted 2015-01-11T19:35:28.940

Reputation: 666