3 # $NetBSD: ipnat,v 1.6 2000/09/19 13:04:38 lukem Exp $
4 # $FreeBSD: src/etc/rc.d/ipnat,v 1.8 2003/04/30 02:54:17 mtm Exp $
5 # $DragonFly: src/etc/rc.d/ipnat,v 1.3 2005/11/19 21:47:32 swildner Exp $
10 # BEFORE: DAEMON netif
19 start_precmd
="ipnat_precmd"
20 start_cmd
="ipnat_start"
21 stop_cmd
="${ipnat_program} -F -C"
22 reload_cmd
="${ipnat_program} -F -C -f ${ipnat_rules}"
23 extra_commands
="reload"
28 # Make sure ipfilter is loaded before continuing
29 if ! ${SYSCTL} net.inet.ipf.fr_pass
>/dev
/null
2>&1; then
31 info
'IP-filter module loaded.'
33 err
1 'IP-filter module failed to load.'
41 if [ ! -f ${ipnat_rules} ]; then
45 echo -n "Installing NAT rules."
46 ${ipnat_program} -CF -f ${ipnat_rules} ${ipnat_flags}