1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-07-03 00:33:55 +00:00
dockerfiles/tinc/README.md

77 lines
1.5 KiB
Markdown
Raw Normal View History

2015-06-23 01:00:07 +00:00
tinc
====
2015-06-28 17:52:38 +00:00
[![](https://badge.imagelayers.io/vimagick/tinc:latest.svg)](https://imagelayers.io/?images=vimagick/tinc:latest)
2015-06-23 01:00:07 +00:00
2015-06-14 03:06:12 +00: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.
2015-06-22 13:56:24 +00:00
This tiny image (6.74 MB) is based on `alpine` (5.254 MB).
2015-06-14 03:06:12 +00:00
To use this image, you need to:
- Have baisc knowledges of tinc
2015-06-14 08:50:25 +00:00
- Create a directory tree by hand ([tutor][2])
2015-06-14 03:06:12 +00:00
- Use `docker-compose` to manage
## directory tree
```
~/fig/tinc/
├── docker-compose.yml
└── tinc/
├── netname/
│   ├── hosts/
│   │   ├── client
│   │   ├── client-down
│   │   ├── client-up
│   │   └── server
│   ├── rsa_key.priv
│   ├── tinc.conf
│   ├── tinc-down
│   └── tinc-up
└── nets.boot
```
## docker-compose.yml
```
2015-06-22 13:56:24 +00:00
tinc:
2015-06-14 03:06:12 +00:00
image: vimagick/tinc
ports:
2015-06-14 08:34:55 +00:00
- "655:655/tcp"
- "655:655/udp"
2015-06-14 03:06:12 +00:00
volumes:
- tinc:/etc/tinc
2015-06-22 13:56:24 +00:00
environment:
- VERBOSE=2
2015-06-14 14:15:54 +00:00
cap_add:
2015-06-14 07:15:04 +00:00
- NET_ADMIN
2015-06-14 03:06:12 +00:00
restart: always
```
2015-06-14 05:41:39 +00:00
## server
```
2015-06-14 08:50:25 +00:00
# run
2015-06-14 10:24:22 +00:00
$ docker-compose up -d
2015-06-14 08:50:25 +00:00
# monitor
2015-06-14 10:24:22 +00:00
$ docker-compose logs
2015-06-14 08:50:25 +00:00
# stats
2015-06-22 13:56:24 +00:00
$ watch docker exec tinc_tinc_1 netstat -an
2015-06-14 08:50:25 +00:00
```
## client
```
# start
2015-06-23 07:13:00 +00:00
$ tincd -d -D -n netname --pidfile /tmp/tinc.pid
2015-06-14 08:50:25 +00:00
# stop
$ tincd -k --pidfile /tmp/tinc.pid
2015-06-14 05:41:39 +00:00
```
2015-06-14 03:06:12 +00: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