You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
uuWAF/geo-ip-firewall/readme.txt

22 lines
1.1 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

地理位置ip防火墙 - Geo ip firewall
简介:
利用系统底层按地理位置对国家或地区的ip地址进行高性能黑白名单访问控制支持x86和arm版Linux服务器。
使用:
Usage: gif <option> [country code]
Options:
-b <country code> Blacklist mode,deny IPs from the region you specified.Ex:gif -b us,jp
-w <country code> Whitelist mode,only allow IPs from the region you specified.Ex:gif -w cn,hk,mo,tw
-c Clear the geo ip firewall rules
-u Update myself and ip database
-h, --help Show this help message and exit
快速入门:
1、将gif和cidr.txt上传到指定服务器并赋予gif可执行权限chmod +x gif
2、使用黑名单模式拦截指定地域ip访问服务器如拦截美国、日本ip可以使用命令./gif -b us,jp
3、使用白名单模式只允许指定地域ip可以访问服务器如只允许中国ip访问可以使用命令./gif -w cn,hk,mo,tw
4、可以通过修改cidr.txt来自定义区域ip段格式区域代号 IP段
5、清除所有规则执行命令./gif -c
6、软件和ip库更新执行命令./gif -u