On Thu, Sep 11, 1997 at 03:30:18PM +1000, Terry Dawson wrote: : Maarten Boekhold wrote: : : > I tried to steup an IP alias on a machine here. According to the : > Virtual-Web mini-HOWTO, I can do: : > : > ifconfig eth0 alias new-address : > : > However, ifconfig says 'alias' is not a hostname. 'man ifconfig' doesn't : > say anything about aliasing. This is with netbase 2.13-1. : > : > Anybody who can get me goin' on this? : : NET-3-HOWTO, but more specifically: : : ifconfig eth0 myrealaddr options.... : ifconfig eth0:1 myfirstipalias options... : ifconfig eth0:2 mysecondipalias options...
I propose this get included in a subsequent Debian release... I run this as /etc/init.d/virtualhosts. I wrote it, you can have it... ----cut here----- #!/bin/bash # Copyleft Jason Costomiris <[EMAIL PROTECTED]> # Reserved rights? Nah, just leave these comment lines. # Stick your IPs or hostnames in the names line, put a space between them. names="" count=0 if [ "$1" = "stop" ]; then for addr in $names do /sbin/route del $addr /sbin/ifconfig eth0:$count- $addr let count=$count+1 done elif [ "$1" = "start" -o "$1" = "" ]; then for addr in $names do /sbin/ifconfig eth0:$count $addr /sbin/route add -host $addr dev eth0:$count let count=$count+1 done else echo 'Usage: '$0' [start|stop]' fi ----cut here----- -- Jason Costomiris | Finger for PGP 2.6.2 Public Key [EMAIL PROTECTED] | "There is a fine line between idiocy My employers like me, but not | and genius. We aim to erase that line" enough to let me speak for them. | --Unknown http://www.jasons.org/~jcostom -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .