-
-
Save valmayaki/46407da7dc33b10d2412ab6aa6e20ec8 to your computer and use it in GitHub Desktop.
netsh ip/port forwarding sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add forwarding interface: | |
netsh interface portproxy add v4tov4 listenport={srcPort} listenaddress={srcIp} connectport={DesPort} connectaddress={DesIp} | |
show interface: | |
netsh interface portproxy show v4tov4 | |
delete interface: | |
netsh interface portproxy delete v4tov4 listenport={srcPort} listenaddress={srcIp} | |
----------------------------- | |
add firewall rule: | |
netsh advfirewall firewall add rule name="{ruleName}" protocol=TCP dir=in localip={srcIp} localport={srcPort} action=allow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment