去掉r0的hook,增加IP屏蔽记录

This commit is contained in:
huoji
2023-11-17 04:06:33 +08:00
parent 49904f5cb5
commit 6bac06d28a
41 changed files with 270150 additions and 48 deletions

View File

@@ -121,6 +121,10 @@ bool check_ssh_brute_force_attack(struct iphdr *ip_header,
bool check_in_packet(struct iphdr *ip_header, struct sk_buff *skb) {
bool is_block = false;
do {
// 127.0.0.1
if (ip_header->saddr == 0 || ip_header->saddr == 0x0100007F) {
break;
}
if (check_is_blacklist_ip(ip_header->saddr)) {
is_block = true;
printk(KERN_ERR "Block ip address: %pI4\n", &ip_header->saddr);