*BSD News Article 93240


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!solace!nntp.se.dataphone.net!nntp.uio.no!news.radio.cz!CESspool!news.maxwell.syr.edu!news.bc.net!rover.ucs.ualberta.ca!news
From: Marc Slemko <marcs@znep.com>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Need first hand help w/Apache 1.1 and Mulitiple IPs !!
Date: 10 Apr 1997 02:57:19 GMT
Organization: University of Alberta
Lines: 32
Message-ID: <5ihkuf$oi6@pulp.ucs.ualberta.ca>
References: <01bc444b$98b0f0a0$664c1bcc@tony.gcr1.com> <5ih77m$s15@masters0.InterNex.Net>
NNTP-Posting-Host: gpu5.srv.ualberta.ca
X-Newsreader: NN version 6.5.0 (NOV)
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:38835

In <5ih77m$s15@masters0.InterNex.Net> sparc@linkeasy.net writes:


>#!/bin/sh

># <VirtualHost www.execusoft.com> added 04-05-97
>ifconfig ed0 alias 206.111.40.20 up
>route add 206.111.40.20 127.0.0.1

># <VirtualHost www.bensite.com> added 04-08-97
>ifconfig ed0 alias 206.111.40.21 up
>route add 206.111.40.21 127.0.0.1

># <VirtualHost www.citiusa.com> added 04-05-97
>ifconfig ed0 alias 206.111.40.22 up
>route add 206.111.40.22 127.0.0.1

If you are going to do it manually for each one you can just
specify it in sysconfig in recent versions of FreeBSD.

If you aren't, it can be much easier to do something like:

	echo -n 'configuring alias interfaces... '
	for ip in 3 5 7 10 13 25 50
	do ifconfig lo0 inet xxx.xxx.xxx.$h netmask 255.255.255.255 alias
		echo -n "$ip "
	done
	echo

(I use lo0 instead of my ethernet interface)

Once you get a few hundred this makes life far easier.