Re: IP Binding

From: Erwin S. Andreasen (erwin@PIP.DKNET.DK)
Date: 11/16/97


On Sun, 16 Nov 1997, Chris Jacobson wrote:

> The service provider I use wants all MUDs to bind to an IP now...
> however, I know Circle doesn't do this by default.  Is there a way to do
> it?  Is it even necessary?

If you have multiple logical IPs on the same machine, binding to
INADDR_ANY on say, port 4000 will AFAIK bind to all the addreses - thus
someone telnetting to 1.2.3.4 and 1.2.3.5 port 4000 will get through to
your bound socket.

If you specify the ip, like 1.2.3.4, telnetting to 1.2.3.5 port 4000 will
not get to this socket.

Thus, several MUDs can share the same port on the same machine.

It's a simple matter of replacing the part where the socket
address is set to INADDR_ANY before binding to something like

sa.sin_addr.s_addr = inet_addr ("your.ip.address.here");

Use netstat -a to verify that you have  yourhostname:4000 rather than
*:4000 bound afterwards.

 =============================================================================
Erwin Andreasen   Herlev, Denmark <erwin@pip.dknet.dk>  UNIX System Programmer
<URL:http://pip.dknet.dk/~erwin/>         <*>           (not speaking for) DDE
 =============================================================================


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST