this post was submitted on 22 Oct 2026
95 points (98.0% liked)

Selfhosted

63469 readers
619 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:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

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

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

PHP, TLS, etc.. We appear to be facing a tsunami of vulnerabilities being discovered in record time. Further, the window to act on these vulnerabilities has basically closed to zero; hackers' tools now automatically fold the very latest vulnerabilities into their botnets within minutes/hours of discovery. I have always been extremely reluctant to expose any of my services - even with the latest and greatest security tools. My choice to stay totally within the confines of tailscale seems vindicated given this week's news. How are you all taking this?

https://pwn.watch/

you are viewing a single comment's thread
view the rest of the comments
[–] tigerhawkvok@startrek.website 10 points 1 week ago (2 children)

I still do, but I don't host anything on 80 or 443. I use a random large port number, and I've seen zero illegitimate requests in 20 months.

IF there's an active exploit AND it affects a container AND you have a container escape route AND you pick my domain you'd need to statistically try thousands of times to even hit the single open NAT port.

[–] lemmyvore@feddit.nl 13 points 1 week ago (2 children)

I also practice domain/IP obfuscation in addition to high port:

  • TLS certs are wildcard certs, so bots can't get my subdomains from transparency logs.
  • My DDNS IP is on a subdomain (random string) not on the base domain.
  • My public services are also on random subdomains, CNAME'd individually to the IP subdomain.
  • There is no wildcard CNAME that the bots can query to get the IP.

This eliminates scanning almost completely. They can't find an IP to go with my base domain, first of all. And even if a bot is scanning the IPv4 address space and all the ports and it finds the reverse proxy it can't get past it without knowing a FQDN. I still get the occasional hit from such bots but it's very rare.

Also, all my public services are secured with mTLS (preferably) or at the very least a long key in a custom HTTP header (both enforced at the proxy).

[–] qgadrian@lemmy.world 4 points 1 week ago

Thank you for sharing this, vey insightful

[–] Blip6338@lemmy.ca 2 points 1 week ago (1 children)

You should also use a default self-signed cert for something generic like "localhost" on your reverse proxy so random IP scan don't see any domain when they hit your IP, but legitimate queries coming through the domain name still see the right cert.

[–] lemmyvore@feddit.nl 2 points 1 week ago* (last edited 1 week ago)

In my case I have defined a fallback in Caddy so any request that doesn't match one of the explicitly handled domains will be an error.

I use a route {} block with handle {} blocks inside it, and the last handle has an error directive in it.

https://*.example.com {
  route {
    @foo host "foo.example.com"
    handle @foo {
      reverse_proxy http://whatever:12334/
    }
    ... more proxy hosts ...
    handle {
      error 400
    }
  }
}

The route block is essential here because handlers inside a route block are processed strictly in the order they are defined. Outside route blocks that is not true, caddy will try to optimize and can execute directives in any order it sees fit.

[–] emax_gomax@lemmy.world 2 points 1 week ago* (last edited 1 week ago) (2 children)

How do u use a port other than 443 for https. AFAICT all web browsers are pinned to it (for ssl checks I think) and I could never get an actual https connection through an alt port. Maybe I didn't understand it properly.

Edit: I think actually it's the auto cert provisioning workflow. The CA I'm signing against hardcodes port 443 :/

Edit, edit: this was the issue https://caddy.community/t/non-standard-ports-for-https/6916/4

[–] 123@programming.dev 3 points 1 week ago

The API based challenges are better since you don't even need to make the site externally accessible to get certificates.

Let's encrypt and similar services support those and for popular registrars (aws, porkbun, etc,) here are existing plugins for caddy, swag (nginx proxy with built in cert support) and a few others.

[–] tigerhawkvok@startrek.website 1 points 1 week ago (1 children)

Yeah, if you use something like Nginx Proxy Manager you can't use the automatic flow, you need to use the token based challenge.

[–] emax_gomax@lemmy.world 2 points 1 week ago* (last edited 1 week ago) (1 children)

Boo, no idea why acme forces these specific ports. Swapping them seems like a pretty basic obfuscation technique that could help a lot to secure any services.

Edit: actually seems like this might be possible with the dns challenge type. I'm gonna test this out later https://github.com/caddy-dns/porkbun

[–] tigerhawkvok@startrek.website 2 points 1 week ago (1 children)

It is, that's what I had meant by token based challenge lol. You need a DNS API key for your manager to do it directly, it flags a DNS record with a token to validate ownership. I was just calling it out from memory, sorry!

[–] emax_gomax@lemmy.world 2 points 1 week ago* (last edited 1 week ago)

Much appreciated stranger. Hopefully now I can stop exposing the two most attacked ports in existence from my LAN XD.