Building My First Website Behind CGNAT
When I decided to create my first website, I imagined it would be a fairly straightforward process. Register a domain name, put together a few pages and publish them online. As it turned out, the journey taught me much more about networking, self-hosting and Linux than I had expected.
The project began after I repurposed an HP EliteDesk as a home server running Ubuntu Server. What started as a small experiment quickly grew into a self-hosting environment running several services using Docker. With the server up and running, I thought it would be a good opportunity to create my own website and document my amateur radio activities and technical projects.
After registering 2e0tiv.co.uk, I moved my DNS management to Cloudflare and began experimenting with different ways to publish the website. Initially I chose Publii as a static website generator and successfully created my first site. While it worked, I found myself spending more time trying to understand how the site structure and navigation worked than actually writing content.
The biggest challenge came when I attempted to make the website publicly accessible from my home connection. No matter what I tried, visitors on the internet could not reach the site. SSL certificates failed to issue, port forwarding appeared correct, and yet nothing worked.
After a lot of troubleshooting, I discovered that my internet provider uses CGNAT (Carrier Grade NAT). This meant that even though my router appeared to have internet access, inbound connections could not reach my home network in the traditional way. It was a frustrating discovery, but also an important lesson in how modern internet connections are often configured.
The solution turned out to be Cloudflare Tunnel. Rather than exposing my home network directly to the internet, the tunnel creates a secure outbound connection from my server to Cloudflare. This allowed my website to become publicly accessible without any port forwarding and completely bypassed the CGNAT issue.
With the hosting problem solved, I turned my attention back to the website itself. After experimenting with Publii, I decided to migrate to Ghost, which I found much more intuitive and flexible for the type of site I wanted to build. Ghost provides a cleaner writing experience and makes it easier to create pages, posts and navigation without wrestling with file structures and static site generation.
This website is now hosted on my HP EliteDesk home server running Ubuntu Server, managed with Docker, and published securely through Cloudflare Tunnel. Alongside the website, the server also hosts a number of other self-hosted services that I use for experimentation.
Thanks for stopping by.
73,
Stephen – 2E0TIV 📻🐧🌐