Expose your local services like a pro

//DivByZero//
3 min readDec 8, 2024

--

Have you ever wanted to expose your HTTP server, VNC, or even your RDP to the internet? You might think that a static IP address from your ISP is necessary, but you can use Cloudflare’s Zero Trust to achieve this instead.
First, point a domain to your Cloudflare account. Then, navigate to the Zero Trust section from the left menu.

Then navigate to Network > Tunnels and create a new tunnel.

Select Cloudflared tunnel type and choose a name for your tunnel.
now based on your Host OS download and install Cloudflared service :

and wait until you see your tunnel connector in this section :

now you can expose all of your local host ports using your tunnel settings:

Now you can expose your localhost ports and all network ports accessible by your host machine to the internet. For example, if you have a Plex server running on http://10.20.30.40, you can use 10.20.30.40:port as the URL to redirect traffic from your subdomain to your host.

In this way, you can expose services like your IP camera, DVR, file server, media server, and many more to the internet. However, don’t forget to customize the security settings based on your needs. For instance, if you are exposing your IP camera or DVR to the internet, ensure you create an Application in the Access section for your service or service group and associate the appropriate policies with that application.

For example, I created an application for my ESXi server and attached a policy with the following rules:

requires emails ending in : mydomain.tld
requires authentication method : otp

Now, only people with an email address from my domain and who have enabled OTP can access my ESXi server.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

//DivByZero//
//DivByZero//

Written by //DivByZero//

Programmer / Security Researcher

No responses yet

Write a response