We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
想要搭建一个VPN,方便在外网的时候远程连接公司局域网,可以使用Shadowsocks,很方便滴搭建,网络拓扑图如下:
需要的资源:
步骤1: 安装Shadowsocks
#安装 python setup tools [root@localhost ~]# yum install python-setuptools #安装pip [root@localhost ~]# easy_install pip #升级 pip [root@localhost ~]# pip install --upgrade pip #安装 shadowsocks [root@localhost ~]# pip install shadowsocks
步骤2: 创建Shadowsocks服务
[root@localhost ~]# vi /usr/lib/systemd/system/shadowsocks.service [Unit] Description=Shadowsocks Server Documentation=https://github.com/shadowsocks/shadowsocks After=network.target remote-fs.target nss-lookup.target [Service] Type=forking #设置启动时的配置文件,根据自己的需求改. ExecStart=/usr/bin/ssserver -c /etc/shadowsocks.json -d start ExecReload=/bin/kill -HUP $MAINPID ExecStop=/usr/bin/ssserver -d stop [Install] WantedBy=multi-user.target
步骤3: 创建Shadowsocks配置
[root@localhost ~]# vi /etc/shadowsocks.json { "server":"0.0.0.0", "server_port":2082, "local_port":1080, "password":"LsY61dyK", "timeout":600, "method":"rc4-md5" }
备注:
步骤4: 启动服务
[root@localhost ~]# systemctl enable shadowsocks [root@localhost ~]# systemctl start shadowsocks
这里需要注意:如果启动shadowsocks之后,访问还是有问题,可以确认下主机的防火墙是。
步骤5: 创建AUTOSSH反向代理
使用公网服务器作端口转发,公网服务器需要开启对应的端口,例如,这里使用 2082端口,则公网服务器需要开放2082端口。
#shadowsocks [root@localhost ~]# autossh -M 5678 -NR 2082:localhost:2082 -f root@123.123.123.123
备注: 对于如何使用AUTOSSH,请参考之前博文,autossh内外网穿透方法
客户端填写的配置:
The text was updated successfully, but these errors were encountered:
只有一个前言,没有后续了么?
Sorry, something went wrong.
No branches or pull requests
前言
想要搭建一个VPN,方便在外网的时候远程连接公司局域网,可以使用Shadowsocks,很方便滴搭建,网络拓扑图如下:
需要的资源:
局域网服务器:安装配置Shadowsocks
步骤1: 安装Shadowsocks
步骤2: 创建Shadowsocks服务
步骤3: 创建Shadowsocks配置
备注:
步骤4: 启动服务
这里需要注意:如果启动shadowsocks之后,访问还是有问题,可以确认下主机的防火墙是。
步骤5: 创建AUTOSSH反向代理
使用公网服务器作端口转发,公网服务器需要开启对应的端口,例如,这里使用 2082端口,则公网服务器需要开放2082端口。
备注: 对于如何使用AUTOSSH,请参考之前博文,autossh内外网穿透方法
客户端配置
客户端填写的配置:
参考链接
The text was updated successfully, but these errors were encountered: