root/floppyfw/files/dmz-udhcpd.conf.sh

Revision 103, 0.8 KB (checked in by root, 6 years ago)

A better DMZ configuration, part 1.

  • Property svn:executable set to *
Line 
1#!/bin/sh
2
3# $Id:$
4
5. /etc/config
6. /etc/dmz.info
7
8DHCPDDOMAIN=`for DOMAINS in $(grep search /etc/resolv.conf | sed 's/^search//'); do echo $DOMAINS; break; done`
9
10cat >> /etc/dmz-udhcpd.conf <<EOF
11interface       $DMZ_DEVICE
12start           $DMZ_DHCP_RANGE_START
13end             $DMZ_DHCP_RANGE_END
14# max_leases    103
15lease_file      /var/state/dmz-udhcpd.leases
16pidfile         /var/run/dmz-udhcpd.pid
17option          dns             $DMZ_IP
18option          subnet          $DMZ_NETMASK
19option          broadcast       $DMZ_BROADCAST
20option          router          $DMZ_IP
21option          domain          $DHCPDDOMAIN
22option          lease           864000                                   
23$OPS
24EOF
25
26# Adding the /etc/ethers file:
27# I'll use the same file for both. shouldn't matter.
28sed -e '/^#/d;/^$/d;s/^/static_lease /' /etc/ethers >> /etc/dmz-udhcpd.conf
Note: See TracBrowser for help on using the browser.