Changeset 8335 for 2.0


Ignore:
Timestamp:
Aug 13, 2010, 3:23:12 PM (14 years ago)
Author:
richardvm
Message:

OK: Stupid didn't see the explicit allow

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2.0/nanobsd/nanobsd/files/etc/ipfw.sh

    r8334 r8335  
    44# Suck in the configuration variables.
    55if [ -z "${source_rc_confs_defined}" ]; then
    6         if [ -r /etc/defaults/rc.conf ]; then
    7                 . /etc/defaults/rc.conf
    8                 source_rc_confs
    9         elif [ -r /etc/rc.conf ]; then
    10                 . /etc/rc.conf
    11         fi
     6        if [ -r /etc/defaults/rc.conf ]; then
     7                . /etc/defaults/rc.conf
     8                source_rc_confs
     9        elif [ -r /etc/rc.conf ]; then
     10                . /etc/rc.conf
     11        fi
    1212fi
    1313
    1414setup_loopback () {
    15         ############
    16         # Only in rare cases do you want to change these rules
    17         #
    18         ${fwcmd} add 100 pass all from any to any via lo0
    19         ${fwcmd} add 200 deny all from any to 127.0.0.0/8
    20         ${fwcmd} add 300 deny ip from 127.0.0.0/8 to any
     15        ############
     16        # Only in rare cases do you want to change these rules
     17        #
     18        ${fwcmd} add 100 pass all from any to any via lo0
     19        ${fwcmd} add 200 deny all from any to 127.0.0.0/8
     20        ${fwcmd} add 300 deny ip from 127.0.0.0/8 to any
    2121}
    2222
     
    2626case ${firewall_quiet} in
    2727[Yy][Ee][Ss])
    28         fwcmd="/sbin/ipfw -q"
    29         ;;
     28        fwcmd="/sbin/ipfw -q"
     29        ;;
    3030*)
    31         fwcmd="/sbin/ipfw"
    32         ;;
     31        fwcmd="/sbin/ipfw"
     32        ;;
    3333esac
    3434
     
    9292${fwcmd} add 6002 allow udp from any to me 123 via $internalif
    9393
     94# Block anything else
     95${fwcmd} add 65000 deny ip from any to any
    9496
Note: See TracChangeset for help on using the changeset viewer.