Get the App
SLTechnology News&Howtos  ›  Servers  › 

Modify ipsec, modify remote port, modify ipsec by yourself

Shulou Source: shulou.com Published: 2022-06-03 09:51:22 10月01日 Update

1. Modify manually

2. Modify remote port

3. Self-help tools modify ipsec

1. Modify manually

Ipsec security policy modification

If you modify the remote port, close ipsec first, and then adjust the remote port

Method: set the security policy. The IPSec of window is used for protection. For example, allow remote xxxx ports. Deny all other port connections.

Open the local security policy. There is no default. Create a new policy, skip

Modify ipsec, double-click the policy, open it and modify it. Change it to xxxx, but do not change it to 3389.

2. Modify remote port

Win2016 modify remote port: note that you need to modify ipsec and restart the machine to take effect. You can close ipsec first, and then modify the port number.

1. Enter regedit in the win+R or cmd command to open the registry

2 、

Modify the registry: HKEY_LOCAL_MACHINE\ System\ CurrentControlSet\ Control\ Terminal Server\ Wds\ Repwd\ Tds\ Tcp PortNumber

Modify HKEY_LOCAL_MACHINE\ System\ CurrentControlSet\ Control\ Terminal Server\ WinStations\ RDP-Tcp modify PortNumber decimal, non-3389 port

3. Self-help tools modify ipsec

1) add

Netsh ipsec static add filter filterlist=any- > xxx existing policy srcaddr=$ {srcaddr} dstaddr=$ {dstaddr} dstport=$ {dstport} description=$ {description} protocol=TCP mirrored=yes "

2) add

Hogwash 1

Srcaddr=$2

Dstaddr=$3

Dstport=$4

Description= "$5"

Protocol=TCP

Netsh ipsec static add filter filterlist=any- > t+cloud srcaddr=$ {srcaddr} dstaddr=$ {dstaddr} dstport=$ {dstport} description=$ {description} protocol=TCP mirrored=yes "

3 delete remote-- > local:port; delete other machines = = > access the port of this machine

Netsh ipsec static delete filter filterlist=any- > xxxxxxx srcaddr=0.0.0.0 srcmask=0.0.0.0 dstaddr=$ {dstaddr} dstport=$ {dstport} protocol=TCP mirrored=yes

Tags: Port policy security machine tool manual registry decimal slogan command method decimal adjustment input protection Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn macOS Docker Linux Apple