Fix interface edition and DHCP relay
This commit is contained in:
parent
0dfc636e9c
commit
42cff3a97a
@ -5,9 +5,7 @@ Install
|
|||||||
set global loglevel = ERROR
|
set global loglevel = ERROR
|
||||||
|
|
||||||
add dhcpserver 192.168.8.1
|
add dhcpserver 192.168.8.1
|
||||||
|
|
||||||
add interface name = "Arc-SRV"
|
add interface name = "Arc-SRV"
|
||||||
|
|
||||||
set interface name = "Arc-SRV" relaymode = enable maxhop = 6 minsecs = 6
|
set interface name = "Arc-SRV" relaymode = enable maxhop = 6 minsecs = 6
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
@ -5,9 +5,7 @@ Install
|
|||||||
set global loglevel = ERROR
|
set global loglevel = ERROR
|
||||||
|
|
||||||
add dhcpserver 192.168.8.1
|
add dhcpserver 192.168.8.1
|
||||||
|
|
||||||
add interface name = "Bou-LAN"
|
add interface name = "Bou-LAN"
|
||||||
|
|
||||||
set interface name = "Bou-LAN" relaymode = enable maxhop = 6 minsecs = 6
|
set interface name = "Bou-LAN" relaymode = enable maxhop = 6 minsecs = 6
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
|
|
||||||
# Change the poor machine name
|
# 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"
|
echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
|
||||||
|
|
||||||
Rename-computer RTR-01
|
Rename-computer RTR-01
|
||||||
@ -23,7 +21,7 @@ Install-WindowsFeature RemoteAccess, RSAT-RemoteAccess-PowerShell, Routing -Incl
|
|||||||
Set-NetConnectionProfile -networkcategory private
|
Set-NetConnectionProfile -networkcategory private
|
||||||
|
|
||||||
# Change IP and DNS
|
# 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 "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-CLI" static 192.168.12.254 255.255.255.0
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
# Script to install and configure a Fuckdows Server 2016 as a router
|
# Script to install and configure a Fuckdows Server 2016 as a router
|
||||||
# RTR-02 Only
|
# 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"
|
echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
|
||||||
|
|
||||||
# Change the poor machine name
|
# Change the poor machine name
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
# Script to install and configure a Fuckdows Server 2016 as a router
|
# Script to install and configure a Fuckdows Server 2016 as a router
|
||||||
# RTR-03 Only
|
# RTR-03 Only
|
||||||
|
echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
|
||||||
|
|
||||||
# Change the poor machine name
|
# Change the poor machine name
|
||||||
Rename-computer "RTR-03"
|
Rename-computer "RTR-03"
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
# TODO : exclusion/attribution fields
|
# TODO : exclusion/attribution fields
|
||||||
# Rename interfaces
|
# Rename interfaces
|
||||||
#
|
#
|
||||||
|
echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
|
||||||
|
|
||||||
#Rename this piece of garbage
|
#Rename this piece of garbage
|
||||||
Rename-computer "SRV-1"
|
Rename-computer "SRV-1"
|
||||||
|
@ -6,8 +6,6 @@ set global loglevel = ERROR
|
|||||||
|
|
||||||
add dhcpserver 192.168.8.1
|
add dhcpserver 192.168.8.1
|
||||||
|
|
||||||
add interface name = "WAN"
|
|
||||||
|
|
||||||
set interface name = "WAN" relaymode = enable maxhop = 6 minsecs = 6
|
set interface name = "WAN" relaymode = enable maxhop = 6 minsecs = 6
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
## Tool to automate VM creation
|
## Tool to automate VM creation
|
||||||
|
echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
|
||||||
|
|
||||||
|
# SRV-01
|
||||||
|
|
||||||
$VMName = "SRV-01"
|
$VMName = "SRV-01"
|
||||||
cp D:\VHD\Base_dif\Base_server_g2.vhdx D:\VHD\$VMName.vhdx
|
cp D:\VHD\Base_dif\Base_server_g2.vhdx D:\VHD\$VMName.vhdx
|
||||||
@ -20,6 +23,8 @@ $vms = @{
|
|||||||
New-VM @vms
|
New-VM @vms
|
||||||
Set-VMMemory $VMName -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB
|
Set-VMMemory $VMName -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB
|
||||||
|
|
||||||
|
# RTR-01
|
||||||
|
|
||||||
$VMName = "RTR-01"
|
$VMName = "RTR-01"
|
||||||
cp D:\VHD\Base_dif\Base_server_g2.vhdx D:\VHD\$VMName.vhdx
|
cp D:\VHD\Base_dif\Base_server_g2.vhdx D:\VHD\$VMName.vhdx
|
||||||
|
|
||||||
@ -33,15 +38,17 @@ $vms = @{
|
|||||||
Generation = '2'
|
Generation = '2'
|
||||||
MemoryStartupBytes = 1024Mb
|
MemoryStartupBytes = 1024Mb
|
||||||
VHDPath = "d:\VHD\$VMName.vhdx"
|
VHDPath = "d:\VHD\$VMName.vhdx"
|
||||||
SwitchName = 'Arc-Cli'
|
SwitchName = 'Arc-SRV'
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
New-VM @vms
|
New-VM @vms
|
||||||
Set-VMMemory $VMName -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB
|
Set-VMMemory $VMName -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB
|
||||||
Add-VMSwitch -Name "Arc-SRV" -ResourcePoolName "Arc-SRV"
|
Add-VMNetworkAdapter -VMName $VMName -SwitchName "Arc-CLI"
|
||||||
Add-VMSwitch -Name "WAN" -ResourcePoolName "WAN"
|
Add-VMNetworkAdapter -VMName $VMName -SwitchName "WAN"
|
||||||
|
|
||||||
|
# RTR-02
|
||||||
|
|
||||||
$VMName = "RTR-02"
|
$VMName = "RTR-02"
|
||||||
cp D:\VHD\Base_dif\Base_server_g2.vhdx D:\VHD\$VMName.vhdx
|
cp D:\VHD\Base_dif\Base_server_g2.vhdx D:\VHD\$VMName.vhdx
|
||||||
@ -62,7 +69,10 @@ $vms = @{
|
|||||||
|
|
||||||
New-VM @vms
|
New-VM @vms
|
||||||
Set-VMMemory $VMName -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB
|
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"
|
$VMName = "RTR-03"
|
||||||
cp D:\VHD\Base_dif\Base_server_g2.vhdx D:\VHD\$VMName.vhdx
|
cp D:\VHD\Base_dif\Base_server_g2.vhdx D:\VHD\$VMName.vhdx
|
||||||
@ -83,5 +93,7 @@ $vms = @{
|
|||||||
|
|
||||||
New-VM @vms
|
New-VM @vms
|
||||||
Set-VMMemory $VMName -DynamicMemoryEnabled $true -MinimumBytes 512MB -StartupBytes 1024MB -MaximumBytes 2GB
|
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*
|
||||||
|
Loading…
Reference in New Issue
Block a user