xref: /freebsd/libexec/rc/rc.d/ipnat (revision f99f0ee14e3af81c23150a6a340259ca8a33d01a)
1#!/bin/sh
2#
3#
4
5# PROVIDE: ipnat
6# KEYWORD: nojailvnet
7
8. /etc/rc.subr
9
10name="ipnat"
11desc="user interface to the NAT subsystem"
12rcvar="ipnat_enable"
13load_rc_config $name
14start_cmd="ipnat_start"
15stop_cmd="${ipnat_program} -F -C"
16reload_cmd="${ipnat_program} -F -C -f ${ipnat_rules}"
17extra_commands="reload"
18required_files="${ipnat_rules}"
19required_modules="ipl:ipfilter"
20
21# doesn't make sense to run in a svcj: config setting
22ipnat_svcj="NO"
23
24ipnat_start()
25{
26	echo "Installing NAT rules."
27	${ipnat_program} -CF -f ${ipnat_rules} ${ipnat_flags}
28}
29
30run_rc_command "$1"
31