Skip to content

Commit 6a25acc

Browse files
author
A. Täffner
committed
import previous work (not working completely yet)
1 parent 698ed15 commit 6a25acc

File tree

12 files changed

+73
-4
lines changed

12 files changed

+73
-4
lines changed

TODO.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ Installer
1313
--------------------------------------
1414

1515
- Add a function to let a server join a existing installation.
16+
Change named.options.conf and add follwoing lines into options-brackets for DNSSEC-Implementation:
17+
dnssec-enable yes;
18+
dnssec-validation yes;
19+
dnssec-lookaside auto;
1620

1721
Uninstaller
1822
--------------------------------------

install/lib/installer_base.lib.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1469,6 +1469,27 @@ public function configure_powerdns() {
14691469

14701470

14711471
}
1472+
1473+
//** writes bind configuration files
1474+
public function process_bind_file($configfile, $target='/', $absolute=false) {
1475+
global $conf;
1476+
1477+
if ($absolute) $full_file_name = $target.$configfile;
1478+
else $full_file_name = $conf['ispconfig_install_dir'].$target.$configfile;
1479+
1480+
//* Backup exiting file
1481+
if(is_file($full_file_name)) {
1482+
copy($full_file_name, $config_dir.$configfile.'~');
1483+
}
1484+
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', 'tpl/'.$configfile.'.master');
1485+
$content = str_replace('{mysql_server_ispconfig_user}', $conf['mysql']['ispconfig_user'], $content);
1486+
$content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content);
1487+
$content = str_replace('{mysql_server_ispconfig_database}', $conf['mysql']['database'], $content);
1488+
$content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content);
1489+
$content = str_replace('{ispconfig_install_dir}', $conf['ispconfig_install_dir'], $content);
1490+
$content = str_replace('{dnssec_conffile}', $conf['ispconfig_install_dir'].'/server/scripts/dnssec-config.sh', $content);
1491+
wf($full_file_name, $content);
1492+
}
14721493

