xref: /freebsd/libexec/rc/rc.d/ipnat (revision 2008043f386721d58158e37e0d7e50df8095942d)
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
21ipnat_start()
22{
23	echo "Installing NAT rules."
24	${ipnat_program} -CF -f ${ipnat_rules} ${ipnat_flags}
25}
26
27run_rc_command "$1"
28