1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00
freebsd/etc/rc.d/ipnat

29 lines
479 B
Plaintext
Raw Normal View History

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: ipnat
# REQUIRE: ipfilter
# KEYWORD: nojail
. /etc/rc.subr
name="ipnat"
rcvar="ipnat_enable"
load_rc_config $name
start_cmd="ipnat_start"
stop_cmd="${ipnat_program} -F -C"
reload_cmd="${ipnat_program} -F -C -f ${ipnat_rules}"
extra_commands="reload"
required_files="${ipnat_rules}"
required_modules="ipl:ipfilter"
ipnat_start()
{
echo "Installing NAT rules."
${ipnat_program} -CF -f ${ipnat_rules} ${ipnat_flags}
}
run_rc_command "$1"