ipfirewall tricks

Atom Powers atom.powers at gmail.com
Wed May 3 03:41:59 UTC 2006


On 5/2/06, Bryan Curl <bc3910 at gmail.com> wrote:
> I want to limit time my kids spend on the internet.
> The way I am doing it is to make varying, seperate ipf.rules files and
> install them from cron at the appropriate time.
> Problem is, if I make a change to one file, I generally have to update all
> the others accordingly.
>
> Is there a better way? I have read man ipf but didnt come out with any
> ideas.

I would use pf and have something like this:

pf.conf
----
block out all from <kids> to any
----

crontab
----
pfctl -t kids -T add kids.ip.to.block
pfctl -t kids -T del kids.ip.to.allow
----

You can also keep the IPs in a flat file and just tell pf to re-read
the file (or read a different file) to update the table.

I love pf.

--
--
Perfection is just a word I use occasionally with mustard.
--Atom Powers--


More information about the freebsd-questions mailing list