Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

kbp_powerdns: implement ipv6 listen support

  • Loading branch information...
commit a163d0aeddb146940991078cffc58e8d694b3213 1 parent 21cc966
@pieterlexis pieterlexis authored
Showing with 21 additions and 9 deletions.
  1. +21 −9 kbp_powerdns/manifests/init.pp
View
30 kbp_powerdns/manifests/init.pp
@@ -35,12 +35,13 @@
# Depends:
# kbp_powerdns::authoritative
#
-class kbp_powerdns::authoritative::master ($db_password, $certlocation, $intermediate, $admin_password, $pdns_tag="pdns_${environment}", $localaddress=$::external_ipaddress, $localport=53) {
+class kbp_powerdns::authoritative::master ($db_password, $certlocation, $intermediate, $admin_password, $pdns_tag="pdns_${environment}", $localaddress=$::external_ipaddress, $localport=53, $localaddress6=$::external_ipaddress_v6) {
class {
'kbp_powerdns::authoritative':
- localaddress => $localaddress,
- localport => $localport,
- pdns_tag => $pdns_tag;
+ localaddress => $localaddress,
+ localaddress6 => $localaddress6,
+ localport => $localport,
+ pdns_tag => $pdns_tag;
'kbp_mysql::master':
mysql_tag => $pdns_tag;
'kbp_mysql::server::ssl':
@@ -94,11 +95,12 @@
# Depends:
# kbp_powerdns::authoritative
#
-class kbp_powerdns::authoritative::slave ($repl_password, $intermediate, $pdns_tag="pdns_${environment}", $localaddress=$::external_ipaddress, $localport=53){
+class kbp_powerdns::authoritative::slave ($repl_password, $intermediate, $pdns_tag="pdns_${environment}", $localaddress=$::external_ipaddress, $localaddress6=$::external_ipaddress_v6, $localport=53){
include "kbp_ssl::intermediate::${intermediate}"
class {
'kbp_powerdns::authoritative':
localaddress => $localaddress,
+ localaddress6 => $localaddress6,
localport => $localport,
pdns_tag => $pdns_tag;
'kbp_mysql::slave':
@@ -123,17 +125,18 @@
# Depends:
# gen_powerdns
#
-class kbp_powerdns::authoritative ($localaddress, $localport=53, $pdns_tag="pdns_${environment}") {
+class kbp_powerdns::authoritative ($localaddress, $localaddress6=false, $localport=53, $pdns_tag="pdns_${environment}") {
include kbp_munin::client::powerdns
class { 'gen_powerdns':
- localaddress => $localaddress,
- localport => $localport;
+ localaddress => $localaddress,
+ localport => $localport,
+ localaddress6 => $localaddress6;
}
Gen_powerdns::Backend::Mysql <<| title == $pdns_tag |>>
if $localaddress != '127.0.0.1' {
- kbp_ferm::rule { 'PowerDNS':
+ kbp_ferm::rule { 'PowerDNS_v4':
proto => '(tcp udp)',
daddr => "(${localaddress})",
dport => 53,
@@ -141,6 +144,15 @@
}
}
+ if $localaddress6 {
+ kbp_ferm::rule { 'PowerDNS_v6':
+ proto => '(tcp udp)',
+ daddr => "(${localaddress6})",
+ dport => 53,
+ action => ACCEPT;
+ }
+ }
+
kbp_icinga::proc_status { 'pdns':; }
}
Please sign in to comment.
Something went wrong with that request. Please try again.