Generation

generate functionSun, 14 May 2023

funcion baneo ip iptables ban.txt y desbaneo ip iptables unban.txt

def ban_ip(ip): os.system("iptables -A INPUT -s %s -j DROP" % ip) os.system("service iptables save") os.system("service iptables restart") def unban_ip(ip): os.system("iptables -D INPUT -s %s -j DROP" % ip) os.system("service iptables save") os.system("service iptables restart")

Questions about programming?Chat with your personal AI assistant