You are currently viewing NAT? Deine WEB-Seite Hosten
NAT? Access to the home network, so it works again!

NAT? Host your WEB site

NAT? Host your WEB site despite NAT. Setting up a tunnel via Cloudflare is very easy. In the end, there are only two things you need to pay attention to.

  • The tunnel must work, be online
  • The configuration of SUB-Domain’s and “www”.

Tunnels setup

We log in to Cloudflare. On the left side we select “Zero Trust”.

At the first start you have to set up a payment method (credit card or PayPal). Cloudflare will not, as it stands now, collect any payments or charge the payment method. It is more like a smart KYC.

In the further process you go left on “Access” and select “tunnels”.

Now select “Create tunnel” on the right. Now enter a name for the tunnel and click “Save Tunnel”.

Now the configuration of the tunnel is done. For WINDOWS, Mac and Linux this is easy and needs no further explanation. The Docker round command is also easy to adopt. The sock is already included in the command line command.

When using docker-compose.yml, there is version 1 (Officially recommended) and version 2 (which works for me).

docker-compose.yml version 1

version: "3.2"

tunnel:
    container_name: cloudflared-tunnel
    image: cloudflare/cloudflared:latest
    restart: unless-stopped
    command: tunnel run
    environment:
      - TUNNEL_TOKEN=mytokengoeshere

docker-compose.yml Version 2

version: "3.2"

tunnel:
    image: cloudflare/cloudflared:latest
    container_name: cloudflared-tunnel
    command: 'tunnel run --token mytokengoshere'
    restart: unless-stopped

After your tunnel is online, we go to “Public hostname”.

Public hostname

Create a tunnel:

SubdomainYou can enter here e.g. “home” for Homeassistent or “myphp” for MyPhpAdmin.
The URL on the Internet would then be https://home.mydomain.de or https://myphp.mydomain.de.
For the accessibility under “www” you have to create this extra as a subdomain.
DomainSelect the domain you want to connect the subdomain to.
PhatUsually remains empty.
Service TypeHere we use “http”.
Cloudflare takes care of the SSL encryption for you, you don’t have to do anything here.
URLThe local IP address of your computer with port to which the data transfer should be forwarded.
E.G. 192.168.1.100:8080
Please note that port 80, in my experience, does not work at the moment.

Setting SSL/TLS Certificates

We go to the normal “Start Desktop” of Cloudflare and select our domain we want to edit.

Select “SSL/TLS” on the left. On this screen you will change the setting on the right to “Full”.

Then on the left select “Edge certificates” and turn on “Always use HTTPS”.

That’s it …

YouTube Tutorial

VPN access to your own network

This article explains how you can access your network at home or at work with Cloudflare via VPN.

Link to support / donation for the channel
PayPal Link
Bank transfer, Bitcoin and Lightning

#Cloudflare #Homenet #IPv4Tunnel #IPv6Tunnel #NAT #PortForwarding #Hosting #VPN

This Post Has 4 Comments

Leave a Reply