diff --git a/apps/openvpn/OpenVPN.md b/apps/openvpn/OpenVPN.md new file mode 100644 index 0000000..8585784 --- /dev/null +++ b/apps/openvpn/OpenVPN.md @@ -0,0 +1,63 @@ +openvpn-server + +The git repository is available at: https://github.com/angristan/openvpn-install + +##### 自定义openvpn网关 + +```bash +sudo vim /etc/openvpn/server.conf +#修改server.conf文件 +server 10.0.11.0 255.255.255.0 +``` + + + +##### 设置openvpn 客户端之间互通 + +```bash +sudo vim /etc/openvpn/server.conf +#在server.conf文件中添加 +client-to-client +``` + +##### openvpn 客户端连接服务器后无法ping通内网服务 + +打开配置文件注释一下两行内容 + +``` +#ignore-unknown-option block-outside-dns +#setenv opt block-outside-dns # Prevent Windows 10 DNS leak +``` + +添加下方配置行到配置文件底部 + +``` +route-nopull +route 10.0.11.0 255.255.255.0 vpn_gateway +``` + +> 注意route后的 ip地址 需要填写你在服务器上配置的server地址,默认是10.8.0.0 + + + +##### windows 客户端连接多个服务器 + +默认openvpn只会创建一个虚拟网卡所以同时只能连接一个服务器 + +打开此文件夹 `"C:\ProgramData\Microsoft\Windows\Start Menu\Program\OpenVPN\Utilities"` 双击击下方标记程序添加一个虚拟网卡然后就可以同时连接多个服务器了 + +![image-20221122235709604](assets/image-20221122235709604.png) + +##### windows 设置openvpn gui 开机自启并且自动连接服务器 + +右击openvpn快捷方式图标点击属性,然后在目标输入框的尾部添加 `--connect client.ovpn` + +![image-20221122234949353](assets/image-20221122234949353.png) + +win+R 输入`shell:startup`打开 自启文件夹 + +![image-20221122235136340](assets/image-20221122235136340.png) + +然后将快捷方式复制到该文件夹下 + +![image-20221122235329742](assets/image-20221122235329742.png) \ No newline at end of file diff --git a/apps/openvpn/assets/image-20221122234949353.png b/apps/openvpn/assets/image-20221122234949353.png new file mode 100644 index 0000000..a5302ca Binary files /dev/null and b/apps/openvpn/assets/image-20221122234949353.png differ diff --git a/apps/openvpn/assets/image-20221122235136340.png b/apps/openvpn/assets/image-20221122235136340.png new file mode 100644 index 0000000..81ed37b Binary files /dev/null and b/apps/openvpn/assets/image-20221122235136340.png differ diff --git a/apps/openvpn/assets/image-20221122235329742.png b/apps/openvpn/assets/image-20221122235329742.png new file mode 100644 index 0000000..19af9ef Binary files /dev/null and b/apps/openvpn/assets/image-20221122235329742.png differ diff --git a/apps/openvpn/assets/image-20221122235709604.png b/apps/openvpn/assets/image-20221122235709604.png new file mode 100644 index 0000000..8182f25 Binary files /dev/null and b/apps/openvpn/assets/image-20221122235709604.png differ