uuWAF/geo-ip-firewall/readme.txt

22 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-08-22 02:44:08 +00:00
地理位置ip防火墙 - Geo ip firewall
2024-08-22 01:29:55 +00:00
简介:
2024-08-22 02:49:06 +00:00
利用系统底层按地理位置对国家或地区的ip地址进行高性能黑白名单访问控制支持x86和arm版Linux服务器。
2024-08-22 01:29:55 +00:00
使用:
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
2024-08-22 02:49:06 +00:00
2、使用黑名单模式拦截指定地域ip访问服务器如拦截美国、日本ip可以使用命令./gif -b us,jp
2024-08-22 01:29:55 +00:00
3、使用白名单模式只允许指定地域ip可以访问服务器如只允许中国ip访问可以使用命令./gif -w cn,hk,mo,tw
2024-08-22 02:49:06 +00:00
4、可以通过修改cidr.txt来自定义区域ip段格式区域代号 IP段
2024-08-22 01:29:55 +00:00
5、清除所有规则执行命令./gif -c
6、软件和ip库更新执行命令./gif -u