14731494
public function configure_bind() {
14741495
global $conf;
@@ -1487,6 +1508,15 @@ public function configure_bind() {
14871508
chown($content, $conf['bind']['bind_user']);
14881509
chgrp($content, $conf['bind']['bind_group']);
14891510
chmod($content, 2770);
1511+
1512+
//* Install scripts for dnssec implementation
1513+
$this->process_bind_file('dnssec-update.sh', '/server/scripts/');
1514+
$this->process_bind_file('dnssec-create.sh', '/server/scripts/');
1515+
$this->process_bind_file('dnssec-delete.sh', '/server/scripts/');
1516+
$this->process_bind_file('dnssec-autoupdate.sh', '/server/scripts/');
1517+
$this->process_bind_file('dnssec-autopickup.sh', '/server/scripts/');
1518+
$this->process_bind_file('dnssec-autocreate.sh', '/server/scripts/');
1519+
$this->process_bind_file('dnssec-config.sh', '/server/scripts/');
14901520

14911521
}
14921522

install/sql/incremental/upd_dev_collection.sql

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,3 +203,11 @@ CREATE TABLE `ftp_traffic` (
203203

204204
ALTER TABLE `mail_forwarding` ADD COLUMN `allow_send_as` ENUM('n','y') NOT NULL DEFAULT 'n' AFTER `active`;
205205
UPDATE `mail_forwarding` SET `allow_send_as` = 'y' WHERE `type` = 'alias';
206+
207+
--- DNSSEC-Implementation by dark alex
208+
--- TODO: Review and resolve conflicts if more has been done in that column
209+
ALTER TABLE `dns_rr` CHANGE COLUMN `type` `type` ENUM('A','AAAA','ALIAS','CNAME','HINFO','MX','NAPTR','NS','PTR','RP','SRV','TXT','TLSA','DNSKEY') NULL DEFAULT NULL AFTER `name`;
210+
211+
ALTER TABLE `dns_soa`
212+
ADD COLUMN `dnssec_initialized` ENUM('Y','N') NOT NULL DEFAULT 'N',
213+
ADD COLUMN `dnssec_info` TEXT NULL;

install/sql/ispconfig3.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ CREATE TABLE `dns_rr` (
478478
`server_id` int(11) NOT NULL default '1',
479479
`zone` int(11) unsigned NOT NULL DEFAULT '0',
480480
`name` varchar(255) NOT NULL DEFAULT '',
481-
`type` enum('A','AAAA','ALIAS','CNAME','HINFO','MX','NAPTR','NS','PTR','RP','SRV','TXT') default NULL,
481+
`type` enum('A','AAAA','ALIAS','CNAME','HINFO','MX','NAPTR','NS','PTR','RP','SRV','TXT','TLSA','DNSKEY') default NULL,
482482
`data` TEXT NOT NULL DEFAULT '',
483483
`aux` int(11) unsigned NOT NULL default '0',
484484
`ttl` int(11) unsigned NOT NULL default '3600',
@@ -539,6 +539,8 @@ CREATE TABLE `dns_soa` (
539539
`xfer` varchar(255) NOT NULL DEFAULT '',
540540
`also_notify` varchar(255) default NULL,
541541
`update_acl` varchar(255) default NULL,
542+
`dnssec_initialized` ENUM('Y','N') NOT NULL DEFAULT 'N',
543+
`dnssec_info` TEXT NULL,
542544
PRIMARY KEY (`id`),
543545
UNIQUE KEY `origin` (`origin`),
544546
KEY `active` (`active`)

interface/web/dns/form/dns_soa.tform.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,14 @@
264264
'default' => 'Y',
265265
'value' => array(0 => 'N', 1 => 'Y')
266266
),
267+
'dnssec_info' => array (
268+
'datatype' => 'TEXT',
269+
'formtype' => 'TEXTAREA',
270+
'default' => '',
271+
'value' => '',
272+
'width' => '30',
273+
'maxlength' => '10000'
274+
),
267275
//#################################
268276
// ENDE Datatable fields
269277
//#################################

interface/web/dns/lib/lang/de_dns_soa.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ $wb['minimum_txt'] = 'Minimum';
1111
$wb['ttl_txt'] = 'TTL';
1212
$wb['xfer_txt'] = 'Zonentransfer zu diesen IP Adressen erlauben (mit Komma getrennte Liste)';
1313
$wb['active_txt'] = 'Aktiv';
14+
$wb['dnssec_info_txt'] = 'DNSSEC DS-Daten für Registry';
1415
$wb['limit_dns_zone_txt'] = 'Die maximale Anzahl an DNS Einträgen für Ihr Konto wurde erreicht.';
1516
$wb['client_txt'] = 'Kunde';
1617
$wb['no_zone_perm'] = 'Sie haben nicht die Berechtigung, einen Eintrag zu dieser DNS Zone hinzuzufügen.';

interface/web/dns/lib/lang/en_dns_soa.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ $wb["minimum_txt"] = 'Minimum';
1111
$wb["ttl_txt"] = 'TTL';
1212
$wb["xfer_txt"] = 'Allow zone transfers to <br />these IPs (comma separated list)';
1313
$wb["active_txt"] = 'Active';
14+
$wb['dnssec_info_txt'] = 'DNSSEC DS-Data for registry';
1415
$wb["limit_dns_zone_txt"] = 'The max. number of DNS zones for your account is reached.';
1516
$wb["client_txt"] = 'Client';
1617
$wb["no_zone_perm"] = 'You do not have the permission to add a record to this DNS zone.';

interface/web/dns/lib/remote.conf.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
$function_list['dns_cname_get,dns_cname_add,dns_cname_update,dns_cname_delete'] = 'DNS cname functions';
88
$function_list['dns_hinfo_get,dns_hinfo_add,dns_hinfo_update,dns_hinfo_delete'] = 'DNS hinfo functions';
99
$function_list['dns_mx_get,dns_mx_add,dns_mx_update,dns_mx_delete'] = 'DNS mx functions';
10+
$function_list['dns_tlsa_get,dns_tlsa_add,dns_tlsa_update,dns_tlsa_delete'] = 'DNS tlsa functions';
1011
$function_list['dns_ns_get,dns_ns_add,dns_ns_update,dns_ns_delete'] = 'DNS ns functions';
1112
$function_list['dns_ptr_get,dns_ptr_add,dns_ptr_update,dns_ptr_delete'] = 'DNS ptr functions';
1213
$function_list['dns_rp_get,dns_rp_add,dns_rp_update,dns_rp_delete'] = 'DNS rp functions';

interface/web/dns/list/dns_a.list.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
'prefix' => "",
133133
'suffix' => "",
134134
'width' => "",
135-
'value' => array('A'=>'A', 'AAAA' => 'AAAA', 'ALIAS'=>'ALIAS', 'CNAME'=>'CNAME', 'HINFO'=>'HINFO', 'MX'=>'MX', 'NS'=>'NS', 'PTR'=>'PTR', 'RP'=>'RP', 'SPF'=>'SPF', 'SRV'=>'SRV', 'TXT'=>'TXT'));
135+
'value' => array('A'=>'A', 'AAAA' => 'AAAA', 'ALIAS'=>'ALIAS', 'CNAME'=>'CNAME', 'HINFO'=>'HINFO', 'MX'=>'MX', 'NS'=>'NS', 'PTR'=>'PTR', 'RP'=>'RP', 'SPF'=>'SPF', 'SRV'=>'SRV', 'TLSA'=>'TLSA', 'TXT'=>'TXT'));
136136

137137

138138
?>

interface/web/dns/templates/dns_a_list.htm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<button class="btn btn-default formbutton-success" type="button" data-load-content="dns/dns_rp_edit.php?zone={tmpl_var name='parent_id'}">RP</button>
3131
<button class="btn btn-default formbutton-success" type="button" data-load-content="dns/dns_spf_edit.php?zone={tmpl_var name='parent_id'}">SPF</button>
3232
<button class="btn btn-default formbutton-success" type="button" data-load-content="dns/dns_srv_edit.php?zone={tmpl_var name='parent_id'}">SRV</button>
33+
<button class="btn btn-default formbutton-success" type="button" data-load-content="dns/dns_tlsa_edit.php?zone={tmpl_var name='parent_id'}">TLSA</button>
3334
<button class="btn btn-default formbutton-success" type="button" data-load-content="dns/dns_txt_edit.php?zone={tmpl_var name='parent_id'}">TXT</button>
3435
</div>
3536

0 commit comments

Comments
 (0)