I set up a Debian server VM in Parallels. I configured it to use the Bridge network. DHCP is enabled, however I configured the VM to use a static IP.
On Debian the web server runs (`127.0.0.1:5000`) and the network is properly configured:
Code:
$ sudo cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug enp0s5
# iface enp0s5 inet dhcp
iface enp0s5 inet static
address 10.211.55.201
netmask 255.255.255.0
gateway 10.211.55.1
$ netstat -pln
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:5000 0.0.0.0:* LISTEN 899/python3
tcp6 0 0 :::22 :::* LISTEN -
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 13667 840/systemd /run/user/1000/systemd/private
unix 2 [ ACC ] STREAM LISTENING 13673 840/systemd /run/user/1000/gnupg/S.dirmngr
unix 2 [ ACC ] STREAM LISTENING 13675 840/systemd /run/user/1000/gnupg/S.gpg-agent.browser
unix 2 [ ACC ] STREAM LISTENING 13677 840/systemd /run/user/1000/gnupg/S.gpg-agent.extra
unix 2 [ ACC ] STREAM LISTENING 13679 840/systemd /run/user/1000/gnupg/S.gpg-agent.ssh
unix 2 [ ACC ] STREAM LISTENING 13681 840/systemd /run/user/1000/gnupg/S.gpg-agent
unix 2 [ ACC ] STREAM LISTENING 11990 - /run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 13009 - /run/systemd/private
unix 2 [ ACC ] STREAM LISTENING 13011 - /run/systemd/userdb/io.systemd.DynamicUser
unix 2 [ ACC ] STREAM LISTENING 13012 - /run/systemd/io.system.ManagedOOM
unix 2 [ ACC ] STREAM LISTENING 13020 - /run/lvm/lvmpolld.socket
unix 2 [ ACC ] STREAM LISTENING 13024 - /run/systemd/fsck.progress
unix 2 [ ACC ] STREAM LISTENING 13032 - /run/systemd/journal/stdout
unix 2 [ ACC ] SEQPACKET LISTENING 13034 - /run/udev/control
unix 2 [ ACC ] STREAM LISTENING 10664 - /run/systemd/journal/io.systemd.journal
$ curl http://127.0.0.1:5000
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
...
Now I try to access the web server from the host:
Code:
> ping 10.211.55.201
PING 10.211.55.201 (10.211.55.201): 56 data bytes
64 bytes from 10.211.55.201: icmp_seq=0 ttl=64 time=1.425 ms
64 bytes from 10.211.55.201: icmp_seq=1 ttl=64 time=0.317 ms
64 bytes from 10.211.55.201: icmp_seq=2 ttl=64 time=0.290 ms
64 bytes from 10.211.55.201: icmp_seq=3 ttl=64 time=0.386 ms
> ssh [email protected] echo test
test
> curl http://10.211.55.201:5000
curl: (7) Failed to connect to 10.211.55.201 port 5000 after 1011 ms: Connection refused
The machine is clearly reachable and the web server works. What could be the issue here?