Submitted by wolke8888 on Mon, 01/20/2020 - 04:11
I would like to disable access to my server via IP. So if someone tries to access my server by its IP, they should be blocked (or rerouted to the URL.)
What I am trying to achieve is block all of the attacks that use my IP instead of an URL. No legit visitor does that and it allows attackers to avoid Cloudflare and any blocking rules.
I found this on the web but it doesn't look right, or does it?
ServerName 188.8.131.52 Redirect 403 / ErrorDocument 403 "No" DocumentRoot /dev/null/
Closed (works as designed)
Unfortunately, configurations such as that are a bit outside the scope of our support. That's not really a Virtualmin issue, and isn't something we'd be able to assist with here in the support tracker.
You're of course more than welcome to ask about that in the Forums! There's many wonderful folks there, and some may have tried a similar setup.