0

I have to check if a web service is installed on the machine. There shouldn't be used any http requests and so all. All I have - is a ssh connection the machine.

UPDATE

There are many web services installed. So I have to search by given name/address.

Could you please help me ? Thank you in advance.

StKiller
  • 105
  • 1
  • 1
  • 5

1 Answers1

1

Just a quick & dirty check can be to simply drop to a command prompt & use "netstat -an" & look for any "listening" connections on port 80/443. i.e.

TCP    0.0.0.0:80             0.0.0.0:0              LISTENING
TCP    0.0.0.0:443            0.0.0.0:0              LISTENING

or instead of 0.0.0.0 it also may be configured to listen on your specific IP address

TCP    x.x.x.x:80             0.0.0.0:0              LISTENING
TCP    x.x.x.x:443            0.0.0.0:0              LISTENING

or even on ipv6...

TCP    [::]:80                [::]:0                 LISTENING
TCP    [::]:443               [::]:0                 LISTENING

This would also show you if some other web-service was running, like apache or who knows what else. If you throw the -b option on netstat and it will also show you what executable is involved in creating the listening port. (the -b option requires elevated permissions just FYI)

One thing of note, it is not possible to have 2 separate applications (IIS & apache) both listen on the same ip address & port on the same machine.

TheCompWiz
  • 7,409
  • 17
  • 23
  • Sorry, I forgot to specify - there are many web-services. So I should search by name/address. – StKiller Apr 13 '11 at 14:54
  • Edited my post to reflect that... You can't have 2 services listening on port 80 on the same IP. As far as network connections go... the "name" (DNS hsotname) is not relevant. – TheCompWiz Apr 13 '11 at 14:56
  • You cannot have multiple services listening on the same ip/port combination, but you can have one service listening on one port, responding to multiple names. It's called virtual hosts. IIS does this via "bindings" on websites, apache does this via the VirtualHost directive. – Jon Angliss Apr 17 '11 at 04:17