this post was submitted on 14 Apr 2025
36 points (95.0% liked)

Selfhosted

45876 readers
366 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

Afternoon y’all, apologies if this is brief writing this in a rush expect an edit/update.

My question is in regard to port forwarding & web hosting, I’ve forwarded port 80, 8080 & 443 from my router and my reverse proxy (traefik) is able to receive the necessary SSL/TLS certificates however, my domain is only accessible locally or via WireGuard tunnels and not the World Wide Web (which is good!) however, I can’t seem to figure out what’s preventing it from being accessible to the WWW.

My registrar is cloudflare so i figured changing my DNS or at least pushing some queries to my cloudflare nameservers would at least do something but have had no luck. For the most part I’ve been using Quad9 behind PiHole for DNS, tried using Unbound however it was a complete mess to setup.

Must end this post here - will update with more info ASAP!

top 10 comments
sorted by: hot top controversial new old
[–] [email protected] 20 points 1 day ago (1 children)

If you’re behind a CG NAT (carrier grade NAT), you’ll be doubly in trouble as it will be essentially impossible to get a forwarded port since your “IP” is essentially a LAN address within your ISP’s CG NAT, if that makes sense.

[–] [email protected] 2 points 1 day ago

It does spell trouble, but you might be able to ask your ISP to give you a public IP in that case.

[–] [email protected] 11 points 1 day ago (1 children)

Many ISPs block some traffic on those ports for residential customers in order to force you to use a much more costly business account to be able to host your own website.

[–] [email protected] 3 points 1 day ago

This is a good point. I know there are a handful that my ISP blocks right off the bat. For me it's 25,135,137, 138, 139, 445, 6666, 6667.

[–] [email protected] 1 points 1 day ago

why do you forward the port of the webui?

[–] [email protected] 8 points 1 day ago

If you're already using cloudflare, I'd recommend a cloudflare tunnel to your reverse proxy.

As was said, many ISPs will block port 80/443, but they won't be seeing it that way with a tunnel. You'll also get some cloudflare protections in front of your services.

[–] [email protected] 5 points 1 day ago* (last edited 1 day ago)

There's not really enough to give an conclusive answer from "it's not reachable". All I can do is tell you what I'd probably do to try to troubleshoot further.

My first steps in troubleshooting connectivity would probably be something like this:

  • Fire up something on the HTTP server (I'm assuming it's running Linux) like sudo tcpdump port 80. That should let you see any packets that are reaching the HTTP server.

  • From a Linux machine on an outside network


a tethered cell phone might make a reasonable machine, if you don't have another machine you control out there somewhere in the ether


running something like mtr --tcp -P 80 <hostname>. That'll tell you, at an IP-hop-by-IP-hop level, whether there's anything obstructing reaching the machine. Could be that your ISP blocks 80 inbound, for example.

  • So the next step is probably to see whether you can get regular ol' HTTP through. Also from an outside network, running curl --verbose http://<hostname>/. That'll let you see what's happening at the HTTP level.

I'm guessing that you're probably going to have something along here break. It could be that the packets are being blackholed at a hop prior reaching your router, in which case your ISP may be firewalling inbound on that port. It may be that they're reaching your router, but that your router is trying to forward to the wrong machine. It may be that you have some kind of firewall on the HTTP server that's blocking connections that aren't coming locally or from the WireGuard side. But at least it'll probably give you a better idea as to how far it's getting.

Once you've got that up and running, can look at HTTPS:

  • If this is working, if you want to test the TLS certificate handshaking, see if there are any issues, again, from an outside network: openssl s_client -connect <hostname>:443 -prexit. That'll let you see the TLS handshake and any issues that happen during it.

  • Also from an outside network, running curl --verbose https://<hostname>/. That'll let you see what's happening at the HTTPS level.

EDIT: Oh, yeah, and someone else pointing out confirming that the DNS resolution is what you expect is probably also a good first step. host <hostname> from an outside network.

[–] [email protected] 4 points 1 day ago* (last edited 1 day ago)

See to what IP your domain points, and if that's really the external IP of your router. Might also help to put in your IP address into the webbrowser instead of the domain, to see if port 80 / 443 really go somewhere. Another possibility, do a portscan from the internet.

Btw, how do you access Wireguard? I mean that's also somehow able to access your network from outside...

[–] [email protected] 0 points 1 day ago

How did you get the certs? Was it though a DNS challenge or web server on port 80?

[–] [email protected] 0 points 1 day ago

my router and my reverse proxy (traefik) is able to receive the necessary SSL/TLS certificates however

From something like LetsEncrypt?
As an HTTP-01 Challenge? Not an DNS-01 challenge?
Http challenge means that port 80 is accessible from the public internet (because that's how LE can confirm it can reach your server via the public DNS records, proof of server ownership).
DNS-01 is about proof of DNS record ownership, and doesn't prove public internet access.

Also, what are you self hosting?
Does it really need to be publicly accessible? Or just accessible by you and people you trust?