首先映射某个ip到指定ip的445端口,比如映射8.8.8.137到8.8.8.88:447,一般是因为8.8.8.88已经存在一个445,所以需要找一个不存在的ip映射到其他端口
netsh interface portproxy add v4tov4 listenaddress=8.8.8.137 listenport=445 connectaddress=8.8.8.88 connectport=447
注意只能使用127.0.0.1和8.8.8.137和0.0.0.0这三个地址,127.0.0.1是localhost,8.8.8.137是局域网地址,0.0.0.0是本机所有地址,注意不能使用其他主机的ip,因为流量没有经过那个ip。
验证代理是否成功
netsh interface portproxy show all
也可以使用命令
sc config LanmanServer start= disabled
net stop LanmanServer