Not able to telnet / ping server installed on virtual machine

12,355

Only the second telnet connection fails (Could not open connection). The first one is established successfully (Connected to 10.184.230.129), but then closed by the remote host (Connection closed by foreign host).

The connection client->server most likely fails, because the server-VM is behind a NATed interface. You'll have to forward the required port(s) from the host to the guest (the button "Port Forwarding" in the network adapter configuration).

That doesn't explain why the connection server->client fails, though.

Which ports are server and agent listening on? Use netstat to check that. Also, the hosts are apparently on different networks, so I'd check with tcptraceroute (Linux) and tracetcp (Windows, you'll also need WinPcap for it to work) at which hop exactly the connection fails.

Server->Client: tcptraceroute -n 10.184.230.129 10050

Client->Server: tracetcp 10.0.2.15:10051 -n

Share:
12,355
Mad-D
Author by

Mad-D

Updated on June 04, 2022

Comments

  • Mad-D
    Mad-D almost 2 years

    I am trying to establish connection between ZABBIX SERVER which has been installed on Ubuntu Virtual Machine and ZABBIX AGENT which has been installed on my local machine (windows).

    I'm not sure whether this is problem with zabbix.server.conf and zabbix.agent.conf files OR problem with Virtual Machine. So any suggestions / advice is much appreciated !

    Zabbix Server Details: ( installed on Ubuntu )

    1. ip address enter image description here

    2. VM NAT details enter image description here

    Zabbix Agent Details ( installed on Windows )

    1. enter image description here

    Testing between Agent (on windows) and server ( on ubuntu )

    1. pinging success from server to agent enter image description here

    2. pinging failure from agent to server enter image description here

    3. telnet failure in both cases enter image description here

      and

      enter image description here

    Note: Server is running and also agent is running

    Troubleshooting Based on Ansgar Answer:

    1. port forwarding enter image description here

    2. tcptrace on ubuntu enter image description here

      as you mentioned it shows open connection

    3. tcptrace on windows enter image description here

      still connection is closed, what am i doing wrong in Port forwarding ? i also tried with host id as 127.0.0.1

  • Mad-D
    Mad-D over 11 years
    added more details to question and i am not sure about port forwarding, let me know if i am doing something wrong ?
  • Ansgar Wiechers
    Ansgar Wiechers over 11 years
    Forwarding a port from host to guest means that all traffic to the host port will be forwarded to the guest port, i.e. the host port cannot be reached anymore. That said, VirtualBox sometimes seems to have problems with forwarding ports. I'm just experiencing the same problem: I tried to forward a host port to a guest on a NAT connection, but it doesn't work at all.