virtual host ip aliases
Jeff at NorrisTechs
jeff at norristechs.net
Mon Sep 12 16:30:27 PDT 2005
Mike.
If you wanted to do it in bash, here's a script you can call using
/usr/local/etc/rc.d/999myalias.sh
#!/usr/local/bin/bash
# save to /usr/local/etc/rc.d/999myalias.sh
# chmod 755
# BLAH BLAH BLAH.... NO COMMENT
######################################
#
# change to interface name, e.g. fxp0, rl0, fxp1 , whatever
NetName="fxp0"
# How many aliases will we create
Total="254"
# change NUM=xx whre xx is the starting number
for (( NUM=1; NUM <= $Total; NUM++ ))
do
# if you want to see the looping number
# uncomment this the next line
#echo $NUM
# Change 192.168.1.XXX to match your network
# change netmask to match you network
ifconfig $NetName 192.168.1.$NUM netmask 255.255.255.0 alias
done
# if you dont want to see 254 IP addresses, just comment out the next line
ifconfig | more
#end
Cheers.
------------------------------------------------------------------------
*/Jeff Norris/*
/~ Web Hosting ~ VPN Solutions ~ Network Management ~
Design, deploy, kick ass. /
*N*orris*Techs* dot net
http://www.norristechs.net
*AOL IM or Yahoo IM: /ntshelper/*
mike at lanline.com wrote:
>Hi,
>
> I want to add like 254 ip aliases to a nic. Is there a better way
>to do it than adding _alias# 's to the rc.conf.
>
>Thanks.
>
>-Mike
>
>
>_______________________________________________
>freebsd-isp at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-isp
>To unsubscribe, send any mail to "freebsd-isp-unsubscribe at freebsd.org"
>
>
>
>
>
More information about the freebsd-isp
mailing list