diff --git a/RTR-01.ps1 b/RTR-01.ps1 index 115f74d..d5eb637 100644 --- a/RTR-01.ps1 +++ b/RTR-01.ps1 @@ -12,6 +12,8 @@ Rename-computer $name Install-WindowsFeature RemoteAccess, RSAT-RemoteAccess-PowerShell, Routing -IncludeManagementTools #Install-remoteAccess -VpnType Vpn +Set-NetConnectionProfile -networkcategory private + # Change IP and DNS # diff --git a/RTR-03.ps1 b/RTR-03.ps1 index 5266fd1..062f9fb 100644 --- a/RTR-03.ps1 +++ b/RTR-03.ps1 @@ -1,6 +1,8 @@ # Alexandre SIMAO # GPLv3 +### TODO ? + # Script to install and configure a Fuckdows Server 2016 as a router # RTR-03 Only @@ -8,19 +10,23 @@ $name = Read-host "Nouveau nom d'hôte?" Rename-computer $name +Set-NetConnectionProfile -NetworkCategory Private + + # Install Routing and necessary linked roles -Install-WindowsFeature RemoteAccess -IncludeManagementTools +Install-WindowsFeature RemoteAccess, RSAT-RemoteAccess-PowerShell, Routing -IncludeManagementTools set-service RemoteAccess -StartupType Automatic Start-Service RemoteAccess netsh interface ip set address "WAN" static 192.168.255.254 255.255.255.0 -netsh interface ip set dns name="WAN" static +netsh interface ip set dns name="WAN" static 9.9.9.9 # Activate NAT netsh routing ip nat install netsh routing ip nat add interface name="WAN" mode=PRIVATE netsh routing ip nat add interface name="Aston" mode=FULL +Set-NetConnectionProfile -networkcategory private # Change ZoneAlarm rule to accept incoming ICMP ipv4 probes $Params = @{ diff --git a/SRV-01_DHCP.ps1 b/SRV-01_DHCP.ps1 index e7ed32e..24d1f4a 100644 --- a/SRV-01_DHCP.ps1 +++ b/SRV-01_DHCP.ps1 @@ -1,6 +1,8 @@ # Alexandre Simao # GPL v3 +# SRV-01 ONLY + #Rename this piece of garbage $name = Read-host "Nom d'hôte?" Rename-computer $name @@ -43,20 +45,19 @@ Add-DhcpServerv4Scope -name "Arc-SRV" -StartRange 192.168.8.1 -EndRange 192.168. 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 Set-DhcpServerv4OptionValue -ScopeId 192.168.8.0 -OptionID 3 -Value 192.168.8.254 +Set-DhcpServerv4OptionValue -ScopeId 192.168.8.0 -DnsServer 9.9.9.9 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 Set-DhcpServerv4OptionValue -ScopeId 192.168.12.0 -OptionID 3 -Value 192.168.12.254 +Set-DhcpServerv4OptionValue -ScopeId 192.168.8.0 -DnsServer 9.9.9.9 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 Set-DhcpServerv4OptionValue -ScopeId 192.168.128.0 -OptionID 3 -Value 192.168.128.254 - -# Global DHCP options - -Set-DhcpServerv4OptionValue -DnsServer 9.9.9.9 +Set-DhcpServerv4OptionValue -ScopeId 192.168.8.0 -DnsServer 9.9.9.9 # Change ZoneAlarm rule to accept incoming ICMP ipv4 probes @@ -72,5 +73,4 @@ Set-NetFirewallRule @Params route add -p 192.168.12.0/24 192.168.8.254 route add -p 192.168.255.0/24 192.168.8.254 route add -p 192.168.128.0/24 192.168.8.254 -route add -p 192.168.8.0/24 192.168.8.2 -route add -p 0.0.0.0/0 192.168.8.254 \ No newline at end of file +route add -p 0.0.0.0/0 192.168.8.254