No need to do any shell script :
add the following lines in your /etc/rc.conf
(the important line is the third "-dynamic")
natd_enable="YES" # Enable natd (if firewall_enable == YES).
natd_interface="ed1" # Public interface or IPaddress to use.
natd_flags="-dynamic" # Additional flags for natd.
TfH
Mike Gruver wrote:
>
> > I have a FreeBSD server as a gatewar and firewall for a small LAN. It is
> > running NATD for the LAN with non-routable IPs on the secondary adapter,
> as
> > it is a dual-homed host, it uses DHCP to get an IP from the ISP for the
> > primary adapter. This presents a problem occasionally when a new lease is
> > given and the rc.firewall file needs to be updated.
> >
> > Does anyone have a script that parses the dhclient.leases file from the
> > rc.firewall at startup? What would be optimum are direct references in
> the
> > rc.firewall for the IP, subnet mask and router. I am not very strong with
> > shell programming (that should be obvious) so I have not been able to
> figure
> > this out. Seems like it should be straight forward and would be a nice
> > addition for most anyone who is running a FreeBSD firewall.
> >
> > Thanks,
> >
> > [EMAIL PROTECTED]
> >
> >
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-net" in the body of the message
--
Thierry Herbelot
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message