summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
diff options
context:
space:
mode:
Diffstat (limited to 'etc/rc.d')
-rw-r--r--etc/rc.d/ipfw13
1 files changed, 13 insertions, 0 deletions
diff --git a/etc/rc.d/ipfw b/etc/rc.d/ipfw
index 531063f..e434123 100644
--- a/etc/rc.d/ipfw
+++ b/etc/rc.d/ipfw
@@ -9,6 +9,7 @@
# KEYWORD: FreeBSD
. /etc/rc.subr
+. /etc/network.subr
name="ipfw"
rcvar="firewall_enable"
@@ -40,6 +41,16 @@ ipfw_start()
# Network Address Translation daemon
#
if checkyesno natd_enable; then
+ dhcp_list="`list_net_interfaces dhcp`"
+ for ifn in ${dhcp_list}; do
+ case ${natd_interface} in
+ ${ifn})
+ natd_flags="$natd_flags -dynamic"
+ ;;
+ *)
+ ;;
+ esac
+ done
if [ -n "${natd_interface}" ]; then
if echo ${natd_interface} | \
grep -q -E '^[0-9]+(\.[0-9]+){0,3}$'; then
@@ -75,6 +86,8 @@ ipfw_stop()
# Disable the firewall
#
${SYSCTL_W} net.inet.ip.fw.enable=0
+ killall natd;
+ sleep 2;
}
load_rc_config $name
OpenPOWER on IntegriCloud