Changeset View
Changeset View
Standalone View
Standalone View
head/etc/rc.d/ipnat
#!/bin/sh | #!/bin/sh | ||||
# | # | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
# PROVIDE: ipnat | # PROVIDE: ipnat | ||||
# REQUIRE: ipfilter | # REQUIRE: ipfilter | ||||
# KEYWORD: nojail | # KEYWORD: nojail | ||||
. /etc/rc.subr | . /etc/rc.subr | ||||
name="ipnat" | name="ipnat" | ||||
desc="user interface to the NAT subsystem" | |||||
rcvar="ipnat_enable" | rcvar="ipnat_enable" | ||||
load_rc_config $name | load_rc_config $name | ||||
start_cmd="ipnat_start" | start_cmd="ipnat_start" | ||||
stop_cmd="${ipnat_program} -F -C" | stop_cmd="${ipnat_program} -F -C" | ||||
reload_cmd="${ipnat_program} -F -C -f ${ipnat_rules}" | reload_cmd="${ipnat_program} -F -C -f ${ipnat_rules}" | ||||
extra_commands="reload" | extra_commands="reload" | ||||
required_files="${ipnat_rules}" | required_files="${ipnat_rules}" | ||||
required_modules="ipl:ipfilter" | required_modules="ipl:ipfilter" | ||||
ipnat_start() | ipnat_start() | ||||
{ | { | ||||
echo "Installing NAT rules." | echo "Installing NAT rules." | ||||
${ipnat_program} -CF -f ${ipnat_rules} ${ipnat_flags} | ${ipnat_program} -CF -f ${ipnat_rules} ${ipnat_flags} | ||||
} | } | ||||
run_rc_command "$1" | run_rc_command "$1" |