windows平台端口映射工具的使用

目录

 

1.系统自身netsh命令

2.使用Portmap

3.使用PortTunnel

4.测试


1.系统自身netsh命令

优点:不需第三方软件.缺点:没有白名单,黑名单功能.只能通过防火墙功能进行设置.

//增加端口映射
netsh interface portproxy add v4tov4  listenaddress=0.0.0.0 listenport=3390 connectaddress=192.168.1.208  connectport=3389


netsh interface portproxy add v4tov4  listenaddress=0.0.0.0 listenport=3391 connectaddress=192.168.1.147  connectport=3389

//删除端口映射
netsh interface portproxy delete  v4tov4  listenaddress=0.0.0.0 listenport=3391

//查看当前端口映射
netsh interface portproxy show all

2.使用Portmap

优点:使用简单.缺点:只有黑名单功能.没有白名单功能.并且不能设置成服务自启.

3.使用PortTunnel

优点:使用简单,注册为系统服务可自启.可自定义访问规则.缺点:在传输速度上比较慢.(使用的是默认设置)

y,* // allow all IPs

// syntax:
//   basic:
//     y,[ip_spec]
//     n,[ip_spec]
//   redirect based on ClientIP:
//     r,[ip_spec]>target:port
//   redirect based on PortTunnelIP:
//     p,[ip_spec]>target:port
//   includes:
//     i,c:\rules.txt
//   [ip_spec]
//     single
//       1.2.3.4
//       address.tld
//     mask
//       * or 1.* or 1.2.* or 1.2.3.*
//     range
//       1.2.3.10|1.2.3.20
//       address1.tld|address2.tld

4.测试

netsh interface portproxy add v4tov4  listenaddress=0.0.0.0 listenport=1520 connectaddress=192.168.1.177  connectport=1521

//netsh
exp scott/[email protected]:1520/fjtw file=scott.dmp  
耗时0小时0分39秒

//PortTunnel
exp scott/[email protected]:1522/fjtw file=scott.dmp
耗时0小时10分7秒

//Portmap
exp scott/[email protected]:1522/fjtw file=scott.dmp
耗时0小时0分36秒

猜你喜欢

转载自blog.csdn.net/yuanlin1318/article/details/102796854