summaryrefslogtreecommitdiffstats
path: root/etc/rc.d/ipnat
blob: 6914bceaf4664007f8ea59359ae69ad67f1c5c94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: ipnat
# REQUIRE: ipfilter
# KEYWORD: nojail

. /etc/rc.subr

name="ipnat"
desc="user interface to the NAT subsystem"
rcvar="ipnat_enable"
load_rc_config $name
start_cmd="ipnat_start"
stop_cmd="${ipnat_program} -F -C"
reload_cmd="${ipnat_program} -F -C -f ${ipnat_rules}"
extra_commands="reload"
required_files="${ipnat_rules}"
required_modules="ipl:ipfilter"

ipnat_start()
{
	echo "Installing NAT rules."
	${ipnat_program} -CF -f ${ipnat_rules} ${ipnat_flags}
}

run_rc_command "$1"
OpenPOWER on IntegriCloud