/etc/rc.firewall and dhclient(8)
freebsd-questions-local at be-well.ilk.org
Mon Jan 16 07:00:30 PST 2006
<pfgshield-freebsd at yahoo.com> writes:
> I activated my firewall "client" configuration on my desktop that uses dhcp for
> a cable modem.
> Everything works fine (I even enabled ping), however, everytime I shutdown and
> restart the modem I find myself having to check /var/db/dhclient.leases.xl0 to
> edit /etc/rc.firewall to change $net and $ip.
> Is there an easy way to automate this?
That's what the "me" keyword is for in the ipfw syntax.
Using this would require you to create a slightly customised version
of the firewall rules file.
Alternatively, you could have dhclient write the parameters out to a
file that the firewall script would read in. dhclient-script(8) has
"hooks" for this.
More information about the freebsd-questions