1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-25 02:04:06 +02:00
dockerfiles/openvpn/README.md

96 lines
1.5 KiB
Markdown
Raw Normal View History

2015-09-01 03:53:21 +02:00
openvpn
=======
![](https://badge.imagelayers.io/vimagick/openvpn:latest.svg)
OpenVPN is blocked in China. You need to connect vpn via secure tunnel.
- server: vpn.datageek.info
- bridge: bridge.datageek.info
- client: localhost
## docker-compose.yml (server)
```
data:
image: busybox
volumes:
- /etc/openvpn
server:
image: vimagick/openvpn
expose:
- "1194/tcp"
volumes_from:
- data
cap_add:
- NET_ADMIN
restart: always
fteproxy:
image: vimagick/fteproxy
ports:
- "4911:4911"
links:
- "server"
environment:
- "MODE=server"
- "SERVER_IP=0.0.0.0"
- "SERVER_PORT=4911"
- "PROXY_IP=server"
- "PROXY_PORT=1194"
- "KEY=CB2FBA2BC70490526E749E01BB050F6B555964290DFF58CF24785B4A093F7B18"
restart: always
```
## docker-compose.yml (bridge)
```
fteproxy:
image: vimagick/fteproxy
ports:
- "1194:1194"
environment:
- "MODE=client"
- "SERVER_IP=vpn.datageek.info"
- "SERVER_PORT=4911"
- "CLIENT_IP=0.0.0.0"
- "CLIENT_PORT=1194"
- "KEY=CB2FBA2BC70490526E749E01BB050F6B555964290DFF58CF24785B4A093F7B18"
restart: always
```
## server
```
$ fig up -d data
$ ./setup.sh
1) server
2) client
2015-09-01 05:00:28 +02:00
3) revoke
4) backup
5) restore
6) quit
2015-09-01 03:53:21 +02:00
$ fig up -d
```
## bridge
```
$ fig up -d
```
## client
```
$ cat /etc/openvpn/client.conf
...
remote bridge.datageek.info 1194 tcp
route 192.168.1.0 255.255.255.0 net_gateway
...
$ systemctl start openvpn@client
$ systemctl enable openvpn@client
```