146
submitted 3 years ago* (last edited 3 years ago) by jcal@lemmy.dbzer0.com to c/selfhosted@lemmy.world

I put up a vps with nginx and the logs show dodgy requests within minutes, how do you guys deal with these?

Edit: Thanks for the tips everyone!

you are viewing a single comment's thread
view the rest of the comments
[-] Dr_Toofing@programming.dev 7 points 3 years ago

These requests are probably made by search/indexing bots. My personal server gets a quite a lot of these, but they rarely use any bandwidth.
The easiest choice (probably disliked by more savvy users) is to just enable cloudflare on your server. It won't block the requests, but will stop anything malicious.
With how advanced modern scraping techniques are there is so much you can do. I am not an expert, so take what I say with a grain of salt.

[-] waspentalive@lemmy.one 3 points 3 years ago

The ligitimate web spiders (for example the crawler used by Google to map the web for search) should pay attention to robots.txt. I think though that that is only valid for web-based services.

[-] rusty@lemmy.world 3 points 3 years ago

Fail2Ban is great and all, but Cloudflare provides such an amazing layer of protection with so little effort that it's probably the best choice for most people.

You press a few buttons and have a CDN, bot attack protection, DDOS protection, captcha for weird connections, email forwarding, static website hosting... It's suspicious just how much stuff you get for free tbh.

[-] AES@lemmy.ronsmans.eu 9 points 3 years ago

And you only need to give them your unencrypted data...

[-] GlitzyArmrest@lemmy.world 2 points 3 years ago* (last edited 3 years ago)

To be fair, you can configure Cloudflare to use your own certs.

[-] sifrmoja@mastodon.social 1 points 3 years ago

@GlitzyArmrest Including for origins? If not, the point of CloudFlare is gone.

[-] ItsGhost@sh.itjust.works 3 points 3 years ago

You can use a custom origin certificate, but that’s irrelevant when CloudFlare still re-encrypt everything to analyse the request in more detail. It does leave me torn when using it, I don’t use it on anything where sensitive plain text is flying around, especially authentication data (which is annoying when that’s the most valuable place to have the protection), but I do have it on my matrix homeserver as anything remotely important is E2EE anyway so there’s little they can gain, and with the amount of requests it gets some level of mitigation is desirable

this post was submitted on 08 Jul 2023
146 points (100.0% liked)

Selfhosted

60910 readers
798 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