Generate Country Blocking Rules for IPTABLES onlineblocker.php V1.5beta
Select the interface to protect along with all the countries you would like to block and then click on "Display In Browser". Wait for your browser to finish loading the entire set of rules. Then copy and paste the results to a text file. Name it something like "badlist.txt". Copy the file to the computer that will be doing the blocking and issue the following command from a shell prompt:
iptables-restore -n < badlist.txt
If iptables issues an error, you are probably using Windows to cut and paste and iptables does not like to see the MS-DOS CR/LF line endings.
From a Linux shell prompt, you can fix this with the tr command:
tr -d '\r' < badlist.txt > badlist2.txt
Repeat the iptables command using the badlist2.txt file.
Click your browser's "Back" button to return to this screen.