Multiple fixes
This commit is contained in:
parent
3bdcffc001
commit
6d7c489b5f
@ -11,29 +11,27 @@ echo "Shamefully made by Alexandre Simao. Pardon-me M. Stallman"
|
|||||||
Rename-computer RTR-01
|
Rename-computer RTR-01
|
||||||
|
|
||||||
Rename-NetAdapter -Name "Ethernet" -NewName "Arc-SRV"
|
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"
|
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"
|
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 Routing and necessary linked roles
|
||||||
Install-WindowsFeature RemoteAccess, RSAT-RemoteAccess-PowerShell, Routing -IncludeManagementTools
|
Install-WindowsFeature RemoteAccess, RSAT-RemoteAccess-PowerShell, Routing -IncludeManagementTools
|
||||||
#Install-remoteAccess -VpnType Vpn
|
#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
|
Set-NetConnectionProfile -NetworkCategory Private
|
||||||
|
$Params = @{
|
||||||
|
"Name" = 'vm-monitoring-icmpv4'
|
||||||
|
"Action" = 'Allow'
|
||||||
|
}
|
||||||
|
|
||||||
|
Set-NetFirewallRule @Params
|
||||||
# Activate NAT and DHCP Relay
|
# Activate NAT and DHCP Relay
|
||||||
netsh routing ip relay install
|
netsh routing ip relay install
|
||||||
|
|
||||||
@ -54,6 +52,8 @@ netsh -f ./Arc-CLI.conf
|
|||||||
netsh -f ./Arc-SRV.conf
|
netsh -f ./Arc-SRV.conf
|
||||||
netsh -f ./WAN.conf
|
netsh -f ./WAN.conf
|
||||||
|
|
||||||
|
Set-NetConnectionProfile -networkcategory private
|
||||||
|
|
||||||
# Change ZoneAlarm rule to accept incoming ICMP ipv4 probes
|
# Change ZoneAlarm rule to accept incoming ICMP ipv4 probes
|
||||||
$Params = @{
|
$Params = @{
|
||||||
"Name" = 'vm-monitoring-icmpv4'
|
"Name" = 'vm-monitoring-icmpv4'
|
||||||
|
@ -24,10 +24,16 @@ Start-Service RemoteAccess
|
|||||||
# Display interfaces and active forwarding for all of thm via Regedit
|
# Display interfaces and active forwarding for all of thm via Regedit
|
||||||
netsh inter show inter
|
netsh inter show inter
|
||||||
|
|
||||||
Set-ItemProperty -path 'HKLM:\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet`
|
|
||||||
\Services\Tcpip\Parameters' -Name 'IPEnableRouter' -Value '0x00000001'
|
|
||||||
Set-NetConnectionProfile -NetworkCategory Private
|
Set-NetConnectionProfile -NetworkCategory Private
|
||||||
|
|
||||||
|
$Params = @{
|
||||||
|
"Name" = 'vm-monitoring-icmpv4'
|
||||||
|
"Action" = 'Allow'
|
||||||
|
}
|
||||||
|
|
||||||
|
Set-NetFirewallRule @Params
|
||||||
|
|
||||||
# Activate NAT and DHCP Relay
|
# Activate NAT and DHCP Relay
|
||||||
netsh routing ip relay install
|
netsh routing ip relay install
|
||||||
|
|
||||||
|
@ -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 install
|
||||||
netsh routing ip nat add interface name="WAN" mode=PRIVATE
|
netsh routing ip nat add interface name="WAN" mode=PRIVATE
|
||||||
netsh routing ip nat add interface name="Aston" mode=FULL
|
netsh routing ip nat add interface name="Aston" mode=FULL
|
||||||
Set-NetConnectionProfile -networkcategory private
|
|
||||||
|
|
||||||
# Change ZoneAlarm rule to accept incoming ICMP ipv4 probes
|
# Change ZoneAlarm rule to accept incoming ICMP ipv4 probes
|
||||||
|
|
||||||
$Params = @{
|
$Params = @{
|
||||||
"Name" = 'vm-monitoring-icmpv4'
|
"Name" = 'vm-monitoring-icmpv4'
|
||||||
"Action" = 'Allow'
|
"Action" = 'Allow'
|
||||||
@ -36,6 +36,9 @@ $Params = @{
|
|||||||
|
|
||||||
Set-NetFirewallRule @Params
|
Set-NetFirewallRule @Params
|
||||||
|
|
||||||
|
Set-NetConnectionProfile -networkcategory private
|
||||||
|
|
||||||
|
|
||||||
# Add routes
|
# Add routes
|
||||||
|
|
||||||
route add -p 192.168.8.0/24 192.168.255.8
|
route add -p 192.168.8.0/24 192.168.255.8
|
||||||
|
Loading…
Reference in New Issue
Block a user