Fix interface edition and DHCP relay

This commit is contained in:
Winston Smith 2021-04-20 15:25:09 +02:00
parent c3d382ce36
commit 3bdcffc001
8 changed files with 20 additions and 16 deletions

View File

@ -5,9 +5,7 @@ Install
set global loglevel = ERROR
add dhcpserver 192.168.8.1
add interface name = "Arc-SRV"
set interface name = "Arc-SRV" relaymode = enable maxhop = 6 minsecs = 6
popd

View File

@ -5,9 +5,7 @@ Install
set global loglevel = ERROR
add dhcpserver 192.168.8.1
add interface name = "Bou-LAN"
set interface name = "Bou-LAN" relaymode = enable maxhop = 6 minsecs = 6
popd

View File

@ -6,8 +6,6 @@
# Change the poor machine name
Read-host "Script for RTR-01"
Read-host "WARNING: Plug-in in this order Arc-SRV, Arc-CLI and WAN"
echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
Rename-computer RTR-01
@ -23,7 +21,7 @@ Install-WindowsFeature RemoteAccess, RSAT-RemoteAccess-PowerShell, Routing -Incl
Set-NetConnectionProfile -networkcategory private
# 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

View File

@ -4,8 +4,6 @@
# Script to install and configure a Fuckdows Server 2016 as a router
# RTR-02 Only
Read-host "Script for RTR-02"
Read-host "WARNING: Plug-in in this order Bou-LAN and WAN"
echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
# Change the poor machine name

View File

@ -5,6 +5,7 @@
# Script to install and configure a Fuckdows Server 2016 as a router
# RTR-03 Only
echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
# Change the poor machine name
Rename-computer "RTR-03"

View File

@ -5,6 +5,7 @@
# TODO : exclusion/attribution fields
# Rename interfaces
#
echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
#Rename this piece of garbage
Rename-computer "SRV-1"

View File

@ -6,8 +6,6 @@ set global loglevel = ERROR
add dhcpserver 192.168.8.1
add interface name = "WAN"
set interface name = "WAN" relaymode = enable maxhop = 6 minsecs = 6
popd

View File

@ -1,4 +1,7 @@
## Tool to automate VM creation
echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
# SRV-01
$VMName = "SRV-01"
cp D:\VHD\Base_dif\Base_server_g2.vhdx D:\VHD\$VMName.vhdx
@ -20,6 +23,8 @@ $vms = @{
New-VM @vms
Set-VMMemory $VMName -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB
# RTR-01
$VMName = "RTR-01"
cp D:\VHD\Base_dif\Base_server_g2.vhdx D:\VHD\$VMName.vhdx
@ -33,15 +38,17 @@ $vms = @{
Generation = '2'
MemoryStartupBytes = 1024Mb
VHDPath = "d:\VHD\$VMName.vhdx"
SwitchName = 'Arc-Cli'
SwitchName = 'Arc-SRV'
}
New-VM @vms
Set-VMMemory $VMName -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB
Add-VMSwitch -Name "Arc-SRV" -ResourcePoolName "Arc-SRV"
Add-VMSwitch -Name "WAN" -ResourcePoolName "WAN"
Add-VMNetworkAdapter -VMName $VMName -SwitchName "Arc-CLI"
Add-VMNetworkAdapter -VMName $VMName -SwitchName "WAN"
# RTR-02
$VMName = "RTR-02"
cp D:\VHD\Base_dif\Base_server_g2.vhdx D:\VHD\$VMName.vhdx
@ -62,7 +69,10 @@ $vms = @{
New-VM @vms
Set-VMMemory $VMName -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB
Add-VMSwitch -Name "WAN" -ResourcePoolName "WAN"
#Add-VMSwitch -Name "WAN" -ResourcePoolName "WAN"
Add-VMNetworkAdapter -VMName $VMName -SwitchName "WAN"
# RTR-03
$VMName = "RTR-03"
cp D:\VHD\Base_dif\Base_server_g2.vhdx D:\VHD\$VMName.vhdx
@ -83,5 +93,7 @@ $vms = @{
New-VM @vms
Set-VMMemory $VMName -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB
Add-VMSwitch -Name "Aston" -ResourcePoolName "Aston"
Add-VMNetworkAdapter -VMName $VMName -SwitchName "Aston"
Start-VM -Name RTR*
Start-VM -Name SRV*