Is the any way other then ping to detect internet connection?

1

1

I have a rails server (Linux). I can open the site with machine A. Using machine B I just can use ssh port to connect it, but it cannot open the site and the rails server cannot detect the http request. Since the machine B is the windows platform, I open cmd and type ping xxx.xxx.xxx.xxx, and it worked.

I suspect that maybe the port for the rails site 3000 is blocked by the firewall, but it seems that ping cannot detect such problem. Is there any way to watch what is happening while the http request is made by machine B to the rails server?

Marcus Thornton

Posted 2014-08-11T08:20:42.100

Reputation: 211

Answers

0

You can also use nmap to test opened ports on other site

nmap -v -Pn -p 3000 xxx.xxx.xxx.xxx

j123b567

Posted 2014-08-11T08:20:42.100

Reputation: 206

0

So many ways... Here's a few.

  • use a network packet watcher or sniffer to monitor packets into and out of your network connections; packet sniffers tend to be OS specific. You may want different sniffers on each of the client and server
  • use telnet -p {port_number} to test connections on a port number; commonly installed on Linux systems, no idea about Windows.
  • use netcat to connect to ports
  • use curl and enable the debugging options -trace

Personally, faced with your situation, I'd be looking for telnet and specifying the port number, as a first step. If that doesn't connect, I'd try changing the server port number to 80, and see if that works. If 80 works and 3000 fails... then something is blocking it. It's fairly easy to set the rails server port in development mode, but if you can't find those docs... add a comment. ;)

ping is a less useful tool than you might expect. It uses the ICMP protocol, rather than TCP or UDP. As a consequence, things may be reachable by ICMP that aren't reachable by TCP or UDP. And vice-versa - ICMP flooding attacks have been very popular, so some hosts disable ICMP in firewalls - even though you can connect to port 80 or 443 in the usual ways. On a local network with no external firewalls tinkering, it's a fairly good test of connection.

JezC

Posted 2014-08-11T08:20:42.100

Reputation: 550

-1

Go to mxtoolbox, it's an online service providing various network diagnostics features. Locate scan and enter your IP address. You'll be presented with a list of all the ports open on that IP.

Bender

Posted 2014-08-11T08:20:42.100

Reputation: 184

Line is not going to answer any question. its an online service to test ports – Bender – 2014-08-11T08:58:27.897