summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/network1
diff options
context:
space:
mode:
authordarrenr <darrenr@FreeBSD.org>2000-10-06 12:24:45 +0000
committerdarrenr <darrenr@FreeBSD.org>2000-10-06 12:24:45 +0000
commitd021730618104ab174a87b6e451c53d7d6debf2d (patch)
treee23a823196a77501fe133c2a42390d2317ad254a /etc/rc.d/network1
parentd3c4500dd0fe079f0851ccedbe2aaf5c512a5f7b (diff)
downloadFreeBSD-src-d021730618104ab174a87b6e451c53d7d6debf2d.zip
FreeBSD-src-d021730618104ab174a87b6e451c53d7d6debf2d.tar.gz
This brings support for IP Filter into rc.network and rc.conf with
the appropriate documentation added to rc.conf(5). If all goes well with this over the next few weeks, the PR will be closed with the pullup of patches back to 4-STABLE. PR: 20202 Submitted by: Gerhard Sittig <Gerhard.Sittig@gmx.net> Reviewed by: Darren Reed <darrenr@freebsd.org> Approved by: Darren Reed <darrenr@freebsd.org> Obtained from: Gerhard Sittig <Gerhard.Sittig@gmx.net>
Diffstat (limited to 'etc/rc.d/network1')
-rw-r--r--etc/rc.d/network131
1 files changed, 31 insertions, 0 deletions
diff --git a/etc/rc.d/network1 b/etc/rc.d/network1
index 8e97b44..4c9d621 100644
--- a/etc/rc.d/network1
+++ b/etc/rc.d/network1
@@ -32,6 +32,37 @@ network_pass1() {
echo -n ' hostname'
fi
+ # Establish ipfilter ruleset as early as possible (best in
+ # addition to IPFILTER_DEFAULT_BLOCK in the kernel config file)
+ #
+ case "${ipfilter_enable}" in
+ [Yy][Ee][Ss])
+ if [ -r "${ipfilter_rules}" ]; then
+ echo -n ' ipfilter';
+ ${ipfilter_program:-ipf -Fa -f} "${ipfilter_rules}" ${ipfilter_flags}
+ case "${ipmon_enable}" in
+ [Yy][Ee][Ss])
+ echo -n ' ipmon'
+ ${ipmon_program:-ipmon} ${ipmon_flags}
+ ;;
+ esac
+ case "${ipnat_enable}" in
+ [Yy][Ee][Ss])
+ if [ -r "${ipnat_rules}" ]; then
+ echo -n ' ipnat';
+ ${ipnat_program:-ipnat -CF -f} "${ipnat_rules}" ${ipnat_flags}
+ else
+ echo -n ' NO IPNAT RULES'
+ fi
+ ;;
+ esac
+ else
+ ipfilter_enable="NO"
+ echo -n ' NO IPF RULES'
+ fi
+ ;;
+ esac
+
# Set the domainname if we're using NIS
#
case ${nisdomainname} in
OpenPOWER on IntegriCloud