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.


SELECT INTERFACE TO BLOCK:
eth0  eth1  eth2     
All except above interface
newer kernels  older kernels 

SELECT THE COUNTRIES TO BLOCK:    
 
Afghanistan Albania Algeria
American Samoa Andorra Angola
Antigua and Barbuda Argentina Aruba
Bahrain Bangladesh Barbados
Belarus Belize Benin
Bolivia Bosnia and Herzegovina Botswana
Brazil Bulgaria Burundi
Cambodia Cameroon Cape Verde
Central African Republic Chile China
Colombia Congo Congo, The Democratic Republic of the
Costa Rica Cote D'Ivoire Croatia
Cuba Cyprus Czech Republic
Dominican Republic Ecuador Egypt
El Salvador Eritrea Estonia
Ethiopia Fiji France
French Guiana French Polynesia Gabon
Georgia Ghana Greece
Grenada Guatemala Honduras
Hong Kong Hungary India
Indonesia Iran, Islamic Republic of Iraq
Israel Italy Jamaica
Japan Jordan Kazakhstan
Kenya Korea, Democratic People's Republic of Korea, Republic of
Kuwait Kyrgyzstan Lao People's Democratic Republic
Latvia Lebanon Lesotho
Liberia Libyan Arab Jamahiriya Lithuania
Macau Macedonia Malawi
Malaysia Maldives Mali
Mauritania Mauritius Mexico
Moldova, Republic of Mongolia Montenegro
Morocco Mozambique Namibia
Nepal Netherlands New Caledonia
Nicaragua Niger Nigeria
Northern Mariana Islands Oman Pakistan
Palestinian Territory, Occupied Panama Papua New Guinea
Paraguay Peru Philippines
Poland Portugal Puerto Rico
Qatar Romania Russian Federation
Rwanda Saint Vincent and the Grenadines Samoa
Saudi Arabia Senegal Serbia
Singapore Slovakia Slovenia
South Africa Spain Sri Lanka
Sudan Syrian Arab Republic Taiwan
Tajikistan Tanzania, United Republic of Thailand
Togo Tonga Trinidad and Tobago
Tunisia Turkey Turks and Caicos Islands
Uganda Ukraine United Arab Emirates
Uruguay Uzbekistan Venezuela
Vietnam Wallis and Futuna Yemen
Zambia Zimbabwe Aland Islands
Anguilla Anonymous Proxy Antarctica
Armenia Asia/Pacific Region Australia
Austria Azerbaijan Bahamas
Belgium Bermuda Bhutan
Bouvet Island British Indian Ocean Territory Brunei Darussalam
Burkina Faso Canada Cayman Islands
Chad Comoros Cook Islands
Denmark Djibouti Dominica
Equatorial Guinea Europe Falkland Islands (Malvinas)
Faroe Islands Finland Gambia
Germany Gibraltar Greenland
Guadeloupe Guam Guernsey
Guinea Guinea-Bissau Guyana
Haiti Holy See (Vatican City State) Iceland
Ireland Isle of Man Jersey
Kiribati Liechtenstein Luxembourg
Madagascar Malta Marshall Islands
Martinique Mayotte Micronesia, Federated States of
Monaco Montserrat Myanmar
Nauru Netherlands Antilles New Zealand
Niue Norfolk Island Norway
Palau Reunion Saint Kitts and Nevis
Saint Lucia Saint Martin Saint Pierre and Miquelon
San Marino Sao Tome and Principe Satellite Provider
Seychelles Sierra Leone Solomon Islands
Somalia Suriname Svalbard and Jan Mayen
Swaziland Sweden Switzerland
Timor-Leste Tokelau Turkmenistan
Tuvalu United Kingdom United States
United States Minor Outlying Islands Vanuatu Virgin Islands, British
Virgin Islands, U.S