New pf install on Freebsd7 seem to be a slow starter.

Dennis hideous at mail.ru
Thu Jul 10 14:51:08 UTC 2008


>>>>> in your pf.conf and
>>>>>
>>>>> pfctl -t goodguys -T add \
>>>>>  something.somewhere.com \
>>>>>  somethingelse.somewhere.com \
>>>>>   xxx.yyy.zzz.qqq &
>>>>>
>>>>> into your /etc/rc.local, so pf will start up without delays.
>>>>>
>>>> I forgot to mention that I'm on a FreeBSD 7 system so the rc.local thing 
>>>> must go somewhere else, do you know where?
>>>>
>> LJ> If I've understood this right this will only be right at the time the
>> LJ> machine starts. How do I get to know if the hosts changes their 
>> LJ> addresses. Should I invoke a cron job that does the same as you suggested?
>> LJ> Thanks
>> 
>> Yes. Also you would have to clear the table before loading new IP
>> addresses into it. Querying authoritative server with, for example
>> `nslookup`, instead of relying on local resolver would make this thing
>> more robust.
>> 
>> Regards,
>>   Dennis.

LJ> Thank you Dennis.

LJ> I've started on a script to run as root fron cron.

LJ> I need a little help to invoke the nslookup function and make it go into
LJ> the goodguys table.

LJ> The flushing part I've got ;-)
LJ> But then what do I do?
LJ> ----------------------------
LJ> #!/bin/sh
LJ> pfctl -F Tables

LJ> ----------------------------

LJ> Thanks
LJ> /Leslie

( cat goodguys.names | ( xargs -n1 -J% nslookup % nf2.no-ip.com ) | egrep -o '(([[:digit:]])+\.){3}[[:digit:]]+$' | xargs -J% pfctl -t aaa -T add % ) &

of course, utilities and files should have full paths in their names
for a script.

Regards,
 Dennis.



More information about the freebsd-pf mailing list