Solution:
Following is the correct command line:
iptables -A INPUT -m set ! --match-set geoblock src -j DROP
Explanation:
javier@equipo-javier:~$ sudo ipset create geoblock hash:net
javier@equipo-javier:~$ sudo iptables -A INPUT -m set --set '!geoblock' src -j DROP
--set option deprecated, please use --match-set
iptables v1.4.21: Set !geoblock doesn't exist.
Try `iptables -h' or 'iptables --help' for more information.
1st correction:
javier@equipo-javier:~$ sudo iptables -A INPUT -m set --match-set '!geoblock' src -j DROP
iptables v1.4.21: Set !geoblock doesn't exist.
Try `iptables -h' or 'iptables --help' for more information.
2nd correction:
javier@equipo-javier:~$ sudo iptables -A INPUT -m set ! --match-set geoblock src -j DROP
javier@equipo-javier:~$ sudo iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -m set ! --match-set geoblock src -j DROP
Now works