[Vpn]build local network

reene44444

Reene

Posted on November 29, 2024

[Vpn]build local network

Configure ZeroTier for Host machine and Ubuntu Machine

configure ZeroTier for communication between host and an Ubuntu machine.

Reference:

1. Install ZeroTier

S Host

  1. Download the ZeroTier client from https://www.zerotier.com/download/.
  2. Install and run the application.
  3. Open the ZeroTier menu bar app and log in to ZeroTier Central.

Ubuntu Virtual Machine

Run the following commands to install ZeroTier:

curl -s https://install.zerotier.com | sudo bash
Enter fullscreen mode Exit fullscreen mode

2. Configure ZeroTier Network

Create a Network

  1. Go to https://my.zerotier.com/.
  2. Log in and click "Create a Network".
  3. Note the Network ID (e.g., 8056c2e21c000001).
  4. Click on the new network and configure:
    • Name: Set a friendly name like HomeNetwork.
    • Access Control: Select Private to manually approve devices.

3. Join the ZeroTier Network

Host

  1. In the ZeroTier app, click "Join Network".
  2. Enter the Network ID and join.
  3. Approve the device in ZeroTier Central by checking the Auth box.

Ubuntu Machine

Run the following command to join the network:

sudo zerotier-cli join <network-id>
Enter fullscreen mode Exit fullscreen mode

Check connection status:

sudo zerotier-cli listnetworks
Enter fullscreen mode Exit fullscreen mode

4. Assign and Verify IP Addresses

ZeroTier assigns virtual IPs automatically.

Host

Find the IP in the ZeroTier menu bar app.

Ubuntu Machine

Run the following command to check the assigned IP:

ip addr show zt*
Enter fullscreen mode Exit fullscreen mode

5. Test Connectivity

Ping Test

  • From host to Ubuntu: ping
  • From Ubuntu to host: ping

SSH Connection

  • From host: ssh user@

6. Enable ZeroTier on Startup

Ubuntu Machine

Enable and start the ZeroTier service:

sudo systemctl enable zerotier-one
sudo systemctl start zerotier-one
Enter fullscreen mode Exit fullscreen mode
💖 💪 🙅 🚩
reene44444
Reene

Posted on November 29, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related