【端口转发】利用netsh进行端口转发

0x01 简介

NetSH (Network Shell) 是windows系统本身提供的功能强大的网络配置命令行工具。故我们可以使用netsh进行内网端口转发。
思考了一下,发现这个是当我们进入内网的时候可以使用这个工具,好像外网访问内网是不行的(我觉得是这样的(╯▽╰ )),但是lcx就可以外网访问内网呀~

0x02 使用方法

添加端口转发

netsh interface portproxy add v4tov4 listenaddress= listenport= connectaddress= connectport=
netsh interface portproxy add v4tov6 listenaddress= listenport= connectaddress= connectport=
netsh interface portproxy add v6tov4 listenaddress= listenport= connectaddress= connectport=
netsh interface portproxy add v6tov6 listenaddress= listenport= connectaddress= connectport=

查看已经设置的端口转发

netsh interface portproxy show all
netsh interface portproxy show v4tov4
netsh interface portproxy show v4tov6
netsh interface portproxy show v6tov4
netsh interface portproxy show v6tov6

修改已经设置的端口转发

netsh interface portproxy set v4tov4 listenport=
netsh interface portproxy set v6tov4 listenport=
netsh interface portproxy set v4tov6 listenport=
netsh interface portproxy set v6tov6 listenport=

删除已经设置的端口转发

netsh interface portproxy delete v4tov4 listenport=
netsh interface portproxy delete v6tov4 listenport=
netsh interface portproxy delete v4tov6 listenport=
netsh interface portproxy delete v6tov6 listenport=

你可能感兴趣的:(【端口转发】利用netsh进行端口转发)