diff --git a/RTR-01.ps1 b/RTR-01.ps1 index 1ef87d7..115f74d 100644 --- a/RTR-01.ps1 +++ b/RTR-01.ps1 @@ -12,6 +12,14 @@ Rename-computer $name Install-WindowsFeature RemoteAccess, RSAT-RemoteAccess-PowerShell, Routing -IncludeManagementTools #Install-remoteAccess -VpnType Vpn +# Change IP and DNS +# + +netsh interface ip set address "WAN" static 192.168.255.8 255.255.255.0 192.168.255.254 +netsh interface ip set address "Arc-CLI" static 192.168.12.254 255.255.255.0 +netsh interface ip set address "Arc-SRV" static 192.168.8.254 255.255.255.0 +netsh interface ip set dns name="WAN" static 9.9.9.9 + # Display interfaces and active forwarding for all of thm via Regedit netsh inter show inter Set-ItemProperty -path 'HKLM:\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet` @@ -52,4 +60,4 @@ route add -p 192.168.8.0/24 192.168.8.254 route add -p 192.168.12.0.24 192.168.12.254 route add -p 192.168.255.0/24 192.168.255.8 route add -p 192.168.128.8/24 192.168.255.128 -route add -p 0.0.0.0/0 192.168.255.0 \ No newline at end of file +route add -p 0.0.0.0/0 192.168.255.254 diff --git a/RTR-02.ps1 b/RTR-02.ps1 index a73f6f5..1504932 100644 --- a/RTR-02.ps1 +++ b/RTR-02.ps1 @@ -2,12 +2,17 @@ # GPLv3 # Script to install and configure a Fuckdows Server 2016 as a router -# RTR-03 Only +# RTR-02 Only # Change the poor machine name $name = Read-host "Nouveau nom d'hôte?" Rename-computer $name + +netsh interface ip set address "WAN" static 192.168.255.8 255.255.255.0 192.168.255.254 +netsh interface ip set address "Bou-LAN" static 192.168.128.254 255.255.255.0 +netsh interface ip set dns name="WAN" static 9.9.9.9. + # Install Routing and necessary linked roles Install-WindowsFeature RemoteAccess, RSAT-RemoteAccess-PowerShell, Routing -IncludeManagementTools set-service RemoteAccess -StartupType Automatic @@ -47,4 +52,4 @@ route add -p 192.168.8.0/24 192.168.255.8 route add -p 192.168.12.0.24 192.168.255.8 route add -p 192.168.255.0/24 192.168.255.128 route add -p 192.168.128.0/24 192.168.128.254 -route add -p 0.0.0.0/0 192.168.255.0 \ No newline at end of file +route add -p 0.0.0.0/0 192.168.255.254 diff --git a/RTR-03.ps1 b/RTR-03.ps1 index 952fce4..5266fd1 100644 --- a/RTR-03.ps1 +++ b/RTR-03.ps1 @@ -13,6 +13,9 @@ Install-WindowsFeature RemoteAccess -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 + # Activate NAT netsh routing ip nat install @@ -29,8 +32,7 @@ Set-NetFirewallRule @Params # Add routes -route add -p 0.0.0.0/0 10.94.2.137 route add -p 192.168.8.0/24 192.168.255.8 route add -p 192.168.12.0/24 192.168.255.8 route add -p 192.168.128.0/24 192.168.255.128 -route add -p 192.168.255.0/24 192.168.255.254 \ No newline at end of file +route add -p 192.168.255.0/24 192.168.255.254