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?


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

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


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.


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.

  • Line is not going to answer any question. its an online service to test ports – Bender Aug 11 '14 at 8:58

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.