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