How to access a local service over the internet using bore

mfat

Mehdi mFat

Posted on May 30, 2023

How to access a local service over the internet using bore

Bore is a modern, simple TCP tunnel written in Rust that exposes local ports to a remote server, bypassing standard NAT connection firewalls.

The advantage of Bore over some popular services such as ngrok is that it can be hosted on your own server. The CLI is also very straightforward and intuitive.

Installing Bore is very easy:

cargo install bore-cli

# On your local machine
bore local 8000 --to bore.pub
Enter fullscreen mode Exit fullscreen mode

This command gives you a public URL that points to your local port 8000. No need for opening ports on your router or using dynamic DNS!

Instead of using bore servers you can use your own VPS to route traffic to your home.

Self-hosting bore is as simple as installing it on your server and running:

bore server
Enter fullscreen mode Exit fullscreen mode

Now if my server's ip address is 2.2.2.2 this is what I need to run on my home computer to access a service running on port 9981 of my home PC through my VPS:

bore local 9981 --to 2.2.2.2
Enter fullscreen mode Exit fullscreen mode

Bore server assigns a random port to this tunnel. Now I can access my local service running on port 9981 of my home PC using 2.2.2.2:PORT

💖 💪 🙅 🚩
mfat
Mehdi mFat

Posted on May 30, 2023

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

Sign up to receive the latest update from our blog.

Related