Skip to content

Instantly share code, notes, and snippets.

@WesleyCh3n
Created January 22, 2025 08:15
Show Gist options
  • Save WesleyCh3n/057ffb6322e61cc22d7d68cec999e3d8 to your computer and use it in GitHub Desktop.
Save WesleyCh3n/057ffb6322e61cc22d7d68cec999e3d8 to your computer and use it in GitHub Desktop.
:: port forwarding
netsh interface portproxy add v4tov4 listenport=1234 listenaddress=111.222.333.444 connectport=4321 connectaddress=444.333.222.111
netsh interface portproxy delete v4tov4 listenport=1234 listenaddress=111.222.333.444
:: enable firewall
netsh advfirewall firewall add rule name="allow port 22" dir=in action=allow protocol=TCP localport=22
netsh advfirewall firewall delete rule name="allow port 22"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment