How To Setup Your Own Vpn Server | Ubuntu 18.04 | Install and Setup Tinc

Опубликовано: 21 Март 2025
на канале: Explained Easy
2,537
12

How To Setup Your Own Vpn Server | Ubuntu 18.04 | Install and Setup Tinc

0:01:46 - Goals
0:04:08 - Prerequisites
0:04:54 - Step 1 — Installing Tinc
0:06:12 - Step 2 — Configuring the Tinc Server
0:13:24 - Step 3 — Configuring the Client Nodes
0:19:56 - Step 4 — Distributing the Keys
0:25:35 - Step 5 — Testing the Configuration
0:29:03 - Step 6 — Configuring Tinc To Start Up on Boot
0:30:45 - Conclusion

Hello, in this video we install own VPN server and set it up.
Please note for this guide you need 3 machines(1 server and 2 clients) I use only my server, that's why some commands gave unexpected results. I hope this moment is clear.
Thanks for watching


Commands:
sudo apt update
sudo apt install tinc
sudo mkdir -p /etc/tinc/netname/hosts
sudo nano /etc/tinc/netname/tinc.conf
sudo nano /etc/tinc/netname/hosts/server_01
sudo tincd -n netname -K4096
sudo nano /etc/tinc/netname/tinc-up
sudo nano /etc/tinc/netname/tinc-down
sudo chmod 755 /etc/tinc/netname/tinc-*
sudo ufw allow 655
sudo mkdir -p /etc/tinc/netname/hosts
sudo nano /etc/tinc/netname/tinc.conf
sudo nano /etc/tinc/netname/hosts/node_name
sudo tincd -n netname -K4096
sudo nano /etc/tinc/netname/tinc-up
sudo nano /etc/tinc/netname/tinc-down
sudo chmod 755 /etc/tinc/netname/tinc-*
sudo ufw allow 655
scp /etc/tinc/netname/hosts/client_01 sammy@server-01_private_IP:/tmp
sudo cp /tmp/client_01 /etc/tinc/netname/hosts/
scp /etc/tinc/netname/hosts/server_01 user@client-01_private_IP:/tmp
sudo cp /tmp/server_01 /etc/tinc/netname/hosts/
sudo nano /etc/tinc/netname/hosts/server_01
scp /etc/tinc/netname/hosts/client_02 sammy@server-01_public_IP:/tmp
sudo cp /tmp/client_02 /etc/tinc/netname/hosts/
scp /etc/tinc/netname/hosts/server_01 user@client-02_public_IP:/tmp
sudo cp /tmp/server_01 /etc/tinc/netname/hosts/
sudo tincd -n netname -D -d3
ping 10.0.0.2
sudo systemctl enable tinc@netname
sudo systemctl start tinc@netname