DEV Community

Cover image for Set up a home server and access it from everywhere
Yongchang He
Yongchang He

Posted on • Updated on

Set up a home server and access it from everywhere

OS used as a server:

  • Ubuntu 20.04

Tools will be used:

Getting Started

Install Zerotier

Sign up an account on zerotier and create a network. It will provide us with a network ID.

Then install the Zerotier on Linux:

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

Output:

......

*** Success! You are ZeroTier address [ eaXXXXXaXXe ].

Start and enable the zerotier service:

sudo systemctl start zerotier-one.service
sudo systemctl enable zerotier-one.service
Enter fullscreen mode Exit fullscreen mode

Join the network created previously using the network ID:

sudo zerotier-cli join YOUR_NETWORK_ID
Enter fullscreen mode Exit fullscreen mode

Output:

200 join OK

Check if we have joined the network:

sudo zerotier-cli listnetworks
Enter fullscreen mode Exit fullscreen mode

200 listnetworks <nwid> <name> <mac> <status> <type> <dev> <ZT assigned ips>

200 listnetworks afXXXXXXXXXX88c ......

Extra configuration for inbound and outbound rules, sudo might required:

iptables -I FORWARD -i ztc25p4azo -j ACCEPT
iptables -I FORWARD -o ztc25p4azo -j ACCEPT
iptables -t nat -I POSTROUTING -o ztc25p4azo -j MASQUERADE
Enter fullscreen mode Exit fullscreen mode

Install openssh-server:

Install ssh:

sudo apt install openssh-server
Enter fullscreen mode Exit fullscreen mode

Check the installation process:

sudo apt list --installed | grep openssh-server
Enter fullscreen mode Exit fullscreen mode

Output:

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

openssh-server/focal-updates,now 1:8.2p1-4ubuntu0.4 amd64 [installed]

Check ssh status:

sudo service ssh status
Enter fullscreen mode Exit fullscreen mode

Output:

● ssh.service - OpenBSD Secure Shell server

Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: e>

Active: active (running) since Fri 2022-04-15 17:57:43 CST; 43s ago

......

Connect to your Linux Server:

ssh username@YOUR.SERVER.IP.ADDRESS
Enter fullscreen mode Exit fullscreen mode

Replace your username and IP address.

Enjoy!

References
https://www.accessdatabasecloud.com/use-microsoft-access-database-online

Top comments (0)