Maintainer | Félix Sipma <felix+propellor@gueux.org> |
---|---|
Safe Haskell | None |
Language | Haskell98 |
Properties for the Unbound caching DNS server
- installed :: Property NoInfo
- restarted :: Property NoInfo
- reloaded :: Property NoInfo
- type UnboundSection = (ConfSection, [UnboundSetting])
- type UnboundZone = (BindDomain, ZoneType)
- type UnboundHost = (BindDomain, Record)
- type UnboundSetting = (UnboundKey, UnboundValue)
- type UnboundValue = String
- type UnboundKey = String
- type ConfSection = String
- type ZoneType = String
- cachingDnsServer :: [UnboundSection] -> [UnboundZone] -> [UnboundHost] -> Property NoInfo
Documentation
type UnboundSection = (ConfSection, [UnboundSetting]) Source
type UnboundZone = (BindDomain, ZoneType) Source
type UnboundHost = (BindDomain, Record) Source
type UnboundSetting = (UnboundKey, UnboundValue) Source
type UnboundValue = String Source
type UnboundKey = String Source
type ConfSection = String Source
cachingDnsServer :: [UnboundSection] -> [UnboundZone] -> [UnboundHost] -> Property NoInfo Source
Provided a [UnboundSection], a [UnboundZone] and a [UnboundHost], cachingDnsServer ensure unbound is configured accordingly.
Example property:
cachingDnsServer [ ("remote-control", [("control-enable", "no")] , ("server", [ ("interface", "0.0.0.0") , ("access-control", "192.168.1.0/24 allow") , ("do-tcp", "no") ]) [ (AbsDomain "example.com", "transparent") , (AbsDomain $ reverseIP $ IPv4 "192.168.1", "static") ] [ (AbsDomain "example.com", Address $ IPv4 "192.168.1.2") , (AbsDomain "myhost.example.com", Address $ IPv4 "192.168.1.2") , (AbsDomain "myrouter.example.com", Address $ IPv4 "192.168.1.1") , (AbsDomain "www.example.com", Address $ IPv4 "192.168.1.2") , (AbsDomain "example.com", MX 10 "mail.example.com") , (AbsDomain "mylaptop.example.com", Address $ IPv4 "192.168.1.2") -- ^ connected via ethernet , (AbsDomain "mywifi.example.com", Address $ IPv4 "192.168.2.1") , (AbsDomain "mylaptop.example.com", Address $ IPv4 "192.168.2.2") -- ^ connected via wifi, use round robin , (AbsDomain "myhost.example.com", PTR $ reverseIP $ IPv4 "192.168.1.2") , (AbsDomain "myrouter.example.com", PTR $ reverseIP $ IPv4 "192.168.1.1") , (AbsDomain "mylaptop.example.com", PTR $ reverseIP $ IPv4 "192.168.1.2") ]