HTTP proxy server for Iran


/ Published in: Apache
Save to your folder(s)

Due to widespread internet blocking in Iran following the June 2009 election, a network of proxy servers was set up to assist in the free flow of information. The IP range, to the best of my knowledge, should cover the addresses used in Iran, with blocks added for the IRI government addresses. Restricting access to Iran will help prevent abuse by others, which is always a danger with open proxies. This configuration also only allows HTTP and HTTPS traffic, which will prevent the relay of spam email.

For best results, run your proxy on multiple ports. Duplicate this configuration ten times using different port numbers for each. Avoid ports 80/81/8000/8080/9090/3128.


Copy this code and paste it in your HTML
  1. # Pick a random high-numbered port
  2. Listen *:4400
  3.  
  4. # Add the above port number below as well
  5. <VirtualHost *:4400>
  6. ProxyRequests On
  7. AllowCONNECT 80 443
  8. <Proxy *>
  9. Order deny,allow
  10. Deny from all
  11. # Country: IRAN, ISLAMIC REPUBLIC OF
  12. # ISO Code: IR
  13. # Total Networks: 118
  14. # Total Subnets: 2,130,176
  15. # Source: http://www.countryipblocks.net/country-blocks/select-formats/
  16. Allow from 62.60.128.0/17
  17. Allow from 62.193.0.0/19
  18. Allow from 62.220.96.0/19
  19. Allow from 77.36.128.0/17
  20. Allow from 77.77.64.0/18
  21. Allow from 77.104.64.0/18
  22. Allow from 77.237.64.0/19
  23. Allow from 77.237.160.0/19
  24. Allow from 77.245.224.0/20
  25. Allow from 78.38.0.0/15
  26. Allow from 78.109.192.0/20
  27. Allow from 78.110.112.0/20
  28. Allow from 78.111.0.0/20
  29. Allow from 78.154.32.0/19
  30. Allow from 78.157.32.0/19
  31. Allow from 78.158.160.0/19
  32. Allow from 79.127.0.0/17
  33. Allow from 79.132.192.0/19
  34. Allow from 79.170.144.0/21
  35. Allow from 79.175.128.0/18
  36. Allow from 80.66.176.0/20
  37. Allow from 80.69.240.0/20
  38. Allow from 80.71.112.0/20
  39. Allow from 80.75.0.0/20
  40. Allow from 80.191.0.0/16
  41. Allow from 80.242.0.0/20
  42. Allow from 80.253.128.0/20
  43. Allow from 80.253.144.0/20
  44. Allow from 81.12.0.0/17
  45. Allow from 81.28.32.0/20
  46. Allow from 81.28.48.0/20
  47. Allow from 81.31.160.0/20
  48. Allow from 81.31.176.0/20
  49. Allow from 81.90.144.0/20
  50. Allow from 81.91.128.0/20
  51. Allow from 81.91.144.0/20
  52. Allow from 82.99.192.0/18
  53. Allow from 82.115.0.0/19
  54. Allow from 83.147.192.0/18
  55. Allow from 84.47.192.0/18
  56. Allow from 84.241.0.0/18
  57. Allow from 85.9.64.0/18
  58. Allow from 85.15.0.0/18
  59. Allow from 85.133.128.0/17
  60. Allow from 85.185.0.0/16
  61. Allow from 85.198.0.0/18
  62. Allow from 86.109.32.0/19
  63. Allow from 87.107.0.0/16
  64. Allow from 87.247.160.0/19
  65. Allow from 87.248.128.0/19
  66. Allow from 89.144.128.0/18
  67. Allow from 89.165.0.0/17
  68. Allow from 89.221.80.0/20
  69. Allow from 89.235.64.0/18
  70. Allow from 91.98.0.0/15
  71. Allow from 91.184.64.0/19
  72. Allow from 91.186.192.0/19
  73. Allow from 91.206.122.0/23
  74. Allow from 91.208.165.0/24
  75. Allow from 91.209.242.0/24
  76. Allow from 91.212.16.0/24
  77. Allow from 91.212.19.0/24
  78. Allow from 91.212.252.0/24
  79. Allow from 92.42.48.0/21
  80. Allow from 92.50.0.0/18
  81. Allow from 92.61.176.0/20
  82. Allow from 92.62.176.0/20
  83. Allow from 92.242.192.0/19
  84. Allow from 93.110.0.0/16
  85. Allow from 93.190.24.0/21
  86. Allow from 94.74.128.0/18
  87. Allow from 94.101.128.0/20
  88. Allow from 94.101.176.0/20
  89. Allow from 94.101.240.0/20
  90. Allow from 94.139.160.0/19
  91. Allow from 94.182.0.0/15
  92. Allow from 94.184.0.0/17
  93. Allow from 94.232.168.0/21
  94. Allow from 94.241.128.0/18
  95. Allow from 95.38.0.0/16
  96. Allow from 95.80.128.0/18
  97. Allow from 95.81.64.0/18
  98. Allow from 95.82.0.0/18
  99. Allow from 95.82.64.0/18
  100. Allow from 95.130.56.0/21
  101. Allow from 95.130.240.0/21
  102. Allow from 188.34.0.0/16
  103. Allow from 188.93.64.0/21
  104. Allow from 188.121.96.0/19
  105. Allow from 188.121.128.0/19
  106. Allow from 188.136.128.0/17
  107. Allow from 188.158.0.0/15
  108. Allow from 193.189.122.0/23
  109. Allow from 194.225.0.0/16
  110. Allow from 195.146.32.0/19
  111. Allow from 212.16.64.0/19
  112. Allow from 212.33.192.0/19
  113. Allow from 212.50.224.0/19
  114. Allow from 212.80.0.0/19
  115. Allow from 212.95.128.0/19
  116. Allow from 212.120.192.0/19
  117. Allow from 213.176.0.0/19
  118. Allow from 213.176.32.0/19
  119. Allow from 213.176.64.0/18
  120. Allow from 213.195.0.0/18
  121. Allow from 213.207.192.0/18
  122. Allow from 213.217.32.0/19
  123. Allow from 213.233.160.0/19
  124. Allow from 217.11.16.0/20
  125. Allow from 217.24.144.0/20
  126. Allow from 217.25.48.0/20
  127. Allow from 217.64.144.0/20
  128. Allow from 217.66.192.0/20
  129. Allow from 217.66.208.0/20
  130. Allow from 217.146.208.0/20
  131. Allow from 217.172.96.0/19
  132. Allow from 217.174.16.0/20
  133. Allow from 217.218.0.0/15
  134. # Deny IRI government address ranges
  135. # Source: http://r3blog.nl/iran_dropped.txt
  136. Deny from 78.38.77.160/28
  137. Deny from 80.191.21.0/24
  138. Deny from 84.47.248.0/21
  139. Deny from 84.47.212.0/22
  140. Deny from 84.47.216.0/22
  141. Deny from 84.47.220.0/22
  142. Deny from 194.225.164.0/23
  143. Deny from 213.176.19.0/26
  144. Deny from 213.176.74.0/23
  145. Deny from 217.172.96.0/22
  146. Deny from 217.172.104.0/22
  147. Deny from 217.172.108.0/22
  148. Deny from 217.172.112.0/22
  149. Deny from 217.172.120.0/22
  150. Deny from 217.172.124.0/22
  151. Deny from 217.24.144.0/22
  152. Deny from 217.24.148.0/22
  153. Deny from 217.24.152.0/22
  154. Deny from 217.24.156.0/22
  155. </Proxy>
  156. # No logging
  157. CustomLog /dev/null combined
  158. ErrorLog /dev/null
  159. </VirtualHost>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.