-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtinc.sh
46 lines (35 loc) · 985 Bytes
/
tinc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
## https://florianjensen.com/2018/03/30/set-up-tinc-on-ubuntu/
#vm1 celop
apt-get update
apt-get install tinc
mkdir -p /etc/tinc/netname/hosts
vi /etc/tinc/netname/tinc.conf
Name = celop
AddressFamily = ipv4
Interface = tun0
vi /etc/tinc/netname/hosts/celop
Address = ams_public_IP
Subnet = 10.0.0.1/32
tincd -n netname -K4096
vi /etc/tinc/netname/tinc-up
ifconfig $INTERFACE 10.0.0.1 netmask 255.255.255.0
vi /etc/tinc/netname/tinc-down
ifconfig $INTERFACE down
chmod +x /etc/tinc/netname/tinc-*
#vm2 celov
apt-get update
apt-get install tinc
mkdir -p /etc/tinc/netname/hosts
vi /etc/tinc/netname/tinc.conf
Name = celov
AddressFamily = ipv4
Interface = tun0
vi /etc/tinc/netname/hosts/celov
Address = ams_public_IP
Subnet = 10.0.0.2/32
tincd -n netname -K4096
vi /etc/tinc/netname/tinc-up
ifconfig $INTERFACE 10.0.0.2 netmask 255.255.255.0
vi /etc/tinc/netname/tinc-down
ifconfig $INTERFACE down
chmod +x /etc/tinc/netname/tinc-*