DEV Community

Mehdi mFat
Mehdi mFat

Posted on

3

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

Heroku

Amplify your impact where it matters most — building exceptional apps.

Leave the infrastructure headaches to us, while you focus on pushing boundaries, realizing your vision, and making a lasting impression on your users.

Get Started

Top comments (0)

Hot sauce if you're wrong - web dev trivia for staff engineers

Hot sauce if you're wrong · web dev trivia for staff engineers (Chris vs Jeremy, Leet Heat S1.E4)

  • Shipping Fast: Test your knowledge of deployment strategies and techniques
  • Authentication: Prove you know your OAuth from your JWT
  • CSS: Demonstrate your styling expertise under pressure
  • Acronyms: Decode the alphabet soup of web development
  • Accessibility: Show your commitment to building for everyone

Contestants must answer rapid-fire questions across the full stack of modern web development. Get it right, earn points. Get it wrong? The spice level goes up!

Watch Video 🌶️🔥

👋 Kindness is contagious

If this article connected with you, consider tapping ❤️ or leaving a brief comment to share your thoughts!

Okay