| 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 | # Performance profiling
|
---|
| 71 | iperf_enable="YES"
|
---|
| 72 |
|
---|
| 73 | # HTTP(S) proxy server
|
---|
| 74 | tinyproxy_enable="NO"
|
---|
| 75 |
|
---|
| 76 | # Make sure generated ssh keys are saved
|
---|
| 77 | nanobsd_save_sshkeys_enable="YES"
|
---|
| 78 |
|
---|
| 79 | # low-memory footprint DHCP and non-autoritive recursive DNS resolver
|
---|
| 80 | dnsmasq_enable="YES"
|
---|
| 81 |
|
---|
| 82 | # Explicitly disable the memory-hungry alternatives
|
---|
| 83 | dhcpd_enable="NO"
|
---|
| 84 | dhcpd_flags="-q"
|
---|
| 85 | named_enable="NO"
|
---|
| 86 | named_chrootdir=""
|
---|
| 87 | named_auto_forward="YES"
|
---|
| 88 |
|
---|
| 89 | # WL Captive Portal and WL Web Config Overview
|
---|
| 90 | thttpd_enable="YES"
|
---|
| 91 | http302_enable="YES"
|
---|
| 92 |
|
---|
| 93 | # Hybrid setup, requires outgoing VPN Server
|
---|
| 94 | openvpn_enable="NO"
|
---|
| 95 | openvpn_if="tap"
|
---|
| 96 | openvpn_configfile="/usr/local/etc/openvpn/client.conf"
|
---|
| 97 |
|
---|
| 98 | # Enable the firewall by default
|
---|
| 99 | pf_enable="YES"
|
---|
| 100 | pf_rules="/etc/pf.open.conf"
|
---|
| 101 | pf_flags=''
|
---|
| 102 | # Used with Proxy Configuration
|
---|
| 103 | #pf_rules="/etc/pf.proxy.conf"
|
---|
| 104 | #pf_flags="-D ext_if=vr0 -D int_if=vr1 -D publicnat={80,443}"
|
---|
| 105 | # Used with Node Configuration
|
---|
| 106 | #pf_rules="/etc/pf.node.conf"
|
---|
| 107 | #pf_flags="-D captive_portal_interfaces=wlan0,wlan1"
|
---|
| 108 | # Used with Hybrid Configuration
|
---|
| 109 | #pf_rules="/etc/pf.hybrid.conf"
|
---|
| 110 | #pf_flags="-D ext_if=vr0 -D captive_portal_interfaces=wlan0 -D publicnat=80,443"
|
---|
| 111 |
|
---|
| 112 |
|
---|
| 113 | # Autogenerated flags are used during runtime
|
---|
| 114 | rc_conf_running='/etc/rc.conf.running'
|
---|
| 115 | if [ -r $rc_conf_running ]; then
|
---|
| 116 | . $rc_conf_running
|
---|
| 117 | else
|
---|
| 118 | : > $rc_conf_running
|
---|
| 119 | fi
|
---|