1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-24 08:52:31 +02:00
dockerfiles/tinc/README.md

75 lines
1.4 KiB
Markdown
Raw Normal View History

2015-06-23 03:00:07 +02:00
tinc
====
2015-07-16 16:24:25 +02:00
![](https://badge.imagelayers.io/vimagick/tinc:latest.svg)
2015-06-23 03:00:07 +02:00
2015-06-14 05:06:12 +02:00
[`tinc`][1] is a Virtual Private Network (VPN) daemon that uses tunnelling and
encryption to create a secure private network between hosts on the Internet.
To use this image, you need to:
- Have baisc knowledges of tinc
2015-06-14 10:50:25 +02:00
- Create a directory tree by hand ([tutor][2])
2015-06-14 05:06:12 +02:00
- Use `docker-compose` to manage
## directory tree
```
~/fig/tinc/
├── docker-compose.yml
└── tinc/
2015-08-26 16:50:36 +02:00
└── netname/
   ├── hosts/
   │   ├── client
   │   ├── client-down*
   │   ├── client-up*
   │   └── server
   ├── rsa_key.priv
   ├── tinc.conf
   ├── tinc-down*
   └── tinc-up*
2015-06-14 05:06:12 +02:00
```
## docker-compose.yml
```
2015-06-22 15:56:24 +02:00
tinc:
2015-06-14 05:06:12 +02:00
image: vimagick/tinc
ports:
2015-06-14 10:34:55 +02:00
- "655:655/tcp"
- "655:655/udp"
2015-06-14 05:06:12 +02:00
volumes:
2015-08-26 16:50:36 +02:00
- ./tinc:/etc/tinc
2015-06-22 15:56:24 +02:00
environment:
- VERBOSE=2
2015-06-14 16:15:54 +02:00
cap_add:
2015-06-14 09:15:04 +02:00
- NET_ADMIN
2015-06-14 05:06:12 +02:00
restart: always
```
2015-06-14 07:41:39 +02:00
## server
```
2015-06-14 10:50:25 +02:00
# run
2015-06-14 12:24:22 +02:00
$ docker-compose up -d
2015-06-14 10:50:25 +02:00
# monitor
2015-06-14 12:24:22 +02:00
$ docker-compose logs
2015-06-14 10:50:25 +02:00
# stats
2015-06-22 15:56:24 +02:00
$ watch docker exec tinc_tinc_1 netstat -an
2015-06-14 10:50:25 +02:00
```
## client
```
# start
2015-06-23 09:13:00 +02:00
$ tincd -d -D -n netname --pidfile /tmp/tinc.pid
2015-06-14 10:50:25 +02:00
# stop
$ tincd -k --pidfile /tmp/tinc.pid
2015-06-14 07:41:39 +02:00
```
2015-06-14 05:06:12 +02:00
[1]: http://tinc-vpn.org/
[2]: https://www.digitalocean.com/community/tutorials/how-to-install-tinc-and-set-up-a-basic-vpn-on-ubuntu-14-04