Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit requests to a country/geoIP region #2720

Closed
3 tasks done
sigaloid opened this issue Feb 22, 2021 · 1 comment
Closed
3 tasks done

Limit requests to a country/geoIP region #2720

sigaloid opened this issue Feb 22, 2021 · 1 comment
Labels
duplicate Duplicate or merged issues.

Comments

@sigaloid
Copy link

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

Problem Description

Chinese DNS scanners are flooding my VPS yet are below the 20/s limit.

Proposed Solution

Limit to not just an IP, but to a country in general. It seems that the American scanners are tender with my poor VPS and resolve one domain. Some of them are even colleges seemingly doing analysis. But the other countries seem to spam requests significantly more.
Another solution would be to limit by hostname. For example, the client name for my home currently is pool-(my IP).(area of my state).fios.verizon.net or myvzw.com if I'm on my phone. This seems like a faster solution than implementing IP geolocation (just block if hostname doesn't contain my hostname) and has the benefit of geoblocking as well, unless someone lives in the same area of my state and has verizon fios. Not sure how other ISP's implement hostnames though. This was discussed in #835 however.

Alternatives Considered

Limiting to my home IP, but this failed as soon as my router got a new IP. I also tried disabling DNS and only allowing HTTPS, but my router doesn't support DoH natively so DNS was borked after. IPV4's can be quickly scanned but my domain + custom port + /dns-query will probably take a lot longer to be found randomly.

Additional Information

A local IP range db would be preferable even if it had to be manually uploaded, as opposed to an API that gets pinged on each IP.
I see this is written in go so maybe this will help: https://github.com/oschwald/geoip2-golang

@sigaloid
Copy link
Author

#1032 😞

@ameshkov ameshkov added the duplicate Duplicate or merged issues. label Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Duplicate or merged issues.
Projects
None yet
Development

No branches or pull requests

2 participants