aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/dnsmasq.conf
blob: 12e8332cec88075fa75a4aa7623bda9f0e16f8ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#
#   IP Engineering Rescue Disk
#   Copyright (C) 2017 David M. Syzdek <david@syzdek.net>.
#
#   @SYZDEK_BSD_LICENSE_START@
#
#   Redistribution and use in source and binary forms, with or without
#   modification, are permitted provided that the following conditions are
#   met:
#
#      * Redistributions of source code must retain the above copyright
#        notice, this list of conditions and the following disclaimer.
#      * Redistributions in binary form must reproduce the above copyright
#        notice, this list of conditions and the following disclaimer in the
#        documentation and/or other materials provided with the distribution.
#      * Neither the name of David M. Syzdek nor the
#        names of its contributors may be used to endorse or promote products
#        derived from this software without specific prior written permission.
#
#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
#   IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M. SYZDEK BE LIABLE FOR
#   ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
#   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
#   SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
#   CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
#   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
#   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
#   SUCH DAMAGE.
#
#   @SYZDEK_BSD_LICENSE_END@
#
#   DNSMasq Configuration
#
#   Configure PXE/DHCP Interface:
#     $ ip link set mtu 1500        dev <DEV>
#     $ ip addr add 10.0.109.254/25 dev <DEV>
#     $ iptables -A INPUT -i <DEV> -p udp --dport bootps --sport 67:68 -j ACCEPT
#     $ iptables -A INPUT -i <DEV> -p udp --dport bootpc --sport 67:68 -j ACCEPT
#     $ iptables -A INPUT -i <DEV> -p udp --dport 4011   -j ACCEPT
#     $ iptables -A INPUT -i <DEV> -p udp --dport tftp   -j ACCEPT
#     $ iptables -A INPUT -i <DEV> -p tcp --dport domain -j ACCEPT
#     $ iptables -A INPUT -i <DEV> -p udp --dport domain -j ACCEPT
#
#   Start DNSMasq:
#     $ dnsmasq -C /var/lib/tftpboot/dnsmasq.conf -i <DEVICE>
#
#   Useful dnsmasq options:
#      -C file  - configuration file
#      -h       - Don't read the hostnames in /etc/hosts.
#      -i dev   - Specify interface(s) to listen on.
#      -d       - Debug  mode:  don't  fork  to  the background
#      -R       - Don't read /etc/resolv.conf
#      -n       - Don't poll /etc/resolv.conf for changes.
#

#
# Local network
listen-address=10.0.109.254
domain=pxe.acsalaska.net,10.0.109.128/25

#
# DNS Configuration
domain-needed
resolv-file=/etc/resolv.conf
local=/pxe.iperd.org/


#
# TFTP configuration
enable-tftp
tftp-root=/var/lib/tftpboot


# DHCP configuration
dhcp-range=10.0.109.129,10.0.109.199,255.255.255.128,10m


# PXE tagging
dhcp-vendorclass=BIOS,PXEClient:Arch:00000
dhcp-vendorclass=IA32,PXEClient:Arch:00006
dhcp-vendorclass=UEFI,PXEClient:Arch:00007
dhcp-vendorclass=UEFI,PXEClient:Arch:00009


# Common PXE options
dhcp-option=vendor:PXEClient,6,2b
dhcp-option=option:ntp-server,0.0.0.0
dhcp-option-force=210,/
#dhcp-option-force=211,600
dhcp-no-override


dhcp-option-force=net:BIOS,209,/syslinux/pxelinux.cfg
dhcp-option-force=net:IA32,209,/EFI/BOOT/pxelia32.cfg
dhcp-option-force=net:UEFI,209,/EFI/BOOT/pxelx64.cfg


dhcp-boot=net:BIOS,syslinux/pxelinux.0
dhcp-boot=net:UEFI,EFI/BOOT/BOOTX64.EFI
dhcp-boot=net:IA32,EFI/BOOT/BOOTIA32.EFI


pxe-prompt=net:BIOS,"Press F8 for BIOS boot menu", 5
pxe-prompt=net:UEFI,"Press F8 for UEFI boot menu", 5
pxe-prompt=net:IA32,"Press F8 for IA32 boot menu", 5


# PXE options
pxe-service=BC_EFI,     "Boot from network",    EFI/BOOT/BOOTX64.EFI
pxe-service=BC_EFI,     "Boot from local disk", 0
pxe-service=IA64_EFI,   "Boot from network",    EFI/BOOT/BOOTX64.EFI
pxe-service=IA64_EFI,   "Boot from local disk", 0
pxe-service=IA32_EFI,   "Boot from network",    EFI/BOOT/BOOTIA32.EFI
pxe-service=IA32_EFI,   "Boot from local disk", 0
pxe-service=x86PC,      "Boot from network",    syslinux/pxelinux
pxe-service=x86PC,      "Boot from local disk", 0
pxe-service=X86-64_EFI, "Boot from network",    EFI/BOOT/BOOTX64.EFI
pxe-service=X86-64_EFI, "Boot from local disk", 0


# end of config