1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-21 18:06:36 +02:00

update tinc

This commit is contained in:
kev 2019-06-06 08:36:40 +08:00
parent c59bef13f5
commit de641bf6c9
3 changed files with 13 additions and 5 deletions

View File

@ -18,9 +18,9 @@ ENV NETNAME=netname \
VERBOSE=2
ENV IP_ADDR=1.2.3.4 \
ADDRESS=10.0.0.1 \
ADDRESS=10.20.30.1 \
NETMASK=255.255.255.0 \
NETWORK=10.0.0.0/24 \
NETWORK=10.20.30.0/24 \
RUNMODE=server
EXPOSE 655/tcp 655/udp

View File

@ -36,6 +36,10 @@ tinc:
- ./tinc:/etc/tinc
environment:
- IP_ADDR=1.2.3.4
- ADDRESS=10.20.30.1
- NETMASK=255.255.255.0
- NETWORK=10.20.30.0/24
- RUNMODE=server
cap_add:
- NET_ADMIN
dns: 8.8.8.8
@ -88,7 +92,7 @@ Interface = tun0
ConnectTo = server
$ cat > /etc/tinc/netname/hosts/linkit
Subnet = 10.0.0.125
Subnet = 10.20.30.125
$ tincd -n netname -K < /dev/null
Generating 2048 bits keys:
@ -99,11 +103,11 @@ Done.
$ cat > /etc/tinc/netname/tinc-up
#!/bin/sh
ip link set $INTERFACE up
ip addr add 10.0.0.125/24 dev $INTERFACE
ip addr add 10.20.30.125/24 dev $INTERFACE
$ cat > /etc/tinc/netname/tinc-down
#!/bin/sh
ip addr del 10.0.0.125/24 dev $INTERFACE
ip addr del 10.20.30.125/24 dev $INTERFACE
ip link set $INTERFACE down
$ cat > /etc/tinc/netname/hosts/server-up

View File

@ -7,6 +7,10 @@ tinc:
- ./tinc:/etc/tinc
environment:
- IP_ADDR=1.2.3.4
- ADDRESS=10.20.30.1
- NETMASK=255.255.255.0
- NETWORK=10.20.30.0/24
- RUNMODE=server
cap_add:
- NET_ADMIN
dns: 8.8.8.8