您的位置:首页 > 运维架构 > Linux

20170331-ssh-w 运行在狗洞翻墙

2017-04-01 00:00 351 查看

lite版本使用方法

• 下载对应您系统的dtunnel客户端(win/linux/mac/arm),程序需要在狗洞两端运行,服务的一方叫远端,连接的一方叫近端
• 远端:./dtunnel -service xxx:1234 -auth abcd -dnscache 10 . service:监听地址, -auth:验证密码,可以为空, -dnscache:dns缓存,分钟数(开启后加速效果显著)
• 近端:./dtunnel -service xxx:1234 -local :8888 -auth abcd -encrypt -action ip:port. -service:服务器地址,-local:本地服务地址,-encrypt:是否加密,-action:控制远端行为,socks5表示开启代理服务,ip:port代表端口映射,-auth:密码,可留空,和服务端一致

下载网站:http://dog-tunnel.tk/#sec6
下载包: dtunnel_linux_x86_1.30_lite.tgz
解压: tar xvf dtunnel_linux_x86_1.30_lite.tgz
给执行权限: chmod +x dtunnel_lite
server: vim /etc/ssh/sshd_config
125 PermitTunnel yes
service sshd restart
./dtunnel_lite -service localhost:1234 -dnscache 10 -auth 123456
client: ./dtunnel_lite -service 192.168.30.21:1234 -local :8888 -action localhost:22 -auth 123456 - encrypt
ssh -Nf -w 2:3 root@localhost -p 8888
ifconfig tun2 192.168.200.1 192.168.200.2 netmask 255.255.255.0
ifconfig tun2 up
server: ifconfig tun3 192.168.200.2 192.168.200.1 netmask 255.255.255.0
sysctl -a |grep ip_for 查看是否开启转发
如果没有开启:
vim /etc/sysctl.conf
7 net.ipv4.ip_forward = 1
生效:sysctl -p
最后配置防火墙和路由规则
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  linux dog-tunnel