diff --git a/GiteaBlocker/main.cpp b/GiteaBlocker/main.cpp index bb12293..254b8fd 100644 --- a/GiteaBlocker/main.cpp +++ b/GiteaBlocker/main.cpp @@ -68,6 +68,7 @@ int main(){ user.totalHits++; if(user.totalHits>tooFrequentAccess){ ipBanList.insert(ipAddr); + std::system(std::format("iptables -D INPUT -s {} -j DROP",ipAddr).c_str()); //In case the rule already existed, we are going to remove it first... No effect if it does not exist. std::system(std::format("iptables -I INPUT 1 -s {} -j DROP",ipAddr).c_str()); std::cout<