add openvpn
This commit is contained in:
parent
78a5165346
commit
f935f57b02
63
apps/openvpn/OpenVPN.md
Normal file
63
apps/openvpn/OpenVPN.md
Normal file
@ -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)
|
BIN
apps/openvpn/assets/image-20221122234949353.png
Normal file
BIN
apps/openvpn/assets/image-20221122234949353.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
BIN
apps/openvpn/assets/image-20221122235136340.png
Normal file
BIN
apps/openvpn/assets/image-20221122235136340.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
BIN
apps/openvpn/assets/image-20221122235329742.png
Normal file
BIN
apps/openvpn/assets/image-20221122235329742.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 46 KiB |
BIN
apps/openvpn/assets/image-20221122235709604.png
Normal file
BIN
apps/openvpn/assets/image-20221122235709604.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 86 KiB |
Loading…
Reference in New Issue
Block a user