Spam afkomstig van interne IP-adressen zoals 172.17.0.1?

Short story: I recently had a massive Spam on my discourse installation after to change a text template for the “email confirmation” that seeemed to be wrong (from an old install?) that the url had something like url/authorize_email/ , In the end I needed to apply a full forum recovery 5 days older…

Now I’m watching the logs to see if there’s more spambot attacks, but I have noticed something strange… most of the spambots seems to come from a local IP:

So I’m not sure if I have something wrong in my installation

Like, does this 172.16.0… setting is correct?

Je gebruikt een reverse proxy (iets als nginx-proxy, wellicht).
Je moet iets als dit toevoegen aan je app.yml

after_bundle_exec:
  - replace:
    filename: /etc/nginx/conf.d/discourse.conf
    from: "types {"
    to: |
      set_real_ip_from 172.16.0.0/12;
      set_real_ip_from 10.0.0.0/8;
      real_ip_recursive on;
      real_ip_header X-Forwarded-For;
      types {
4 likes

Zoals we kunnen zien in het eerste screenshot, lijkt het erop dat slechts enkele (lijkt alleen van spambots)

Het lijkt erop dat ik geen reverse proxy gebruik, Discourse wordt rechtstreeks vanuit een Docker-instantie geleverd.

Sorry. Once I saw the 172.17.x.x addresses I assumed that you had a reverse proxy.

So this is a standard install?

If you’ve got a single host and no load balancer/reverse proxy, then I don’t know how anyone would have such an IP address. Maybe something else is somehow forwarding traffic? Those are private addresses, so it would appear that they are coming from your local network. That suggests that the spam bot is living on your network. (Guide to Private IP Address Classes and Ranges - Ipstack)

If you don’t have legitimate users (e.g., people on your LAN) accessing Discourse from that IP range, you’re safe to block it. I’d contact someone who runs your network and let them know that these attacks are coming from those internal addresses..

2 likes

Dat is een Docker IP-adres, toch?

1 like

That’s where I’ve seen it, but I think there are other uses for that range.

Or maybe the spam bot is a docker container on that machine. :person_shrugging:

2 likes

Nou, ik weet niets en voor mij is de docker-wereld één groot mysterie, maar ik vroeg me af of het mogelijk is om via SSH of iets dergelijks het IP-adres van een container te krijgen?

Yes, I did it many years ago but I recall to be this one. Basically: a dedicated small host machine on vultr (like those dropplets on DO) for only this purpose, installed on docker, the rest of the host/vps is not used for anything else.

Yeah thats what im thinking, some wrong configuration or, since seems like happening from spambots, something strange happening around

not other dockers on that machine

Heb je je besturingssysteem in al die jaren niet bijgewerkt? Zou de hostmachine gehackt kunnen zijn? Die IP-adressen lijken van dezelfde machine te komen.

I plan to do a reinstall in 2-3 months

it doesn’t looks like but, this can be hard to know, on the other side the spambots are not massive (but it was massive a few days ago, for some reason I got massive spam 2 hours after changing the confirmation email url link from “authorize_email” to “confirm-new-email” which seemed to be an old template contents, but in the restored backup now I still have the old way in order to avoid another attack)

The strange thing is that this email template seems to be duplicated in my settings, so I created another post topic for this issue:

Heb je genoeg ontdekt om je probleem op te lossen? Kunnen we dit onderwerp sluiten?

Nee, ik wacht nog steeds op antwoord waarom ik zoveel gedupliceerde “e-mailsjablonen” met verkeerde inhoud heb (die lijken te zijn overgenomen van oudere versies) en waarom ik ze niet kan verwijderen, zoals vermeld in het vorige bericht.

Het is onwaarschijnlijk dat de e-mailsjablonen de oorzaak zijn van het probleem dat u hier beschrijft. Het lijkt mij gerelateerd aan uw server, en een herinstallatie op een schone installatie zal het voor u oplossen.

Er lijkt niet veel meer te zijn dat gedaan kan worden om u hier te helpen, dus ik ga dit onderwerp sluiten. Ik heb ook gereageerd op uw vraag over de e-mailsjablonen. Als u een nieuw probleem ondervindt, start dan een nieuw onderwerp.

1 like