Multiple fixes

This commit is contained in:
Winston Smith 2021-04-20 16:08:08 +02:00
parent 3bdcffc001
commit 6d7c489b5f
3 changed files with 26 additions and 17 deletions

View File

@ -11,29 +11,27 @@ echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
Rename-computer RTR-01
Rename-NetAdapter -Name "Ethernet" -NewName "Arc-SRV"
netsh interface ip set address "Arc-SRV" static 192.168.8.254 255.255.255.0
Rename-NetAdapter -Name "Ethernet 2" -NewName "Arc-CLI"
netsh interface ip set address "Arc-CLI" static 192.168.12.254 255.255.255.0
Rename-NetAdapter -Name "Ethernet 3" -NewName "WAN"
netsh interface ip set address "WAN" static 192.168.255.8 255.255.255.0 192.168.255.254
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
#Install-remoteAccess -VpnType Vpn
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
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`
\Services\Tcpip\Parameters' -Name 'IPEnableRouter' -Value '0x00000001'
Set-NetConnectionProfile -NetworkCategory Private
$Params = @{
"Name" = 'vm-monitoring-icmpv4'
"Action" = 'Allow'
}
Set-NetFirewallRule @Params
# Activate NAT and DHCP Relay
netsh routing ip relay install
@ -54,6 +52,8 @@ netsh -f ./Arc-CLI.conf
netsh -f ./Arc-SRV.conf
netsh -f ./WAN.conf
Set-NetConnectionProfile -networkcategory private
# Change ZoneAlarm rule to accept incoming ICMP ipv4 probes
$Params = @{
"Name" = 'vm-monitoring-icmpv4'

View File

@ -24,10 +24,16 @@ Start-Service RemoteAccess
# Display interfaces and active forwarding for all of thm via Regedit
netsh inter show inter
Set-ItemProperty -path 'HKLM:\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet`
\Services\Tcpip\Parameters' -Name 'IPEnableRouter' -Value '0x00000001'
Set-NetConnectionProfile -NetworkCategory Private
$Params = @{
"Name" = 'vm-monitoring-icmpv4'
"Action" = 'Allow'
}
Set-NetFirewallRule @Params
# Activate NAT and DHCP Relay
netsh routing ip relay install

View File

@ -26,9 +26,9 @@ netsh interface ip set dns name="WAN" static 9.9.9.9
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 = @{
"Name" = 'vm-monitoring-icmpv4'
"Action" = 'Allow'
@ -36,6 +36,9 @@ $Params = @{
Set-NetFirewallRule @Params
Set-NetConnectionProfile -networkcategory private
# Add routes
route add -p 192.168.8.0/24 192.168.255.8