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