| 1 | # Stolen from /sbin/dhclient-script using using no /usr based binaries.
|
---|
| 2 | # Converts an commented list into a SEP (default space) seperated list.
|
---|
| 3 | make_list() {
|
---|
| 4 | SEP=${2:-' '}
|
---|
| 5 | oldifs="$IFS"
|
---|
| 6 | IFS="
|
---|
| 7 | "
|
---|
| 8 | list=""
|
---|
| 9 | for line in $1; do
|
---|
| 10 | line=${line%%[ \t#]*}
|
---|
| 11 | [ -n "$line" ] && list="$list$SEP$line"
|
---|
| 12 | done
|
---|
| 13 | IFS=${oldifs}
|
---|
| 14 | echo ${list##$SEP}
|
---|
| 15 | }
|
---|
| 16 |
|
---|
| 17 | # No kernel dumps as we don't have a place to store them
|
---|
| 18 | dumpdev="NO"
|
---|
| 19 |
|
---|
| 20 | # We are an router/gateway (wireless to be precise) running the lvrouted
|
---|
| 21 | # routing daemon.
|
---|
| 22 | gateway_enable="YES"
|
---|
| 23 | lvrouted_enable="YES"
|
---|
| 24 | lvrouted_flags="-u -s s00p3rs3kr3t -m 28"
|
---|
| 25 |
|
---|
| 26 | # Takes lvrouted an small while to create reachable network nodes, make sure to
|
---|
| 27 | # wait on it,to saves some bootup warnings.
|
---|
| 28 | netwait_enable="YES"
|
---|
| 29 | netwait_timeout="20"
|
---|
| 30 | netwait_ip="8.8.8.8 172.16.4.46 172.27.129.1 172.17.14.1"
|
---|
| 31 |
|
---|
| 32 |
|
---|
| 33 | # Block the full range as smaller subnets are used for allowances, this avoids
|
---|
| 34 | # traffic going out (due to the default route) to unreachable parts to the
|
---|
| 35 | # 172.16.0.0/12 network.
|
---|
| 36 | static_routes="quickstop"
|
---|
| 37 | route_quickstop="-net 172.16.0.0/12 127.0.0.1 -reject"
|
---|
| 38 |
|
---|
| 39 | # NTP server needs working config with WL network or internet on boot
|
---|
| 40 | # so some warnings might pop up, but no harm
|
---|
| 41 | ntpdate_enable="YES"
|
---|
| 42 | ntpdate_flags="-b -s"
|
---|
| 43 | ntpd_enable="YES"
|
---|
| 44 | ntpd_sync_on_start="YES"
|
---|
| 45 | ntpd_flags="-p /var/run/ntpd.pid -f /var/db/ntp.drift"
|
---|
| 46 |
|
---|
| 47 | # We need no running mail server
|
---|
| 48 | sendmail_enable="NONE"
|
---|
| 49 |
|
---|
| 50 | # Don't let syslog accept input from other remote hosts
|
---|
| 51 | syslogd_enable="YES"
|
---|
| 52 | syslogd_flags="-s -A -c"
|
---|
| 53 |
|
---|
| 54 | # Remote login without DNS checking as it might not also be functionable
|
---|
| 55 | # -u0 prevent sshd from making DNS requests unless the authentication mechanism
|
---|
| 56 | # or configuration requires it.
|
---|
| 57 | sshd_enable="YES"
|
---|
| 58 | sshd_flags="-u0"
|
---|
| 59 |
|
---|
| 60 | # Watchdogd: avoid visits because of unit not reachable. If sshd is not running
|
---|
| 61 | # for -t seconds than reboot. This is checked evert -s seconds.
|
---|
| 62 | watchdogd_enable="YES"
|
---|
| 63 | watchdogd_flags="-t 300 -s 60 -e '/etc/rc.d/sshd status'"
|
---|
| 64 |
|
---|
| 65 | # Monitoring deamons
|
---|
| 66 | nrpe2_enable="YES"
|
---|
| 67 | snmpd_enable="YES"
|
---|
| 68 | snmpd_flags="-Ls 1"
|
---|
| 69 |
|
---|
| 70 | # HTTP(S) proxy server
|
---|
| 71 | tinyproxy_enable="NO"
|
---|
| 72 |
|
---|
| 73 | # Make sure generated ssh keys are saved
|
---|
| 74 | nanobsd_save_sshkeys_enable="YES"
|
---|
| 75 |
|
---|
| 76 | # low-memory footprint DHCP and non-autoritive recursive DNS resolver
|
---|
| 77 | dnsmasq_enable="YES"
|
---|
| 78 |
|
---|
| 79 | # Explicitly disable the memory-hungry alternatives
|
---|
| 80 | dhcpd_enable="NO"
|
---|
| 81 | dhcpd_flags="-q"
|
---|
| 82 | named_enable="NO"
|
---|
| 83 | named_chrootdir=""
|
---|
| 84 | named_auto_forward="YES"
|
---|
| 85 |
|
---|
| 86 | # WL Captive Portal and WL Web Config Overview
|
---|
| 87 | thttpd_enable="YES"
|
---|
| 88 | http302_enable="YES"
|
---|
| 89 |
|
---|
| 90 | # Hybrid setup, requires outgoing VPN Server
|
---|
| 91 | openvpn_enable="NO"
|
---|
| 92 | openvpn_if="tap"
|
---|
| 93 | openvpn_configfile="/usr/local/etc/openvpn/client.conf"
|
---|
| 94 |
|
---|
| 95 | # Enable the firewall by default
|
---|
| 96 | pf_enable="YES"
|
---|
| 97 | pf_rules="/etc/pf.open.conf"
|
---|
| 98 | pf_flags=''
|
---|
| 99 | # Used with Proxy Configuration
|
---|
| 100 | #pf_rules="/etc/pf.proxy.conf"
|
---|
| 101 | #pf_flags="-D ext_if=vr0 -D int_if=vr1 -D publicnat={80,443}"
|
---|
| 102 | # Used with Node Configuration
|
---|
| 103 | #pf_rules="/etc/pf.node.conf"
|
---|
| 104 | #pf_flags="-D captive_portal_interfaces=wlan0,wlan1"
|
---|
| 105 | # Used with Hybrid Configuration
|
---|
| 106 | #pf_rules="/etc/pf.hybrid.conf"
|
---|
| 107 | #pf_flags="-D ext_if=vr0 -D captive_portal_interfaces=wlan0 -D publicnat=80,443"
|
---|
| 108 |
|
---|
| 109 |
|
---|
| 110 | # Autogenerated flags are used during runtime
|
---|
| 111 | rc_conf_running='/etc/rc.conf.running'
|
---|
| 112 | if [ -r $rc_conf_running ]; then
|
---|
| 113 | . $rc_conf_running
|
---|
| 114 | else
|
---|
| 115 | : > $rc_conf_running
|
---|
| 116 | fi
|
---|