fix: DNS server fix

This commit is contained in:
Alexandre S 2021-05-11 17:31:11 +02:00
parent 110aa24668
commit b57a41bd41

View File

@ -129,14 +129,16 @@ Get-DhcpServerv4Scope | Set-DhcpServerv4OptionValue -DnsServer 192.168.8.1
Install-WindowsFeature -Name DNS -IncludeManagementTools -includeallsubfeature Install-WindowsFeature -Name DNS -IncludeManagementTools -includeallsubfeature
Add-DnsServerSecondaryZone -MasterServers "9.9.9.9" -Name "microdown.local" -ZoneFile "microdown.dns"
Add-DnsServerPrimaryZone -NetworkID 192.168.8.0/24 -ZoneFile 192.168.8.1.in-addr.arpa.dns # Zone secondaire Add-DnsServerPrimaryZone -NetworkID 192.168.8.0/24 -ZoneFile 192.168.8.1.in-addr.arpa.dns # Zone secondaire
Add-DnsServerForwarder -IPAddress 192.168.8.1 -PassThru # Forward Add-DnsServerPrimaryZone -Name "microdown.local" -ZoneFile "microdown.local.dns"
Add-DnsServerForwarder -IPAddress 9.9.9.9 -PassThru # Forward
Add-DnsServerResourceRecordA -Name "SRV-01" -ZoneName "microdown.local" -IPv4Address "192.168.8.1" -TimeToLive 01:00:00
Add-DnsServerResourceRecordA -Name "SRV-02" -ZoneName "microdown.local" -IPv4Address "192.168.8.2" -TimeToLive 01:00:00
Add-DnsServerResourceRecordA -Name "NAT" -ZoneName "microdown.local" -IPv4Address "192.168.255.254" -TimeToLive 01:00:00
Test-DnsServer -IPAddress 192.168.8.1 -ZoneName "www.darty.fr" #Test Test-DnsServer -IPAddress 192.168.8.1 -ZoneName "www.darty.fr" #Test
Add-DnsServerResourceRecordA -Name "SRV-01" -ZoneName "microdown.local" -AllowUpdateAny -IPv4Address "192.168.8.1" -TimeToLive 01:00:00
Add-DnsServerResourceRecordA -Name "SRV-02" -ZoneName "microdown.local" -AllowUpdateAny -IPv4Address "192.168.8.2" -TimeToLive 01:00:00
Add-DnsServerResourceRecordA -Name "NAT" -ZoneName "microdown.local" -AllowUpdateAny -IPv4Address "192.168.255.254" -TimeToLive 01:00:00
Read-Host "Finished?" Read-Host "Finished?"
Restart-Computer Restart-Computer