Skip to content

Instantly share code, notes, and snippets.

@dakhnod
Last active September 15, 2025 14:58
Show Gist options
  • Select an option

  • Save dakhnod/906088f85e0b275794ea7db97a8c9b14 to your computer and use it in GitHub Desktop.

Select an option

Save dakhnod/906088f85e0b275794ea7db97a8c9b14 to your computer and use it in GitHub Desktop.

Scammer IP reporter

I creates this little configuration in order to get notified whenever someone visits a particular URL I created.

More specifically, this configuration requires the following setup:

  1. Some program that sends a message to you, passed as parameters. In my case, an invocation could look like /root/bin/msg this is a message
  2. Apache2 running
  3. The ability to create and activate an apache2 configuration

The main purpose of this gist is to show to the world that apache can write log data not only to files, but also pipe it directly to scripts, in my case xargs.

The line format defined in line 13 is described here (clicking this link does not trigger a message, don't worry).

Have fun!

<VirtualHost *:443>
ServerName i-steer-scammers-here.com
<Location "/">
RewriteEngine on
RewriteRule "/.*" "https://google.com/"
AllowOverride None
allow from All
</Location>
CustomLog "|/usr/bin/xargs -L1 /root/bin/msg" "%h %U %{User-agent}i"
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/i-steer-scammers-here.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/i-steer-scammers-here.com/privkey.pem
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment