import a blocklist into iptables

sometimes, we need only to import a custom ip liste to iptables. here is the solution: create a text file contains all the ip to be blocked (one per line), ex: blocklist.txt create a shell script:


get parameters in shell

there is a common code that we can use to get all the parameters:

shift¬†is a shell builtin that operates on the positional parameters. Each time you invoke¬†shift, it “shifts” all the positional parameters down by one like in… Continue Reading