Date: Mon, 26 Mar 2001 14:46:17 -0500 From: Mikel <mikel@ocsinternet.com> To: Johnny Dang <johnny.dang@johnnydang.net> Cc: FreeBSD IpFW <FREEBSD-IPFW@FreeBSD.ORG> Subject: Re: Scripting with IPFW Message-ID: <3ABF9C88.85B4B13E@ocsinternet.com> References: <Pine.BSF.4.21.0103261316570.9647-100000@johnnydang.net>
next in thread | previous in thread | raw e-mail | index | archive | help
in order for this to work you need to change a couple of things...
rc.conf:
ifconfig_dec0="dchp"
rc.dhclient: (if you are on road runner cable you may need to do this...)
interface "dec0" {
send host-name "bubba";
send dhcp-client-identifier 00:d0:b7:e6:fc:15; # this is your MAC
address
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name;
require subnet-mask, domain-name-servers;
}
rc.natd:
interface dec0
dynamic
use_sockets
same_ports
log yes
rc.firewall:
CHANGE ALL ${oip} based rules to use ${oif} instead.
Johnny Dang wrote:
> Hello all experts out there,
>
> I have a Linux box (used to run ipchains). I then move the box to FreeBSD
> 4.2... Set it up and everything was running fine (with the help of your
> guys). Now, I have a small problem. Since the DEC0 of my new IPFW is a
> DHCP client, I would love to have the script grab the IP(rather than
> specify it)... I have this line on Linux and it was fine:
>
> WAN_IP=`ifconfig $WAN_NIC | grep inet | cut -d: -f2 | cut -d " " -f1` ...
> Now, how can I can set it up to put it under FreeBSD rc.firewall
> de0=??????????
>
> Thanks for your help.
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++
> "The instructions said to use Windows 98 or better,
> so I installed FreeBSD...It is working now!..."
> ++++++++++++++++++++++++++++++++++++++++++++++++++
> Johnny Dang <Johnny.Dang@johnnydang.net>
> Senior Network Engineer/MCSE + Internet
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-ipfw" in the body of the message
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ipfw" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3ABF9C88.85B4B13E>
