kexue shangwang002
需先搭建 openvpn 海外服务端, 具体参考 https://www.cnblogs.com/weifeng1463/p/11041550.html
选择阿里云华东ecs 搭建openvpn 的客户端 , 具体参考 https://www.cnblogs.com/weifeng1463/p/7803354.html
在同一华东ecs上搭建 ss-server 服务端, 具体参考 https://www.cnblogs.com/weifeng1463/p/6759682.html
华东ecs 需只配置内网ip 地址, 通过vpn 或者阿里云后台去ssh登录 。
具体实例配置:
[root@ss-server_vpn-client ~] # ps aux|grep sss root 2939 0.0 0.4 202128 7976 ? Ss 16:46 0:00 /usr/bin/python /usr/bin/ssserver -c /etc/shadowsocks .json -d start |
[root@ss-server_vpn-client ~] # ps aux|grep openvpn root 2950 0.0 0.1 75424 3304 ? Ss 16:46 0:00 openvpn --daemon -- cd /etc/openvpn --config fanqiang001.conf --log-append /var/log/openvpn .log |
[root@ss-server_vpn-client ~] # route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 10.8.200.13 128.0.0.0 UG 0 0 0 tun0 0.0.0.0 192.168.0.253 0.0.0.0 UG 0 0 0 eth0 10.8.200.1 10.8.200.13 255.255.255.255 UGH 0 0 0 tun0 10.8.200.13 0.0.0.0 255.255.255.255 UH 0 0 0 tun0 47.252.85.224 192.168.0.253 255.255.255.255 UGH 0 0 0 eth0 128.0.0.0 10.8.200.13 128.0.0.0 UG 0 0 0 tun0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0 172.20.18.0 192.168.0.253 255.255.255.0 UG 0 0 0 eth0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 |
[root@ss-server_vpn-client ~] # cat /etc/rc.local #!/bin/bash # THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES # # It is highly advisable to create own systemd services or udev rules # to run scripts during boot instead of using this file. # # In contrast to previous versions due to parallel execution during boot # this script will NOT be run after all other services. # # Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure # that this script will be executed during boot. touch /var/lock/subsys/local ssserver -c /etc/shadowsocks .json -d start openvpn --daemon -- cd /etc/openvpn --config fanqiang001.conf --log-append /var/log/openvpn .log & ip route add 172.20.18.0 /24 via 192.168.0.253 |
win10 , mac 客户端ss 连接服务端后 可正常连接外网 。
分类:
网络相关
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 零经验选手,Compose 一天开发一款小游戏!
· 因为Apifox不支持离线,我果断选择了Apipost!
· 通过 API 将Deepseek响应流式内容输出到前端
2017-07-22 CentOS 7 使用iptables防火墙
2017-07-22 iperf命令
2017-07-22 在Linux/Centos下用wondershaper限速
2017-07-22 使用yum来下载RPM包而不进行安装