summaryrefslogtreecommitdiff
path: root/root
diff options
context:
space:
mode:
authorMike Baker <mbm@openwrt.org>2004-07-07 05:11:47 +0000
committerMike Baker <mbm@openwrt.org>2004-07-07 05:11:47 +0000
commitb59277aa017abb7a1ecac396efba7f2e93cb85a0 (patch)
tree1b2ab5bae46d38e8547264edb4134c42252a70c1 /root
parent2fc18097444f65588357bd6fb823cdcf5c0b56a2 (diff)
downloadmtk-20170518-b59277aa017abb7a1ecac396efba7f2e93cb85a0.zip
mtk-20170518-b59277aa017abb7a1ecac396efba7f2e93cb85a0.tar.gz
mtk-20170518-b59277aa017abb7a1ecac396efba7f2e93cb85a0.tar.bz2
moving to dnsmasq as dhcp server
SVN-Revision: 75
Diffstat (limited to 'root')
-rw-r--r--root/etc/dnsmasq.conf22
-rwxr-xr-xroot/etc/init.d/S50services3
-rw-r--r--root/etc/inittab1
-rw-r--r--root/etc/udhcpd.conf12
4 files changed, 23 insertions, 15 deletions
diff --git a/root/etc/dnsmasq.conf b/root/etc/dnsmasq.conf
new file mode 100644
index 0000000..c62f7f9
--- /dev/null
+++ b/root/etc/dnsmasq.conf
@@ -0,0 +1,22 @@
+# filter what we send upstream
+domain-needed
+bogus-priv
+filterwin2k
+
+# allow /etc/hosts and dhcp lookups via *.lan
+local=/lan/
+domain=lan
+
+# no dns queries from the wan
+except-interface=vlan1
+
+# enable dhcp (start,end,netmask,leasetime)
+dhcp-range=192.168.1.100,192.168.1.250,255.255.255.0,12h
+dhcp-leasefile=/tmp/dhcp.leases
+
+# allow a /etc/ethers for static hosts
+read-ethers
+
+# other useful options:
+# default route(s): dhcp-option=3,192.168.1.1,192.168.1.2
+# dns server(s): dhcp-option=6,192.168.1.1,192.168.1.2
diff --git a/root/etc/init.d/S50services b/root/etc/init.d/S50services
index 4b24e42..bdd1102 100755
--- a/root/etc/init.d/S50services
+++ b/root/etc/init.d/S50services
@@ -1,5 +1,4 @@
#!/bin/sh
/usr/sbin/telnetd -l /bin/login
/usr/sbin/httpd -p 80 -h /www -r WRT54G Router
-/usr/sbin/udhcpd /etc/udhcpd.conf
-#dnsmasq started from /etc/inittab
+/usr/sbin/dnsmasq
diff --git a/root/etc/inittab b/root/etc/inittab
index 3425bf3..352f6a4 100644
--- a/root/etc/inittab
+++ b/root/etc/inittab
@@ -1,3 +1,2 @@
::sysinit:/etc/init.d/rcS
::shutdown:/sbin/halt
-::respawn:/usr/sbin/dnsmasq -d -l /tmp/udhcpd.leases -s lan
diff --git a/root/etc/udhcpd.conf b/root/etc/udhcpd.conf
deleted file mode 100644
index a82eb37..0000000
--- a/root/etc/udhcpd.conf
+++ /dev/null
@@ -1,12 +0,0 @@
-max_leases 200
-start 192.168.1.20
-end 192.168.1.250
-interface br0
-lease_file /tmp/udhcpd.leases
-domain lan
-pidfile /tmp/udhcpd.pid
-option dns 192.168.1.1
-option subnet 255.255.255.0
-option router 192.168.1.1
-lease 7200
-