linux:geoiplookup
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux:geoiplookup [2018/03/04 05:06] – created kbadmin | linux:geoiplookup [2021/03/10 04:06] (current) – kbadmin | ||
---|---|---|---|
Line 9: | Line 9: | ||
</ | </ | ||
+ | Bisa digunakan untuk mendeteksi ip dari negara tertentu dan mengahpusnya dari file. Contoh : | ||
+ | < | ||
+ | while read ip; do | ||
+ | text=`geoiplookup $ip` | ||
+ | if echo $text | grep -q ' | ||
+ | sed -i "/ | ||
+ | echo "$ip removed" | ||
+ | fi | ||
+ | done < / | ||
+ | </ | ||
+ | ===== Update Geoip database dengan geoipupdate ===== | ||
+ | Untuk mengupdate database geoip cukup jalankan perintah | ||
+ | < | ||
+ | geoipupdate -v | ||
+ | </ | ||
+ | |||
+ | Apabila terjadi kegagalan silahkan mendaftar disini https:// | ||
+ | Kemudian buat keynya disini https:// | ||
+ | |||
+ | Setelah anda memiliki akses key, silahkan download file GeoIP.conf nya dan ubahlah konfigurasi GeoIP.conf di server anda. | ||
+ | |||
+ | < | ||
+ | nano / | ||
+ | </ | ||
+ | ubah dan isi dengan GeoIP.conf yang anda telah dapatkan. | ||
+ | |||
+ | Selanjutnya jalankan kembali geoipupdate |
Layanan
Harga Domain .COM | Harga Domain .ID | Shared Hosting | Email Hosting | MySQL Hosting |linux/geoiplookup.1520158018.txt.gz · Last modified: 2018/03/04 05:06 by kbadmin