routing (44668) | routing (44992) |
---|---|
1#!/bin/sh - 2# | 1#!/bin/sh - 2# |
3# $Id: rc.network,v 1.39 1999/01/13 17:32:37 joerg Exp $ | 3# $Id: rc.network,v 1.40 1999/03/11 16:17:24 jfitz Exp $ |
4# From: @(#)netstart 5.9 (Berkeley) 3/30/91 5 6# Note that almost all the user-configurable behavior is no longer in 7# this file, but rather in /etc/rc.conf. Please check that file 8# first before contemplating any changes here. If you do need to change 9# this file for some reason, we would like to know about it. 10 11# First pass startup stuff. --- 83 unchanged lines hidden (view full) --- 95 echo "Kernel firewall module loaded." 96 else 97 echo "Warning: firewall kernel module failed to load." 98 fi 99 fi 100 101 # Load the filters if required 102 if [ $firewall_in_kernel = 1 ]; then | 4# From: @(#)netstart 5.9 (Berkeley) 3/30/91 5 6# Note that almost all the user-configurable behavior is no longer in 7# this file, but rather in /etc/rc.conf. Please check that file 8# first before contemplating any changes here. If you do need to change 9# this file for some reason, we would like to know about it. 10 11# First pass startup stuff. --- 83 unchanged lines hidden (view full) --- 95 echo "Kernel firewall module loaded." 96 else 97 echo "Warning: firewall kernel module failed to load." 98 fi 99 fi 100 101 # Load the filters if required 102 if [ $firewall_in_kernel = 1 ]; then |
103 if [ -n "$firewall_enable" -a -f /etc/rc.firewall -a \ 104 "x$firewall_enable" = "xYES" ] ; then | 103 if [ -f /etc/rc.firewall -a X"$firewall_enable" = X"YES" ]; then |
105 . /etc/rc.firewall | 104 . /etc/rc.firewall |
106 echo "Firewall rules loaded." | 105 echo -n 'Firewall rules loaded, starting divert daemons: ' 106 107 # Network Address Translation daemon 108 if [ X"${natd_enable}" = X"YES" -a -n "${natd_interface}" ]; then 109 if echo ${natd_interface} | \ 110 grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then 111 natd_ifarg="-a ${natd_interface}" 112 else 113 natd_ifarg="-n ${natd_interface}" 114 fi 115 echo -n ' natd'; ${natd_program} ${natd_flags} ${natd_ifarg} 116 fi 117 echo '.' |
107 else 108 IPFW_DEFAULT=`ipfw l 65535` 109 if [ "$IPFW_DEFAULT" = "65535 deny ip from any to any" ]; then 110 echo -n "Warning: kernel has firewall functionality, " 111 echo "but firewall rules are not enabled." 112 echo " All ip services are disabled." 113 fi 114 fi --- 191 unchanged lines hidden (view full) --- 306 kerberos ${stash_flag} >> /var/log/kerberos.log & 307 if [ "X${kadmind_server_enable}" = "XYES" ]; then 308 echo -n ' kadmind'; \ 309 (sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) & 310 fi 311 unset stash_flag 312 fi 313 | 118 else 119 IPFW_DEFAULT=`ipfw l 65535` 120 if [ "$IPFW_DEFAULT" = "65535 deny ip from any to any" ]; then 121 echo -n "Warning: kernel has firewall functionality, " 122 echo "but firewall rules are not enabled." 123 echo " All ip services are disabled." 124 fi 125 fi --- 191 unchanged lines hidden (view full) --- 317 kerberos ${stash_flag} >> /var/log/kerberos.log & 318 if [ "X${kadmind_server_enable}" = "XYES" ]; then 319 echo -n ' kadmind'; \ 320 (sleep 20; kadmind ${stash_flag} >/dev/null 2>&1 &) & 321 fi 322 unset stash_flag 323 fi 324 |
314 # Network Address Translation daemon 315 if [ "X${natd_enable}" = X"YES" -a X"${natd_interface}" != X"" \ 316 -a X"${firewall_enable}" = X"YES" ]; then 317 if echo ${natd_interface} | \ 318 grep -q -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$'; then 319 natd_ifarg="-a ${natd_interface}" 320 else 321 natd_ifarg="-n ${natd_interface}" 322 fi 323 echo -n ' natd'; natd ${natd_flags} ${natd_ifarg} 324 fi 325 | |
326 echo '.' 327 network_pass3_done=YES 328} | 325 echo '.' 326 network_pass3_done=YES 327} |