Re: Alias address and DHCP
Michael Sierchio <[email protected]>
| Newsgroups | gmane.comp.security.firewalls.m0n0wall |
|---|---|
| Message-ID | <CAHu1Y73NbMyCbBkLi5+CtL04w=QLjP=XYeqg_Ae92uuLor=Uug@mail.gmail.com> |
Hej, Anders - You might need to make some changes to this. It goes in /etc/rc.d or /usr/local/etc/rc.d (more properly). in /etc/rc.conf you'll need to set dhclient-alias_enable="YES", and the other variables too dhclient-alias_if dhclient-alias_addr dhclient-alias_mask - M #!/bin/sh # # skript för Anders - [email protected] # PROVIDE: dhclient-alias # KEYWORD: nojail nostart # REQUIRE: dhclient . /etc/rc.subr . /etc/network.subr name="dhclient-alias" start_cmd="dhclient-alias_start" stop_cmd="dhclient-alias_stop" dhclient-alias_start() { ifconfig $dhclient-alias_if inet $dhclient-alias_addr netmask $dhclient-alias_mask alias } dhclient-alias_stop() { ifconfig $dhclient-alias_if inet $dhclient-alias_addr -alias } load_rc_config $name dhclient-alias_if=${dhclient-alias_if:-eth0} dhclient-alias_addr=${dhclient-alias_if:-192.168.0.123} dhclient-alias_mask=${dhclient-alias_if:-255.255.255.255} run_rc_command "$1"