2001-06-16 07:16:14 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2002-06-13 22:14:37 +00:00
|
|
|
# $FreeBSD$
|
2001-06-16 07:16:14 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: ipnat
|
2003-04-24 08:20:47 +00:00
|
|
|
# REQUIRE: ipfilter
|
2004-10-07 13:55:26 +00:00
|
|
|
# KEYWORD: nojail
|
2001-06-16 07:16:14 +00:00
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="ipnat"
|
2002-06-13 22:14:37 +00:00
|
|
|
rcvar=`set_rcvar`
|
2003-04-24 08:20:47 +00:00
|
|
|
load_rc_config $name
|
2001-06-16 07:16:14 +00:00
|
|
|
start_cmd="ipnat_start"
|
2003-04-24 08:20:47 +00:00
|
|
|
stop_cmd="${ipnat_program} -F -C"
|
|
|
|
reload_cmd="${ipnat_program} -F -C -f ${ipnat_rules}"
|
2001-06-16 07:16:14 +00:00
|
|
|
extra_commands="reload"
|
2006-12-31 10:37:18 +00:00
|
|
|
required_files="${ipnat_rules}"
|
|
|
|
required_modules="ipl:ipfilter"
|
2002-06-13 22:14:37 +00:00
|
|
|
|
|
|
|
ipnat_start()
|
|
|
|
{
|
2003-11-03 17:03:01 +00:00
|
|
|
echo "Installing NAT rules."
|
2003-04-24 18:14:52 +00:00
|
|
|
${ipnat_program} -CF -f ${ipnat_rules} ${ipnat_flags}
|
2001-06-16 07:16:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
run_rc_command "$1"
|