- 論壇徽章:
- 0
|
關(guān)于iptables
恭喜你:)
其實(shí)geoip模塊也很好,他可以用CN、JP等來表示國家的IP地址,你自己不用知道到底哪個(gè)國家的IP都是什么,GEOIP需要一個(gè)地址庫
iptables geoip match
Author: Samuel Jean <sjean@cookinglinux.org>;; Nicolas Bouliane <nib@cookinglinux.org>;
Status: Testing
This patch makes possible to match a packet
by its source or destination country.
GeoIP options:
[!] --src-cc, --source-country country[,country,country,...]
Match packet coming from (one of)
the specified country(ies)
[!] --dst-cc, --destination-country country[,country,country,...]
Match packet going to (one of)
the specified country(ies)
NOTE: The country is inputed by its ISO3166 code.
The only extra files you need is a binary db (geoipdb.bin) & its index file (geoipdb.idx).
Both files are generated from a countries & subnets database with the csv2bin tool,
available at www.cookinglinux.org/geoip/. Both files MUST also be moved in /var/geoip/
as the shared library is statically looking for that pathname (ex.: /var/geoip/geoipdb.bin).
比如,你要限制日本人訪問你的服務(wù)器,那就非常方便了^_^ |
|