Fix: SOA/NS on SRV3
This commit is contained in:
parent
dcdfdb658f
commit
dc460f861a
@ -78,15 +78,15 @@ Install-WindowsFeature -Name DNS -IncludeManagementTools -includeallsubfeature
|
||||
|
||||
#Create asrc.dev
|
||||
|
||||
Set-DnsServerPrimaryZone -ComputerName SRV-03 -Name asrc.dev -SecureSecondaries "TransferToSecureServers" -SecondaryServers "192.168.8.1"
|
||||
|
||||
Add-DnsServerPrimaryZone -ResponsiblePerson "bol@loc.ks" -DynamicUpdate None -ZoneFile asrc.dev.dns -Name asrc.dev
|
||||
|
||||
Set-DnsServerPrimaryZone -ComputerName SRV-03 -Name asrc.dev -SecureSecondaries "TransferToSecureServers"
|
||||
|
||||
$ns = Get-DnsServerResourceRecord -ZoneName asrc.dev -RRType NS
|
||||
|
||||
$nsnew = $ns.Clone()
|
||||
|
||||
$nsnew.RecordData.NameServer = "srv-03.asrc.dev"
|
||||
$nsnew.RecordData.NameServer = "srv-03.asrc.local"
|
||||
|
||||
Set-DnsServerResourceRecord -ZoneName asrc.dev -NewInputObject $nsnew -OldInputObject $ns
|
||||
|
||||
@ -94,30 +94,30 @@ $soa = Get-DnsServerResourceRecord -ZoneName asrc.dev -RRType Soa
|
||||
|
||||
$soanew = $soa.Clone()
|
||||
|
||||
$soanew.RecordData.PrimaryServer = "srv-03.asrc.dev"
|
||||
$soanew.RecordData.PrimaryServer = "srv-03.asrc.local"
|
||||
$soanew.RecordData.ExpireLimit = (New-TimeSpan -Days 4)
|
||||
|
||||
Set-DnsServerResourceRecord -ZoneName asrc.dev -NewInputObject $soanew -OldInputObject $soa
|
||||
|
||||
#Create dev.asrc.local
|
||||
|
||||
Set-DnsServerPrimaryZone -ComputerName SRV-03 -Name asrc.dev -SecureSecondaries "TransferToSecureServers" -SecondaryServers "192.168.8.1"
|
||||
Add-DnsServerPrimaryZone -ResponsiblePerson "bol@loc.ks" -DynamicUpdate None -ZoneFile dev.asrc.local.dns -Name dev.asrc.local
|
||||
|
||||
Add-DnsServerPrimaryZone -ResponsiblePerson "bol@loc.ks" -DynamicUpdate None -ZoneFile asrc.dev.dns -Name asrc.dev
|
||||
Set-DnsServerPrimaryZone -ComputerName SRV-03 -Name dev.asrc.local -SecureSecondaries "TransferToSecureServers"
|
||||
|
||||
$ns = Get-DnsServerResourceRecord -ZoneName asrc.dev -RRType NS
|
||||
$ns = Get-DnsServerResourceRecord -ZoneName dev.asrc.local -RRType NS
|
||||
|
||||
$nsnew = $ns.Clone()
|
||||
|
||||
$nsnew.RecordData.NameServer = "srv-03.dev.asrc.local"
|
||||
$nsnew.RecordData.NameServer = "srv-03.asrc.local"
|
||||
|
||||
Set-DnsServerResourceRecord -ZoneName asrc.dev -NewInputObject $nsnew -OldInputObject $ns
|
||||
Set-DnsServerResourceRecord -ZoneName dev.asrc.local -NewInputObject $nsnew -OldInputObject $ns
|
||||
|
||||
$soa = Get-DnsServerResourceRecord -ZoneName dev.asrc.local -RRType Soa
|
||||
|
||||
$soanew = $soa.Clone()
|
||||
|
||||
$soanew.RecordData.PrimaryServer = "srv-03.dev.asrc.local"
|
||||
$soanew.RecordData.PrimaryServer = "srv-03.asrc.local"
|
||||
$soanew.RecordData.ExpireLimit = (New-TimeSpan -Days 4)
|
||||
|
||||
Set-DnsServerResourceRecord -ZoneName dev.asrc.local -NewInputObject $soanew -OldInputObject $soa
|
||||
@ -126,11 +126,11 @@ Set-DnsServerResourceRecord -ZoneName dev.asrc.local -NewInputObject $soanew -Ol
|
||||
Add-DnsServerForwarder -IPAddress 9.9.9.9 -PassThru # Forward
|
||||
|
||||
Add-DnsServerResourceRecordA -Name "SRV-03" -ZoneName "dev.asrc.local" -IPv4Address "192.168.128.1" -TimeToLive 01:00:00
|
||||
|
||||
Add-DnsServerResourceRecordA -Name "SRV-03" -ZoneName "asrc.dev" -IPv4Address "192.168.128.1" -TimeToLive 01:00:00
|
||||
#Add DNS secondary zone for asrc.local
|
||||
|
||||
Add-DnsServerSecondaryZone -Name "asrc.local" -ZoneFile "asrc.local.dns" -MasterServers 192.168.8.1
|
||||
Start-DnsServerZoneTransfer -Name "asrc.local"
|
||||
Start-DnsServerZoneTransfer -Name "asrc.local" -Fulltransfer
|
||||
|
||||
Read-Host "Finished?"
|
||||
Restart-Computer
|
||||
|
Loading…
Reference in New Issue
Block a user