➜ ~ apt install tinc -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
liblzo2-2
The following NEW packages will be installed:
liblzo2-2 tinc
0 upgraded, 2 newly installed, 0 to remove and 6 not upgraded.
Need to get 261 kB of archives.
After this operation, 831 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main amd64 liblzo2-2 amd64 2.10-2 [56.9 kB]Get:2 http://deb.debian.org/debian bookworm/main amd64 tinc amd64 1.0.36-2+b2 [204 kB]Fetched 261 kB in 0s (2,189 kB/s)Selecting previously unselected package liblzo2-2:amd64.
(Reading database ... 56790 files and directories currently installed.)Preparing to unpack .../liblzo2-2_2.10-2_amd64.deb ...
Unpacking liblzo2-2:amd64 (2.10-2) ...
Selecting previously unselected package tinc.
Preparing to unpack .../tinc_1.0.36-2+b2_amd64.deb ...
Unpacking tinc (1.0.36-2+b2) ...
Setting up liblzo2-2:amd64 (2.10-2) ...
Setting up tinc (1.0.36-2+b2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/tinc.service → /lib/systemd/system/tinc.service.
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+deb12u9) ...
➜tincd -n bbq -K 4096Generating 4096 bits keys:
.+....+..+....+............+..+..................+...+....+......+..+....+.....+....+.....+..........+..+...+......+.+..+...+..........+.....+........................+..........+.....+.......+...+............+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ p
Done.
Please enter a file to save private RSA key to [/etc/tinc/bbq/rsa_key.priv]:
Please enter a file to save public RSA key to [/etc/tinc/bbq/hosts/tcb]:
➜ ~ tincd -n bbq -K 4096Generating 4096 bits keys:
...+.....+............+.........+.+........+......+....+..+.........+......+....+...........+....+...+......+.....+..............+.....+.........+.............+...........+....+...+..+......+.+...............+...+..+......+...+..........+..+...+.......+............+..+.............+...+...+.....+......+..........+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ p
Done.
Please enter a file to save private RSA key to [/etc/tinc/bbq/rsa_key.priv]:
Please enter a file to save public RSA key to [/etc/tinc/bbq/hosts/tcd]:
# 本地pc ping服务器➜ ~ ping -c 5 10.0.0.11
PING 10.0.0.11 (10.0.0.11) 56(84) bytes of data.
64 bytes from 10.0.0.11: icmp_seq=1ttl=64time=202 ms
64 bytes from 10.0.0.11: icmp_seq=2ttl=64time=212 ms
64 bytes from 10.0.0.11: icmp_seq=3ttl=64time=198 ms
64 bytes from 10.0.0.11: icmp_seq=4ttl=64time=201 ms
64 bytes from 10.0.0.11: icmp_seq=5ttl=64time=203 ms
--- 10.0.0.11 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4009ms
rtt min/avg/max/mdev = 197.765/203.114/211.705/4.642 ms
# 服务器ping本地pc➜ ~ ping -c 5 10.0.0.22
PING 10.0.0.22 (10.0.0.22) 56(84) bytes of data.
64 bytes from 10.0.0.22: icmp_seq=1ttl=64time=200 ms
64 bytes from 10.0.0.22: icmp_seq=2ttl=64time=198 ms
64 bytes from 10.0.0.22: icmp_seq=3ttl=64time=203 ms
64 bytes from 10.0.0.22: icmp_seq=4ttl=64time=217 ms
64 bytes from 10.0.0.22: icmp_seq=5ttl=64time=208 ms
--- 10.0.0.22 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 198.229/205.123/216.801/6.694 ms
PS C:\Program Files (x86)\tinc> .\tincd.exe -n bbq -K 4096Generating 4096 bits keys:
...................................................................................................................................................................................................................................................................................................................................................++++ p
...........................................++++ q
Done.
Please enter a file to save private RSA key to [C:\Program Files (x86)\tinc/bbq/rsa_key.priv]:
Please enter a file to save public RSA key to [C:\Program Files (x86)\tinc/bbq/hosts/zb14]: