Maintainer | Félix Sipma <felix+propellor@gueux.org> |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Properties for the Unbound caching DNS server
Synopsis
- installed :: Property DebianLike
- restarted :: Property DebianLike
- reloaded :: Property DebianLike
- 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 DebianLike
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 DebianLike Source #
Provided a [UnboundSection], a [UnboundZone] and a [UnboundHost], cachingDnsServer ensure unbound is configured accordingly.
Be carefull with CNAMEs, unbound is not a primary DNS server, so it will resolve these by itself. For a locally served zone, you probably want A/AAAA records instead.
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") ]