Windows networking

From Personal Wiki
Revision as of 18:19, 23 May 2021 by Wiki (talk | contribs) (→‎Route)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Route

Permanent route, stays after reboot.

route -p ADD 192.168.35.0 MASK 255.255.255.0 192.168.0.2

Wi-Fi

Save/restore profile

netsh wlan show profiles
netsh wlan export profile "profile name" key=clear folder="%UserProfile%\Desktop"

netsh wlan add profile filename="name_of_xml.xml" user=all
netsh wlan connect name=SSID-NAME ssid=SSID-NAME

XML for auto connection mus include
</SSIDConfig>
<connectionType>ESS</connectionType>
<connectionMode>auto</connectionMode>

VPN

IKEv2/IPSEC

Powershell applet, certification assignment need to eb done if more certificates are installed or error is thrown.

Set-VpnConnectionIPsecConfiguration -ConnectionName "VPN NAME" -AuthenticationTransformConstants SHA256128 -CipherTransformConstants AES256 -EncryptionMethod AES256 -IntegrityCheckMethod SHA256 -PfsGroup ECP384 -DHGroup ECP384 -PassThru -Force

$ca = Get-ChildItem Cert:\LocalMachine\Root\ | ? SerialNumber -EQ 41773cfbde553695
Set-VpnConnection -Name "VPN NAME" -MachineCertificateIssuerFilter $ca

DH group (Algo&Length) == Certificate (Algo&Length)

EXP521 is not supported yet.

L2TP/IPsec

Connect from device behind NAT register:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PolicyAgent -> Add value DWORD -> Name AssumeUDPEncapsulationContextOnSendRule, Value 2.