Chore: Add SRV-03 as SRV DNS + remove DHCP role SRV1

This commit is contained in:
Alexandre-Simao 2021-06-01 10:27:57 +02:00
parent f743da78a6
commit bca1b8e4d7
2 changed files with 3 additions and 41 deletions

View File

@ -4,7 +4,7 @@
# SRV-01 ONLY
# Microdown.local domain
# TODO: Set Option 15
# TODO: Delegation
echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
@ -39,7 +39,7 @@ netsh interface ip set address name="Arc-SRV" static 192.168.8.1 255.255.255.0 1
### DNS Conf for all InterfaceAlias ###
echo "DNS Conf"
foreach ($c in Get-NetAdapter) { write-host 'Setting DNS for' $c.interfaceName ; Set-DnsClientServerAddress -InterfaceIndex $c.interfaceindex -ServerAddresses ('192.168.8.1') }
foreach ($c in Get-NetAdapter) { write-host 'Setting DNS for' $c.interfaceName ; Set-DnsClientServerAddress -InterfaceIndex $c.interfaceindex -ServerAddresses ('192.168.8.1,192.168.128.1') }
### Install the DHCP role (Management tools if you love Metrosexual UI)

View File

@ -1,4 +1,3 @@
<<<<<<< HEAD
# Alexandre Simao
# GPL v3
@ -40,12 +39,7 @@ netsh interface ip set address name="Arc-SRV" static 192.168.8.1 255.255.255.0 1
### DNS Conf for all InterfaceAlias ###
echo "DNS Conf"
foreach ($c in Get-NetAdapter) { write-host 'Setting DNS for' $c.interfaceName ; Set-DnsClientServerAddress -InterfaceIndex $c.interfaceindex -ServerAddresses ('192.168.8.1') }
### Install the DHCP role (Management tools if you love Metrosexual UI)
echo "Installing DHCP role"
Install-WindowsFeature DHCP -IncludeManagementTools
foreach ($c in Get-NetAdapter) { write-host 'Setting DNS for' $c.interfaceName ; Set-DnsClientServerAddress -InterfaceIndex $c.interfaceindex -ServerAddresses ('192.168.8.1,192.168.128.1') }
#END
@ -54,21 +48,6 @@ Install-WindowsFeature DHCP -IncludeManagementTools
echo "Setting connection as Private"
Set-NetConnectionProfile -NetworkCategory Private
### Create DHCP "security" groups
echo "Creating DHCP security groups"
netsh dhcp add securitygroups
#END
### Restart the DHCP server
echo "Restarting DHCP server"
Restart-Service dhcpserver
# END
###################Template#######################
#Add-DhcpServerv4Scope -name "Corpnet" -StartRange 10.0.0.1 -EndRange 10.0.0.254 -SubnetMask 255.255.255.0 -State Active
#Add-DhcpServerv4ExclusionRange -ScopeID 10.0.0.0 -StartRange 10.0.0.1 -EndRange 10.0.0.15
@ -76,23 +55,6 @@ Restart-Service dhcpserver
#Set-DhcpServerv4OptionValue -DnsDomain corp.contoso.com -DnsServer 10.0.0.2
##################################################
### Create DHCP Scopes For Arc-CLI Arc-SRV Bou-Lan
echo "Create DHCP Scopes For Arc-CLI Arc-SRV Bou-Lan"
Add-DhcpServerv4Scope -name "Arc-SRV" -StartRange 192.168.8.1 -EndRange 192.168.8.254 -SubnetMask 255.255.255.0 -State Active
Add-DhcpServerv4ExclusionRange -ScopeID 192.168.8.0 -StartRange 192.168.8.1 -EndRange 192.168.8.63
Add-DhcpServerv4ExclusionRange -ScopeID 192.168.8.0 -StartRange 192.168.8.240 -EndRange 192.168.8.254
Add-DhcpServerv4Scope -name "Arc-CLI" -StartRange 192.168.12.1 -EndRange 192.168.12.254 -SubnetMask 255.255.255.0 -State Active
Add-DhcpServerv4ExclusionRange -ScopeID 192.168.12.0 -StartRange 192.168.12.1 -EndRange 192.168.12.63
Add-DhcpServerv4ExclusionRange -ScopeID 192.168.12.0 -StartRange 192.168.12.240 -EndRange 192.168.12.254
Add-DhcpServerv4Scope -name "Bou-LAN" -StartRange 192.168.128.1 -EndRange 192.168.128.254 -SubnetMask 255.255.255.0 -State Active
Add-DhcpServerv4ExclusionRange -ScopeID 192.168.128.0 -StartRange 192.168.128.1 -EndRange 192.168.128.63
Add-DhcpServerv4ExclusionRange -ScopeID 192.168.128.0 -StartRange 192.168.128.240 -EndRange 192.168.128.254
#END
### Change ZoneAlarm rule to accept incoming ICMP ipv4 probes
echo "Allowing ICMPv4 probes"