this post was submitted on 11 Jan 2026
174 points (100.0% liked)

Selfhosted

54413 readers
847 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.

  7. No low-effort posts. This is subjective and will largely be determined by the community member reports.

Resources:

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

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I generated 16 character (upper/lower) subdomain and set up a virtual host for it in Apache, and within an hour was seeing vulnerability scans.

How are folks digging this up? What's the strategy to avoid this?

I am serving it all with a single wildcard SSL cert, if that's relevant.

Thanks

Edit:

  • I am using a single wildcard cert, with no subdomains attached/embedded/however those work
  • I don’t have any subdomains registered with DNS.
  • I attempted dig axfr example.com @ns1.example.com returned zone transfer DENIED

Edit 2: I'm left wondering, is there an apache endpoint that returns all configured virtual hosts?

Edit 3: I'm going to go through this hardening guide and try against with a new random subdomain https://www.tecmint.com/apache-security-tips/

(page 2) 27 comments
sorted by: hot top controversial new old
[–] ambitiousslab@lemmy.ml 9 points 20 hours ago (1 children)

I believe that some DNS servers are configured to allow zone transfers without any kind of authentication. While properly configured servers will whitelist the IPs of secondaries they trust, for those that don't, hackers can simply request a zone transfer and get all subdomains at once.

load more comments (1 replies)
[–] emergencycall@fedia.io 5 points 18 hours ago

You need better logging. Try doing a packet capture with tcpdump then decrypt the HTTPS traffic. Because what you've described so far, especially before the edit makes no sense.

If you don't have a DNS record pointing the subdomain to the IP address of the server, it shouldn't be possible to resolve the IP for random Internet users. If this VHOST only exists in your Apache config file and nowhere else, it is private.

[–] frongt@lemmy.zip 6 points 20 hours ago (1 children)

Scans from where? Is it exposed to the internet? What does the scan traffic look like?

load more comments (1 replies)
[–] a@852260996.91268476.xyz 6 points 20 hours ago (3 children)

@BonkTheAnnoyed@lemmy.blahaj.zone are you generating certificates for each of the random subdomains?

[–] turkalino@sh.itjust.works 7 points 19 hours ago

Fitting that someone from an instance on a random subdomain commented on this lol

[–] a@852260996.91268476.xyz 2 points 19 hours ago (1 children)
[–] BonkTheAnnoyed@lemmy.blahaj.zone 3 points 19 hours ago

As expected, it doesn't show up. I had a couple of other subdomains configured before I switched to wildcard, but nothing matches the random one

[–] BonkTheAnnoyed@lemmy.blahaj.zone 2 points 20 hours ago (2 children)

I don't think so? I have a letsencrypt wildcard cert, and reference that in the relevant .conf

[–] a@852260996.91268476.xyz 2 points 20 hours ago (1 children)

@BonkTheAnnoyed@lemmy.blahaj.zone mmm wait your logs show the new domains being targeted specifically?

[–] BonkTheAnnoyed@lemmy.blahaj.zone 3 points 20 hours ago

Yep. They show up in the other_hosts...log

[–] FukOui@lemmy.zip 3 points 18 hours ago* (last edited 18 hours ago)

Following this thread!

Stupid question, but are you somehow publicly exposing your vhost config (or a bak file of it)? Or do you see logs of someone bruteforcing the subdomain?

[–] Morphit@feddit.uk 4 points 20 hours ago (1 children)

Have you sent the URL across any messaging services? Lots of them look up links you share to see if it's malware (and maybe also to shovel into their AI). Even email services do this.

[–] BonkTheAnnoyed@lemmy.blahaj.zone 5 points 20 hours ago

Nope, but that's a good suggestion. I set this one up brand new for the experiment.

[–] savvywolf@pawb.social 3 points 18 hours ago (1 children)

If you do a port scan on your box, what services are running? Maybe something like email or diagnostics is exposed to the internet and announcing subdomains?

[–] BonkTheAnnoyed@lemmy.blahaj.zone 4 points 18 hours ago

It's literally just a VM hosting Apache and nothing else.

[–] Bombastic@sopuli.xyz 3 points 19 hours ago (1 children)

Inb4 some lucky dude just ran sublist3r or wfuzz on your subdomain and got a hit

[–] BonkTheAnnoyed@lemmy.blahaj.zone 3 points 18 hours ago (1 children)

I mean, it could be... I'll try it with a 128 char base 52 name and see what happens

load more comments (1 replies)
[–] BootLoop@sh.itjust.works 2 points 20 hours ago (1 children)

Did you generate a DNS A record for the subdomain?

[–] waggz@programming.dev 1 points 19 hours ago (1 children)

if there's no dns entry do you mean you are getting scans to your ip with these random subdomain headers? so someone would need both pieces of information? curious

[–] BonkTheAnnoyed@lemmy.blahaj.zone 1 points 19 hours ago

Yes, exactly. Super weird, shouldn't happen. I wonder if I have a compromised box somewhere...

load more comments
view more: ‹ prev next ›