HackTheCyber
HackTheCyber

Reputation: 1

How do I check the web application running on a specific port?

I have a Ruby application running on a server.

When I run the rails server command on my server, it shows the following message:

Rails 3.2.13 application starting in development on http://0.0.0.0:3000

If it was the local machine, I would have typed the following in my browser URL box:

localhost:3000

or simply:

http://0.0.0.0:3000

Since this is the server, how do I do this?

I tried the following, but did not work:

http://IP_ADDRESS_OF_SERVER:3000

Any suggestions?

Upvotes: 0

Views: 1967

Answers (2)

Paritosh Piplewar
Paritosh Piplewar

Reputation: 8122

Try running netstat -na | grep "LISTEN" and this will show all active listening ports. The web application must be running on any of these ports.

You just have to try all of them to find it.

Upvotes: 1

dre-hh
dre-hh

Reputation: 8044

Maybe the port is closed for outside connections. Login on your server per ssh and run

$ curl http://localhost:3000

If it returns the rendered index page, the server is running but the port is just disabled by the firewall

Upvotes: 1

Related Questions