-
Notifications
You must be signed in to change notification settings - Fork 0
/
prep.sh
74 lines (49 loc) · 1.06 KB
/
prep.sh
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
#!/usr/bin/env bash
set -e
cat > /etc/dnsmasq-private.conf <<END_OF_PRIVATE_CONFIG
# DNSMasq private Config
interface=wl_private
address=/protonet/10.42.0.1
address=/$(hostname)/10.42.0.1
dhcp-range=wl_private,10.42.0.10,10.42.255.250,24h
# Gateway
dhcp-option=3,10.42.0.1
# DNS
dhcp-option=6,10.42.0.1
# IP Forward (no)
dhcp-option=19,0
# Source Routing
dhcp-option=20,0
# 44-47 NetBIOS
dhcp-option=44,0.0.0.0
dhcp-option=45,0.0.0.0
dhcp-option=46,8
dhcp-option=47
dhcp-authoritative
bind-interfaces
except-interface=lo
END_OF_PRIVATE_CONFIG
cat > /etc/dnsmasq-public.conf <<END_OF_PUBLIC_CONFIG
# DNSMasq public Config
interface=wl_public
address=/protonet/10.43.0.1
address=/$(hostname)/10.43.0.1
dhcp-range=wl_public,10.43.0.10,10.43.255.250,24h
# Gateway
dhcp-option=3,10.43.0.1
# DNS
dhcp-option=6,10.43.0.1
# IP Forward (no)
dhcp-option=19,0
# Source Routing
dhcp-option=20,0
# 44-47 NetBIOS
dhcp-option=44,0.0.0.0
dhcp-option=45,0.0.0.0
dhcp-option=46,8
dhcp-option=47
dhcp-authoritative
bind-interfaces
except-interface=lo
END_OF_PUBLIC_CONFIG
exec "$@"