summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/pf
Commit message (Collapse)AuthorAgeFilesLines
* Prepare for the removal of set_rcvar() by changing the rcvar=dougb2012-01-141-1/+1
| | | | | | | | | | | | | | | assignments to the literal values it would have returned. The concept of set_rcvar() was nice in theory, but the forks it creates are a drag on the startup process, which is especially noticeable on slower systems, such as embedded ones. During the discussion on freebsd-rc@ a preference was expressed for using ${name}_enable instead of the literal values. However the code portability concept doesn't really apply since there are so many other places where the literal name has to be searched for and replaced. Also, using the literal value is also a tiny bit faster than dereferencing the variables, and every little bit helps.
* Remove redundant keywords.hrs2011-05-171-1/+1
| | | | Submitted by: wxs
* Add pf in quiet modekevlo2010-12-171-2/+2
|
* In regards to the "Starting foo:" type messages at boot time, create anddougb2009-10-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | employ a more generic solution, and use it in the individual rc.d scripts that also have an $rc_quiet test: 1. Add check_startmsgs() to rc.subr. 2. In the rc.d scripts that use rc_quiet (and rc.subr) substitute variations of [ -z "$rc_quiet" ] with check_startmsgs 3. In savecore add a trailing '.' to the end of the message to make it more consistent with other scripts. 4. In newsyslog remove a : before the terminal '.' since we do not expect there to be anything printed out in between to make it more consistent. 5. In the following scripts change "quotes" to 'quotes' where no variables exist in the message: savecore pf newsyslog 6. In the following scripts substitute if/then/fi for the simpler (and more consistent) check_startmsgs &&: faith stf 7. In the following scripts separate the "Starting foo:" from the terminal '.' to make them more consistent: moused hostname pf 8. In nfsclient move the message to its own line to avoid a style bug 9. In pf rc_quiet does not apply to the _stop method, so remove the test there. 10. In motd add 'quotes' around the terminal '.' for consistency
* Reverse the effect of r193198 for pf and ipfw which will once againdougb2009-06-261-1/+1
| | | | | | | | | | | | | | | allow them to start after netif. There were too many problems reported with this change in the short period of time that it lived in HEAD, and we are too late in the release cycle to properly shake it out. IMO the issue of having the firewalls up before the network is still a valid concern, particularly for pf whose default state is wide open. However properly solving this issue is going to take some investment on the part of the people who actually use those tools. This is not a strict reversion of all the changes for r193198 since it also included some simplification of the BEFORE/REQUIRE logic which is still valid for ipfilter and ip6fw.
* Make the pf and ipfw firewalls start before netif, just like ipfilterdougb2009-06-011-1/+1
| | | | | already does. This eliminates a logical inconsistency, and a small window where the system is open after the network comes up.
* As previously discussed, add the svn:executable property to all scriptsdougb2008-07-161-0/+0
|
* The pfctl(8) program is already pretty verbose, so don't print extramtm2008-07-111-2/+2
| | | | information in quiet mode.
* FILESYSTEMS requires root, so requiring both of them is redundant.des2007-04-091-1/+1
|
* Add a dummy script, FILESYSTEMS, which depends on root and mountcritlocaldes2007-04-021-1/+1
| | | | | | | | | | | | and takes over mountcritlocal's role as the early / late divider. This makes it far easier to add rc scripts which need to run early, such as a startup script for zfs, which is right around the corner. This change should be a no-op; I have verified that the only change in rcorder's output is the insertion of FILESYSTEMS immediately after mountcritlocal. MFC after: 3 weeks
* Use $required_modules wherever suitable. Use load_kld() in specialyar2006-12-311-15/+1
| | | | cases. So we get rid of quite a few lines of duplicated code.
* Use an option form better matching the manual.obrien2006-06-051-1/+1
|
* Backout r1.11...rse2005-11-101-1/+1
| | | | | | | | | | | | | | | | | | > > There is no need to explicitly add "status" to $extra_commands in > > the /etc/rc.d/pf script as it is implicitly added by /etc/rc.subr's > > run_rc_command() because of the existing $pf_program. > > > > Submitted by: Christoph Schug <chris@schug.net> ...because as yar@ points out: "[...] you were relying on evil side-effects of the variable being named *_program. hose side-effect have been eliminated since rc.subr rev. 1.42. [...] The point is that the default "status" method is for rc.d scripts that handle startup and shutdown of conventional daemons, and not for custom tasks like the pf case." The change is still valid in RELENG_6 (and still doesn't have to be backed out) as long as rc.subr:r1.42 is not MFC'ed to RELENG_6, too.
* There is no need to explicitly add "status" to $extra_commands inrse2005-11-031-1/+1
| | | | | | | | the /etc/rc.d/pf script as it is implicitly added by /etc/rc.subr's run_rc_command() because of the existing $pf_program. Submitted by: Christoph Schug <chris@schug.net> MFC after: 1 week
* Use available rc.subr features.yar2005-10-021-27/+16
| | | | | Reduce code duplication. Follow the current style of rc.d scripting.
* Record dependency on the newly introduced pfsync.yar2005-10-021-2/+2
| | | | | | | | | | | | | | Start before routing for better system protection. (pf used to start late during system boot, after many a network daemon have started already, which sucked from security POV.) Remark: For maximum security, pf should start before netif, but it would create a dependency loop because pfsync has to start after netif, yet before pf. Discussed with: mlaier on -pf MFC after: 5 days
* Simplify the code by making use of 'kldstat -q -m <mod>'.pjd2005-09-241-6/+3
| | | | No objections from: mlaier
* When reloading rules via rc.d/pf, flush everything but existing stateseanc2005-04-041-1/+3
| | | | | | | | | entries that way when rules are read in, it doesn't break established connections. Approved by: mlaier Reviewed by: rc MFC after: 3 weeks
* - Add 'check' command for checking rules syntax.pjd2004-10-251-11/+14
| | | | | | - Before flushing rules in 'reload' command, check first if rules are correct. - Do not duplicate checking if $pf_rules file exists.
* Remove the requirement for the FreeBSD keyword as it no longermtm2004-10-071-1/+1
| | | | | | | makes any sense. Discussed with: dougb, brooks MFC after: 3 days
* We don't have any providers of `beforenetlkm' in FreeBSD. Remove thekeramida2004-09-161-1/+1
| | | | | | dependency to it from our rc.d scripts. Approved by: mtm
* Swap order of ruleset load and enabling pf to work around a problem on altqmlaier2004-06-231-3/+3
| | | | startup. Moreover, this is the "more logic" order.
* Add rc.d script to start pflogd and add rcvars etc. Also document vars inmlaier2004-04-021-1/+1
| | | | | | | rc.conf(5) and put a sample entry to newsyslog.conf Reviewed by: -current Approved by: bms(mentor)
* Add rc.d script for pf(4) (more to come once pflogd(8) works as well).mlaier2004-03-231-0/+93
Update defaults and write some lines for rc.conf(5) also. Mostly dup'ed from ipf Reviewed by: -current Approved by: bms(mentor)
OpenPOWER on IntegriCloud