#!/bin/sh
#
# Replacement dnsmasq server configuration used by the dreamplug

cat > /etc/dnsmasq.conf <<EOF
log-facility=DAEMON

local=/fbx/
local=/freedombox/

# We will serve this DNS domain
# (DHCP hosts will receive a .lan suffix in DNS)
domain=lan
EOF

cat > /etc/dnsmasq.d/freedombox-upstream-dns <<EOF
# Upstream DNS server
# FIXME this should be updated on boot.
server=192.168.0.1@eth1
EOF

cat > /etc/dnsmasq.d/freedombox-dhcp-server <<EOF
# We're the authoritative dhcpd
# Read the manpage for a good explanation of what this does
dhcp-authoritative

# We are going to serve hosts for:
# - LAN (192.168.1.0/24) (Only static hosts)
# - WLAN (192.168.2.0/24)
# New clients will receive an IP from the WLAN range.

dhcp-range=set:lan,192.168.1.10,192.168.1.100,255.255.255.0,2h
# dhcp-range=set:wlan,192.168.2.10,192.168.2.100,255.255.255.0,2h
EOF
