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