xref: /freebsd-13.1/libexec/rc/rc.d/ipnat (revision 51da4b19)
10696600cSBjoern A. Zeeb#!/bin/sh
20696600cSBjoern A. Zeeb#
30696600cSBjoern A. Zeeb# $FreeBSD$
40696600cSBjoern A. Zeeb#
50696600cSBjoern A. Zeeb
60696600cSBjoern A. Zeeb# PROVIDE: ipnat
7*795be686SCy Schubert# KEYWORD: nojailvnet
80696600cSBjoern A. Zeeb
90696600cSBjoern A. Zeeb. /etc/rc.subr
100696600cSBjoern A. Zeeb
110696600cSBjoern A. Zeebname="ipnat"
120696600cSBjoern A. Zeebdesc="user interface to the NAT subsystem"
130696600cSBjoern A. Zeebrcvar="ipnat_enable"
140696600cSBjoern A. Zeebload_rc_config $name
150696600cSBjoern A. Zeebstart_cmd="ipnat_start"
160696600cSBjoern A. Zeebstop_cmd="${ipnat_program} -F -C"
170696600cSBjoern A. Zeebreload_cmd="${ipnat_program} -F -C -f ${ipnat_rules}"
180696600cSBjoern A. Zeebextra_commands="reload"
190696600cSBjoern A. Zeebrequired_files="${ipnat_rules}"
200696600cSBjoern A. Zeebrequired_modules="ipl:ipfilter"
210696600cSBjoern A. Zeeb
220696600cSBjoern A. Zeebipnat_start()
230696600cSBjoern A. Zeeb{
240696600cSBjoern A. Zeeb	echo "Installing NAT rules."
250696600cSBjoern A. Zeeb	${ipnat_program} -CF -f ${ipnat_rules} ${ipnat_flags}
260696600cSBjoern A. Zeeb}
270696600cSBjoern A. Zeeb
280696600cSBjoern A. Zeebrun_rc_command "$1"
29