freebsd-nq/etc/rc.d/ipnat
Lars Engels 6c1a5e837d - Add descriptions to most of the rc scripts. Those are mostly taken from their
daemon's manpage and probably improved.
- Consistently use "filesystem" not "file system".

Approved by:	bapt, brueffer
Differential Revision:	D452
2016-04-23 16:10:54 +00:00

30 lines
522 B
Bash
Executable File

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: ipnat
# REQUIRE: ipfilter
# KEYWORD: nojail
. /etc/rc.subr
name="ipnat"
desc="user interface to the NAT subsystem"
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"