Related Posts
How to ban/unban ips in linux
In case you’re not an iptables guru, you might want to create a couple scripts and put em somewhere on your $PATH. I’ve created two scripts called ban_ip and unban_ip. Create a file called ban_ip touch ban_ip chmod +x ban_ip Edit it and copy the following code inside: #!/bin/bash sudo iptables -A INPUT -s $1 […]
[Python] ip2num / num2ip – Store an IP string as a 4 byte int.
This is probably everywhere, maybe python also comes with it, but I wanted to have my own implementation, and I’ll leave it here for future reference. Basically, sometimes you don’t want to store IPs in Strings cause they take too much space, instead you want to be a good programmer and store them as 4 […]