# RedisPushIptables **Repository Path**: mybug/RedisPushIptables ## Basic Information - **Project Name**: RedisPushIptables - **Description**: 该模块可以通过redis来操作iptables的INPUT表规则的增加和删除,可以用来动态调用防火墙,比如用来防御攻击 - **Primary Language**: Unknown - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2018-12-17 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # RedisPushIptables This README is just a fast quick start document. ` Redis must be run by root users, because iptables needs to submit the kernel.` In order to test the module you are developing, you can load the module using the following redis.conf configuration directive: ``` loadmodule /path/to/iptablespush.so ``` It is also possible to load a module at runtime using the following command: ``` MODULE LOAD /path/to/iptablespush.so ``` In order to list all loaded modules, use: ``` MODULE LIST ``` Finally, you can unload (and later reload if you wish) a module using the following command: ``` MODULE unload iptables-input-filter ``` ### Core * [accept.insert](https://github.com/limithit/RedisPushIptables/blob/master/README.md) - Filter table INPUT ADD ACCEPT * [accept.delete](https://github.com/limithit/RedisPushIptables/blob/master/README.md) - Filter table INPUT DEL ACCEPT * [drop.insert](https://github.com/limithit/RedisPushIptables/blob/master/README.md) - Filter table INPUT ADD DROP * [drop.delete](https://github.com/limithit/RedisPushIptables/blob/master/README.md) - Filter table INPUT DEL DROP ``` 127.0.0.1:6379>accept.insert 192.168.188.8 (integer) 13 127.0.0.1:6379>accept.delete 192.168.188.8 (integer) 13 127.0.0.1:6379>drop.delete 192.168.188.8 (integer) 13 127.0.0.1:6379>drop.insert 192.168.188.8 (integer) 13 ``` ``` root@debian:~# iptables -L -n Chain INPUT (policy ACCEPT) target prot opt source destination DROP all -- 192.168.188.8 0.0.0.0/0 ACCEPT all -- 192.168.188.8 0.0.0.0/0 ``` Author Gandalf zhibu1991@gmail.com