From owner-freebsd-questions  Wed Jun 21  8:45:52 2000
Delivered-To: freebsd-questions@freebsd.org
Received: from mail2.netcologne.de (mail2.netcologne.de [194.8.194.103])
	by hub.freebsd.org (Postfix) with ESMTP id 5498B37BEDC
	for <FREEBSD-QUESTIONS@FreeBSD.ORG>; Wed, 21 Jun 2000 08:45:46 -0700 (PDT)
	(envelope-from pherman@frenchfries.net)
Received: from bagabeedaboo.security.at12.de (dial-194-8-205-150.netcologne.de [194.8.205.150])
	by mail2.netcologne.de (8.9.3/8.9.3) with ESMTP id RAA28764;
	Wed, 21 Jun 2000 17:45:31 +0200 (MET DST)
Received: from localhost (localhost.security.at12.de [127.0.0.1])
	by bagabeedaboo.security.at12.de (8.10.1/8.10.1) with ESMTP id e5LFjMn06934;
	Wed, 21 Jun 2000 17:45:22 +0200 (CEST)
Date: Wed, 21 Jun 2000 17:45:22 +0200 (CEST)
From: Paul Herman <pherman@frenchfries.net>
To: Scott Pilz <tech@squid.tznet.com>
Cc: FREEBSD-QUESTIONS@FreeBSD.ORG
Subject: Re: Multiple IP's
In-Reply-To: <200006211529.e5LFT6i63816@squid.tznet.com>
Message-ID: <Pine.BSF.4.21.0006211735550.348-100000@bagabeedaboo.security.at12.de>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-freebsd-questions@FreeBSD.ORG
Precedence: bulk
X-Loop: FreeBSD.ORG

On Wed, 21 Jun 2000, Scott Pilz wrote:

> Is it possible (and if so, how would I go about doing this) to run
> multiple IP's on a single network card (FreeBSD 3.1) to work the
> following way:
> 
> 10.0.0.1 is running program A on open port 6000.
> 10.0.0.2 is running program B on open port 6000.
> 
> Both ports are from different programs, upon telneting to these
> ports, you'll reach each different program.
> 
> IP aliasing will *not* handle this obviously, so ifconfig is out
> of the picture. For example, I have tested this theory, and upon a
> port scan on any IP of the entire system, it will list *all* open
> ports on the system - thus, the same port cannot be opened for the
> second time using a different IP.

Indeed IP aliasing is your answer.  If you are talking about inetd
services, then you need to run a separate inetd's i.e.:

  inetd -a 10.0.0.1 /etc/inetd.conf.10.0.0.1
  inetd -a 10.0.0.2 /etc/inetd.conf.10.0.0.2

Most other network daemons also have a way to specify which IP to bind
to.  named, apache, etc... all do.

That should solve your problem.

This however opens a question for me:  does inetd (FreeBSD -Ww
version) allow for multiple /etc/host.allow files?  I can think of
ugly ways to do this (multiple tcpds?) but just wondering if this has
already been done.

-Paul.




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message