init III
This commit is contained in:
27
Replace DNS Zone Files Entries/conadm.de.zone
Normal file
27
Replace DNS Zone Files Entries/conadm.de.zone
Normal file
@@ -0,0 +1,27 @@
|
||||
$ORIGIN conadm.de.
|
||||
@ 1H IN SOA conlxns1 postmaster (
|
||||
2022091901 ; serial
|
||||
3000 ; refresh (3H)
|
||||
1800 ; retry (1H)
|
||||
1W ; expiry (1W)
|
||||
3600 ) ; minimum / TTL (1D)
|
||||
|
||||
1D IN NS conlxns1
|
||||
1D IN NS conlxns2
|
||||
1D IN NS ns0.de.clara.net.
|
||||
1D IN NS ns1.de.clara.net.
|
||||
1H IN MX 10 conmailgw1.conet-services.de.
|
||||
1H IN MX 10 conmailgw2.conet-services.de.
|
||||
@ 1D IN TXT "v=spf1 mx ip4:195.20.133.146 ip4:195.20.133.147 -all"
|
||||
|
||||
conlxns1 1D IN A 195.20.133.129
|
||||
conlxns2 1D IN A 195.20.133.130
|
||||
www 1D IN A 195.20.133.6
|
||||
vpn 1D IN A 149.13.94.36
|
||||
vpn2 1D IN A 89.202.41.80
|
||||
speedtest 1D IN A 149.13.94.38
|
||||
netbox 1D IN A 195.20.133.190
|
||||
_dmarc 1D IN TXT "v=DMARC1; p=quarantine; adkim=s; aspf=s"
|
||||
mail._domainkey 1D IN TXT ( "v=DKIM1; h=sha256; k=rsa; "
|
||||
"p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtyHSEyS+ULLA5l3haN5o665eIrnH1gBke4M6cz7qweiV05NmQoZDh2SerQpE9IALGFjEZQoCVB1EecS/+SxpUOyvU3sWo8L63lWJGvAPKd+F+eDPFmTxf1TKz5JbtlxTmp23moILVcmZhk54TxMs/dyhYETdYG5wnsQgzBH/NMgEeMWOdkge14HGWOHIsiC1Hw4sJ4rpG/i5mP"
|
||||
"JELfWtz832PNLtB8GaPqGDthVSrTrRxq+oqGOjVGc8A2QdZvbBWrg5ExpHxdvy05WyEoKq0Ve6mWOuXOY4eEdfyMJMnawQiZfpuM9iVlbZWW+u15qP4a/fdeXrYYZTSTA3QL+C8wIDAQAB" )
|
||||
27
Replace DNS Zone Files Entries/conadm2.de.zone
Normal file
27
Replace DNS Zone Files Entries/conadm2.de.zone
Normal file
@@ -0,0 +1,27 @@
|
||||
$ORIGIN conadm.de.
|
||||
@ 1H IN SOA conlxns1 postmaster (
|
||||
2022091901 ; serial
|
||||
3000 ; refresh (3H)
|
||||
1800 ; retry (1H)
|
||||
1W ; expiry (1W)
|
||||
3600 ) ; minimum / TTL (1D)
|
||||
|
||||
1D IN NS conlxns1
|
||||
1D IN NS conlxns2
|
||||
1D IN NS ns0.de.clara.net.
|
||||
1D IN NS ns1.de.clara.net.
|
||||
1H IN MX 10 conmailgw1.conet-services.de.
|
||||
1H IN MX 10 conmailgw2.conet-services.de.
|
||||
@ 1D IN TXT "v=spf1 mx ip4:195.20.133.146 ip4:195.20.133.147 -all"
|
||||
|
||||
conlxns1 1D IN A 195.20.133.129
|
||||
conlxns2 1D IN A 195.20.133.130
|
||||
www 1D IN A 195.20.133.6
|
||||
vpn 1D IN A 149.13.94.36
|
||||
vpn2 1D IN A 89.202.41.80
|
||||
speedtest 1D IN A 149.13.94.38
|
||||
netbox 1D IN A 195.20.133.190
|
||||
_dmarc 1D IN TXT "v=DMARC1; p=quarantine; adkim=s; aspf=s"
|
||||
mail._domainkey 1D IN TXT ( "v=DKIM1; h=sha256; k=rsa; "
|
||||
"p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtyHSEyS+ULLA5l3haN5o665eIrnH1gBke4M6cz7qweiV05NmQoZDh2SerQpE9IALGFjEZQoCVB1EecS/+SxpUOyvU3sWo8L63lWJGvAPKd+F+eDPFmTxf1TKz5JbtlxTmp23moILVcmZhk54TxMs/dyhYETdYG5wnsQgzBH/NMgEeMWOdkge14HGWOHIsiC1Hw4sJ4rpG/i5mP"
|
||||
"JELfWtz832PNLtB8GaPqGDthVSrTrRxq+oqGOjVGc8A2QdZvbBWrg5ExpHxdvy05WyEoKq0Ve6mWOuXOY4eEdfyMJMnawQiZfpuM9iVlbZWW+u15qP4a/fdeXrYYZTSTA3QL+C8wIDAQAB" )
|
||||
27
Replace DNS Zone Files Entries/original/conadm.de.zone
Normal file
27
Replace DNS Zone Files Entries/original/conadm.de.zone
Normal file
@@ -0,0 +1,27 @@
|
||||
$ORIGIN conadm.de.
|
||||
@ 1H IN SOA conlxns1 postmaster (
|
||||
2022091901 ; serial
|
||||
3000 ; refresh (3H)
|
||||
1800 ; retry (1H)
|
||||
1W ; expiry (1W)
|
||||
3600 ) ; minimum / TTL (1D)
|
||||
|
||||
1D IN NS conlxns1
|
||||
1D IN NS conlxns2
|
||||
1D IN NS ns0.de.clara.net.
|
||||
1D IN NS ns1.de.clara.net.
|
||||
1H IN MX 10 conmailgw1.conet-services.de.
|
||||
1H IN MX 10 conmailgw2.conet-services.de.
|
||||
@ 1D IN TXT "v=spf1 mx ip4:195.20.133.146 ip4:195.20.133.147 -all"
|
||||
|
||||
conlxns1 1D IN A 195.20.133.129
|
||||
conlxns2 1D IN A 195.20.133.130
|
||||
www 1D IN A 195.20.133.6
|
||||
vpn 1D IN A 149.13.94.36
|
||||
vpn2 1D IN A 89.202.41.80
|
||||
speedtest 1D IN A 149.13.94.38
|
||||
netbox 1D IN A 195.20.133.190
|
||||
_dmarc 1D IN TXT "v=DMARC1; p=quarantine; adkim=s; aspf=s"
|
||||
mail._domainkey 1D IN TXT ( "v=DKIM1; h=sha256; k=rsa; "
|
||||
"p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtyHSEyS+ULLA5l3haN5o665eIrnH1gBke4M6cz7qweiV05NmQoZDh2SerQpE9IALGFjEZQoCVB1EecS/+SxpUOyvU3sWo8L63lWJGvAPKd+F+eDPFmTxf1TKz5JbtlxTmp23moILVcmZhk54TxMs/dyhYETdYG5wnsQgzBH/NMgEeMWOdkge14HGWOHIsiC1Hw4sJ4rpG/i5mP"
|
||||
"JELfWtz832PNLtB8GaPqGDthVSrTrRxq+oqGOjVGc8A2QdZvbBWrg5ExpHxdvy05WyEoKq0Ve6mWOuXOY4eEdfyMJMnawQiZfpuM9iVlbZWW+u15qP4a/fdeXrYYZTSTA3QL+C8wIDAQAB" )
|
||||
27
Replace DNS Zone Files Entries/original/conadm2.de.zone
Normal file
27
Replace DNS Zone Files Entries/original/conadm2.de.zone
Normal file
@@ -0,0 +1,27 @@
|
||||
$ORIGIN conadm.de.
|
||||
@ 1H IN SOA conlxns1 postmaster (
|
||||
2022091901 ; serial
|
||||
3000 ; refresh (3H)
|
||||
1800 ; retry (1H)
|
||||
1W ; expiry (1W)
|
||||
3600 ) ; minimum / TTL (1D)
|
||||
|
||||
1D IN NS conlxns1
|
||||
1D IN NS conlxns2
|
||||
1D IN NS ns0.de.clara.net.
|
||||
1D IN NS ns1.de.clara.net.
|
||||
1H IN MX 10 conmailgw1.conet-services.de.
|
||||
1H IN MX 10 conmailgw2.conet-services.de.
|
||||
@ 1D IN TXT "v=spf1 mx ip4:195.20.133.146 ip4:195.20.133.147 -all"
|
||||
|
||||
conlxns1 1D IN A 195.20.133.129
|
||||
conlxns2 1D IN A 195.20.133.130
|
||||
www 1D IN A 195.20.133.6
|
||||
vpn 1D IN A 149.13.94.36
|
||||
vpn2 1D IN A 89.202.41.80
|
||||
speedtest 1D IN A 149.13.94.38
|
||||
netbox 1D IN A 195.20.133.190
|
||||
_dmarc 1D IN TXT "v=DMARC1; p=quarantine; adkim=s; aspf=s"
|
||||
mail._domainkey 1D IN TXT ( "v=DKIM1; h=sha256; k=rsa; "
|
||||
"p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtyHSEyS+ULLA5l3haN5o665eIrnH1gBke4M6cz7qweiV05NmQoZDh2SerQpE9IALGFjEZQoCVB1EecS/+SxpUOyvU3sWo8L63lWJGvAPKd+F+eDPFmTxf1TKz5JbtlxTmp23moILVcmZhk54TxMs/dyhYETdYG5wnsQgzBH/NMgEeMWOdkge14HGWOHIsiC1Hw4sJ4rpG/i5mP"
|
||||
"JELfWtz832PNLtB8GaPqGDthVSrTrRxq+oqGOjVGc8A2QdZvbBWrg5ExpHxdvy05WyEoKq0Ve6mWOuXOY4eEdfyMJMnawQiZfpuM9iVlbZWW+u15qP4a/fdeXrYYZTSTA3QL+C8wIDAQAB" )
|
||||
85
Replace DNS Zone Files Entries/replace.pl
Normal file
85
Replace DNS Zone Files Entries/replace.pl
Normal file
@@ -0,0 +1,85 @@
|
||||
#!/usr/bin/perl
|
||||
use strict;
|
||||
|
||||
# alle domains einlesen
|
||||
print "\nFolgende Domains werden bearbeitet\n";
|
||||
open DOMAINS, "<replace/domains"; my @domains=<DOMAINS>; close DOMAINS; foreach (@domains) { chomp; print "$_\n"; }
|
||||
|
||||
# dmarc eintrag lesen
|
||||
print "\nAlte DMARC Einträge werden durch diesen ersetzt\n";
|
||||
open DMARC, "<replace/dmarc"; my @dmarc=<DMARC>; close DMARC; foreach (@dmarc) { chomp; print "$_\n"; }
|
||||
|
||||
# dkim eintrag lesen
|
||||
print "\nAlte DKIM Einträge werden durch diese Zeilen ersetzt\n";
|
||||
open DKIM, "<replace/dkim"; my @dkim=<DKIM>; close DKIM; foreach (@dkim) { chomp; print "$_\n"; }
|
||||
|
||||
print "\nSeriennummer wird zusammengesetzt aus dem Datum und einer 2-stelligen laufenden Nummer\n";
|
||||
print "Die laufende Nummer muss manuell angegeben werden.\n";
|
||||
print "laufende Nummer [xx]?";
|
||||
my $nr=<STDIN>; chomp $nr;
|
||||
|
||||
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
|
||||
$year+=1900; $mon++;
|
||||
|
||||
my $serial = sprintf ("%04d%02d%02d%02d", $year, $mon, $mday, $nr);
|
||||
|
||||
print "\nFortfahren, dann <ENTER>\n";
|
||||
<STDIN>;
|
||||
|
||||
print "Sicherheitskopie aller Zonendateien anlegen\n";
|
||||
print " Backup Verzeichnis erstellen\n";
|
||||
my $dir=sprintf ("%04d%02d%02d-%02d%02d", $year, $mon, $mday, $hour, $min);
|
||||
`mkdir $dir`;
|
||||
print "Zonendateien kopieren\n";
|
||||
`cp *.zone $dir/`;
|
||||
|
||||
print "\nTemporäre Zonendateien erstellen\n";
|
||||
# domain für domain bearbeiten
|
||||
foreach my $domain (@domains) {
|
||||
print "========== $domain ==========\n";
|
||||
# zonendatei einlesen
|
||||
open DOMAIN, "<$domain.zone";
|
||||
my @domain=<DOMAIN>;
|
||||
close DOMAIN;
|
||||
|
||||
# temporäre zonendatei erstellen
|
||||
open TEMP, ">$domain.zone.tmp";
|
||||
foreach my $line (@domain) {
|
||||
chomp $line;
|
||||
if ( $line =~ /_dmarc/ ) {
|
||||
# dmarc eintrag ersetzen
|
||||
print "Ersetze DMARC Eintrag\n";
|
||||
printf TEMP "$dmarc[0]\n";
|
||||
} elsif ( $line =~ /_domainkey/ or
|
||||
$line =~ /^\s*".*"/ or
|
||||
$line =~ /^\s*".*"\s*\)/ ) {
|
||||
# weitere dkim einträge entfernen
|
||||
print "Entferne DKIM Eintrag\n";
|
||||
} elsif ( $line =~ /; serial/) {
|
||||
# serial
|
||||
printf TEMP " %s ; serial\n", $serial;
|
||||
} else {
|
||||
# andere Einträge unbearbeitet übernehmen
|
||||
printf TEMP "$line\n";
|
||||
}
|
||||
}
|
||||
|
||||
# dkim einträge hinten anhängen
|
||||
print "Neuen DKIM Eintrag schreiben\n";
|
||||
foreach (@dkim) {
|
||||
printf TEMP "$_\n";
|
||||
}
|
||||
|
||||
close TEMP;
|
||||
}
|
||||
|
||||
print "\nUnschöne Zeilenenden entfernen\n";
|
||||
foreach (@domains) { `sed -i "s/\r//g" $_.zone.tmp`; }
|
||||
|
||||
print "Alte Dateien entfernen\n";
|
||||
foreach (@domains) { unlink ("$_.zone"); }
|
||||
|
||||
print "Temporäre Dateien umbenennen\n";
|
||||
foreach (@domains) { `mv "$_.zone.tmp" "$_.zone"`; }
|
||||
|
||||
print "\nfertig\n";
|
||||
3
Replace DNS Zone Files Entries/replace/dkim
Normal file
3
Replace DNS Zone Files Entries/replace/dkim
Normal file
@@ -0,0 +1,3 @@
|
||||
mail._domainkey 1D IN TXT ( "v=DKIM1; h=sha256; k=rsa; "
|
||||
"p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtyHSEyS+ULLA5l3haN5o665eIrnH1gBke4M6cz7qweiV05NmQoZDh2SerQpE9IALGFjEZQoCVB1EecS/+SxpUOyvU3sWo8L63lWJGvAPKd+F+eDPFmTxf1TKz5JbtlxTmp23moILVcmZhk54TxMs/dyhYETdYG5wnsQgzBH/NMgEeMWOdkge14HGWOHIsiC1Hw4sJ4rpG/i5mP"
|
||||
"JELfWtz832PNLtB8GaPqGDthVSrTrRxq+oqGOjVGc8A2QdZvbBWrg5ExpHxdvy05WyEoKq0Ve6mWOuXOY4eEdfyMJMnawQiZfpuM9iVlbZWW+u15qP4a/fdeXrYYZTSTA3QL+C8wIDAQAB" )
|
||||
1
Replace DNS Zone Files Entries/replace/dmarc
Normal file
1
Replace DNS Zone Files Entries/replace/dmarc
Normal file
@@ -0,0 +1 @@
|
||||
_dmarc 1D IN TXT "v=DMARC1; p=quarantine; adkim=s; aspf=s"
|
||||
2
Replace DNS Zone Files Entries/replace/domains
Normal file
2
Replace DNS Zone Files Entries/replace/domains
Normal file
@@ -0,0 +1,2 @@
|
||||
conadm.de
|
||||
conadm2.de
|
||||
BIN
Replace DNS Zone Files Entries/replace_v1.1_2022-10-18.tar.gz
Normal file
BIN
Replace DNS Zone Files Entries/replace_v1.1_2022-10-18.tar.gz
Normal file
Binary file not shown.
BIN
Replace DNS Zone Files Entries/replace_v1_2022-10-18.tar.gz
Normal file
BIN
Replace DNS Zone Files Entries/replace_v1_2022-10-18.tar.gz
Normal file
Binary file not shown.
Reference in New Issue
Block a user