Now that nginx installed through the distribution version may have integrated the geoip module, the first step is not needed. The distribution may also have packaged the GeoIP database, so you don't need to create it yourself. You still have to read the instructions in the release version for details.
Based on iptables, but first you need to know the IP range
Program level control, get the access IP and then query the IP library. The specific method is quite simple, you can look up the information by yourself.
If you find it troublesome to block IPs, why not think differently. Using Amou Cloud’s intelligent cloud resolution, domain name resolution is not provided for certain countries or regions.
The first step is to introduce a judgment function module. This function module compares with the latest IP library. Once the Russian and American IPs are found, it will jump to other websites or display a fake 404 page. Perform normal entry when it is not the above IP.
http://www.vpsee.com/2011/03/...
Now that nginx installed through the distribution version may have integrated the geoip module, the first step is not needed. The distribution may also have packaged the GeoIP database, so you don't need to create it yourself. You still have to read the instructions in the release version for details.
Two ideas:
Based on iptables, but first you need to know the IP range
Program level control, get the access IP and then query the IP library.
The specific method is quite simple, you can look up the information by yourself.
If you find it troublesome to block IPs, why not think differently.
Using Amou Cloud’s intelligent cloud resolution, domain name resolution is not provided for certain countries or regions.
The first step is to introduce a judgment function module. This function module compares with the latest IP library. Once the Russian and American IPs are found, it will jump to other websites or display a fake 404 page. Perform normal entry when it is not the above IP.