473,772 Members | 2,552 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Services listening on all ports?

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.

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

Thanks,

Tom
Jan 17 '07 #1
3 3384
Tom,

IIS by default listens on all IP Addresses on the machine. In IISAdmin you
can set the websites to listen on a specific IP address and ignore all other
ports. Especially check the configuration of the Default Web Site.

Beyond that, how the service binds to the IP Addresses and ports is really
dependent upon the specific implementation of that service. You can make it
bind to all IP addresses or you can not. In general, I would guess that
most services do bind to all IP addresses and ports because they assume that
they are the only one of that type of service on the machine and the
situation with multiple IP addresses tends to be much less common.

I know with DNS, SMTP, and IIS on Windows 2003 you can specifically tell the
services which IP addresses to bind to, but by default they will bind to all
of the addresses.

Robert
"tshad" <ts**********@f tsolutions.comw rote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>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.

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

Thanks,

Tom


Jan 17 '07 #2

"tshad" <ts**********@f tsolutions.comw rote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>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


Jan 17 '07 #3
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" <rb*@nospam.nos pamwrote in message
news:eN******** ******@TK2MSFTN GP02.phx.gbl...
>
"tshad" <ts**********@f tsolutions.comw rote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>>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



Jan 18 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2404
by: ssantamariagarcia | last post by:
I am trying to program a server in C for UNIX to get a kind of "bridge" between the clients of a port A and the clients of a port B. For that, I create 2 processes: one that listen the requests of port A clients and another for the Port B ones. In each process, when a connetion service is required, after accepting , the value of the socket generated is added to a set of sockets. This set keeps on listening on each socket for new...
6
3125
by: kai | last post by:
Hi, I was tring to run an example (HelloWorld.aspx) from MSPrss book, I get this message: "ASP.NET Development Server faild to start listening port 1034. Error message: An attempt was made to access a socket in a way fobidden by its access permissions."
7
1985
by: Magdelin | last post by:
Hi, My security team thinks allowing communication between the two IIS instances leads to severe security risks. Basically, we want to put our presentation tier on the perimeter network and the business tier inside the fire wall or internal network. The biz tier will be developed and deployed as web services on IIS. I know microsoft recommends this architecture but I am not able to convince my security team. They say IIS is vulnerable...
7
3746
by: Matt | last post by:
I have approximately 5 instances on my test server that are identical to my prod server. On the prod server, when I look at the services file, there is a single entry per instance and everything seems to be working fine. However, on the test server, after creating each instance, there are 4 entries per instance. Is there a need for all 4 of these entries? When I add a new service for each instance like on the prod server and then...
7
2096
by: Giulio Petrucci | last post by:
Hi everybody, I've a big problem with a Windows Service I've created using C#. It's a very simple service: it just starts a TcpListener listening for incoming connections on a certain ports. First I compiled it on FW2.0, and run the service without any problem. Some days ago I had to performe a sort of "backporting" to FW1.1, I compiled the source code, installed the service but as I try to start it I get a timeout and a system error. I...
0
905
by: tshad | last post by:
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...
2
1617
by: GaryDean | last post by:
We were calling out to a web service just fine before we put our server behind a firewall. Now we can't call out. Port 80 is open in the firewall. What ports need to be open? -- Regards, Gary
5
4420
by: rome ez | last post by:
I am trying to write a vb.net socket application which listens for clients on two ports simultaneously. Is it possible to do so and how can this be done. Please help.
1
4113
by: =?Utf-8?B?QnJhZA==?= | last post by:
Generally on a Windows system the services file (located in Windows\System32\Drviers\Etc\Services) would specify port allocation to different applications. It contains registered ports and dynamic/private ports. This was used to reduce the chance of Port conflicts. This allowed applications to use a port name or alias instead of a number. In WCF, a common paradigm is to allocate your port number in the app.config file of your...
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8937
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6716
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4009
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.