rc.d: Add ipfw3 rc script
commit6fd380c22bc66887486a4f959f6198e7f7bb3d9c
authorAaron LI <aly@aaronly.me>
Thu, 29 Mar 2018 14:12:33 +0000 (29 22:12 +0800)
committerAaron LI <aly@aaronly.me>
Fri, 30 Mar 2018 01:03:49 +0000 (30 09:03 +0800)
tree9c4b854033f2b1529b665611ddc0c2bd1f574863
parent0e7badd402459228d38ddfb0e06224b5a3d9fdf8
rc.d: Add ipfw3 rc script

To use ipfw3, add 'ipfw3_enable=YES' to /etc/rc.conf .  By default, only
the 'ipfw3' and 'ipfw3_basic' modules will be loaded.  If you need more
ipfw3 modules, set them with 'ipfw3_modules="<modules> ..."' in
/etc/rc.conf .  See also the rc.conf(5) man page.

This ipfw3 rc script is largely based on the ipfw script.

The /etc/ipfw3.rules (a shell script) should be present to setup the
firewall rules, otherwise the default setup will block all incoming
connections, including your current connection!

NOTE:
I wrote this script for use in my VPS last year, but switched to
PF later, so more tests and improvements (e.g., flush tables on stop)
to this script are needed.

Reviewed-by: swildner
etc/defaults/rc.conf
etc/rc.d/Makefile
etc/rc.d/ipfw3 [new file with mode: 0644]
share/man/man5/rc.conf.5