-
Notifications
You must be signed in to change notification settings - Fork 9
/
miscs_basic_config.lua
46 lines (35 loc) · 959 Bytes
/
miscs_basic_config.lua
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
-- dnsdist configuration
---------------------------------------------------
-- Dns services
---------------------------------------------------
-- udp/tcp dns listening
setLocal("0.0.0.0:53", {})
-- dns caching
pc = newPacketCache(10000, {})
---------------------------------------------------
-- Pools
---------------------------------------------------
pool_resolv = "resolvers"
-- members definition
newServer({
name = "google",
address = "8.8.8.8:53",
pool = pool_resolv,
})
newServer({
name = "quad9",
address = "9.9.9.9:53",
pool = pool_resolv,
})
-- set the load balacing policy to use
setPoolServerPolicy(roundrobin, pool_resolv)
-- enable cache for the pool
getPool(pool_resolv):setCache(pc)
---------------------------------------------------
-- Rules
---------------------------------------------------
-- matches all incoming traffic and send-it to the pool of resolvers
addAction(
AllRule(),
PoolAction(pool_resolv)
)