Re: Services listening on all ports?



I did figure out what I needed based on what you guys have said. And yes
IIS does bind to all addresses.

Apache does the same thing by default but if you add the address into the
connector line it will only bind to that address. That takes care of the
Apache issue.

But IIS will connect to all addresses even if you specifically set each
website to be a different address. In our case, if we set up 10 addresses
on the Nic card and set up our 4 web sites to access 4 of the address, it
will still grab all the addresses - preventing Apache from running. If we
manually start Apache to grab one of the addresses not used by IIS first
(from the Services window) and then start IIS - IIS will fail. The web
server will show as started but it won't handle any of the pages.

The solution, apparently (am in the process of testing and I believe it will
work) is a program from MS called httpcfg.exe which you can run to set up a
listener list. I assume what happens is that IIS will look for a listener
list and if it finds it, it will only bind to the addresses on the list. If
there is no list it will bind to all addresses. So in my case, I will put
all the address except the one that Apache will use and that will solve the
problem. It doesn't matter what order they start in as IIS won't even look
at the Apache address.

I am not sure what they did before W2K3 and XP SP2 as I believe it came out
then and I don't believe works for IIS5.

Wish me luck and thanks,

Tom

"Ben Voigt" <rbv@xxxxxxxxxxxxx> wrote in message
news:eNAamzoOHHA.1248@xxxxxxxxxxxxxxxxxxxxxxx

"tshad" <tscheiderich@xxxxxxxxxxxxxxx> wrote in message
news:%23Dc9LDnOHHA.4644@xxxxxxxxxxxxxxxxxxxxxxx
I have been trying to run IIS and Apache Tomcat on the same Server using
the same Port (80 for http and 443 for https). I am trying to do this by
using multiple IP address on the same Nic card. This would allow me
multiple sockets for the same port.

With all my research it seems that most services seem to listen on ALL IP
addresses on the same machine for a particular port (25 SMTP, 53 DNS, 80
HTTP). I found you can tell IIS NOT to listen to a particular IP Address
which would allow Apache to connect to that IP Address and listen to 80
and 443 at the same time as IIS.

What I don't know is if this is normal. I did add another IP Address to
my Nic card and tried to do a "telnet address port" for all the ports
open on my machine. They were ALL open for both addresses. I thought
that when you created a service to listen on a port you had to give it an
IP Address and Port Number to create a socket.

You do. If you use the special address INADDR_ANY, you get bound to all
ports.


If you create a service, is it going to listen on all IP Addresses?

At the programmer's discretion.

Also, you can typically bind using a particular IP even when the port is
already opened using INADDR_ANY (because IP != INADDR_ANY, you won't get
the address in use error). The more specific bind takes precedence.



Thanks,

Tom






.



Relevant Pages

  • Re: The process cannot access the file...
    ... listener on port 80 on an IP that was not bound to IIS. ... IIS 6.0 could not start ANY of the web sites and gave the 'cannot ... > bind to only one particular IP instead of binding to 0.0.0.0:80. ...
    (microsoft.public.inetserver.iis)
  • Re: Feedback solicited - best way to harden a mail/web server?
    ... > use," I've never heard of someone needing bind at home. ... Only when firewall admins poke open port 119 :-), ... what's what and then rerun chkrootkit. ... no business leaving Apache at its default port. ...
    (comp.os.linux.security)
  • Re: I am going crazy..IIS 5.1 XP pro Not working correctly
    ... Are you running both IIS and Apache on port 80? ... IE when it can't even open a connection to the server, ...
    (microsoft.public.inetserver.iis)
  • Re: mailform hacking
    ... > I moved my Apache to a non-standard high port when I ... Moving services to arbitrary ports breaks that service for ... the few relevant lines in the mass of IIS attempts, ...
    (comp.os.linux.security)
  • RE: The process cannot access the file...
    ... When you launch IIS 6.0 on a .NET Server machine, ... If an application is already using port 80 on any IP address and you then ... Once this has happened no additional processes can bind to port 80 on any ...
    (microsoft.public.inetserver.iis)