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:
Subdomain | You 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. |
Domain | Select the domain you want to connect the subdomain to. |
Phat | Usually remains empty. |
Service Type | Here we use “http”. Cloudflare takes care of the SSL encryption for you, you don’t have to do anything here. |
URL | The 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 …
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
Pingback: Set up RustDesk Relay Server | Docker | Encryption and zero tariff | Michael Klissner
Pingback: Cloudflare VPN simple and free of charge | Michael Klissner
Pingback: Secure Cloudflare WEB applications | Michael Klissner
Pingback: Cloudflare secure WordPress | Michael Klissner