I want to block Egypt....

Discussion in 'Windows Desktop Systems' started by Leo154, Nov 26, 2003.

  1. Leo154

    Leo154 Guest

    yes.. I want to block absolutely all IPs coming from Egypt... my site features CPanel X which is cool... and has IP deny... but I want to block the entire nation of Egypt... from accessing my site.

    :D
     
  2. Enyo

    Enyo Moderator

    Messages:
    1,338
    O-Kay :confused:

    To do so you need to find out the IP address assignments for the ISPs in Egypt and block the ranges, you cant just blanket block a whole country without some extra coding on your site to enable you to detect visitors country's and then deny them access based on that.
     
  3. Leo154

    Leo154 Guest

    ok, lets do that coding to detect visitors country... do you have links.. or something?
     
  4. Petros

    Petros Thief IV

    Messages:
    3,038
    Location:
    Pacific Northwest
    So far all I know is that most (maybe all) of Egypt's IP adresses begin with 82, 213, and 62. I'll keep digging for you.

    /edit: IGNORE ME! EUROPE LOVES YOU!
     
  5. Enyo

    Enyo Moderator

    Messages:
    1,338
    HandyBuddy 82, 213, and 62 address blocks are used throughtout the EU as allocated by RIPE.

    Leo154, Here is a site that discusses it http://ip-to-country.webhosting.info/. Run around google a bit and you will find some examples and code but you will need to work on it. You will need to do it in something like PHP or ASP.
     
  6. Leo154

    Leo154 Guest

    I googled it ofcourse. But its quite complex... Cant you just set a cookie to query country, and if countr=EG... block access.
     
  7. Enyo

    Enyo Moderator

    Messages:
    1,338
    No i dont belive so. You have two options that come to mind, code a solution or use htaccess and the block the IP ranges as mentioned above.

    ie-eg.com - Internet Egypt Network Ranges:

    194.79.112.0 - 194.79.112.255
    62.193.64.0 - 62.193.127.255
    213.154.32.0 - 213.154.63.255

    And thats just one ISP!

    You can block access using htaccess so for example:

    Code:
    <Limit GET HEAD POST>
    order allow,deny
    deny from ie-eg.com
    deny from egyptnetwork.com
    deny from quicknet.com.eg
    deny from sedapnet.org.eg
    deny from 194.79.112
    deny from 62.193.64
    deny from 62.193.65
    deny from 62.193.66
    allow from all
    </LIMIT>
    and so on with all of the ranges. As you see i also put in some domains.

    You can see to build up a list of IP ranges and or domains for the whole of Egypt is going to be no small task. Note: You cant just go by domain as some of the clients do not have DNS records.

    Your best off coding a solution or dropping your quest.

    Why do you want to block Egypt anyway?
     
  8. Friend of Bill

    Friend of Bill What, me worry?

    Messages:
    1,572
    Egypt good, Egypt NATO. No blocky...:cool:
     
  9. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    What Enyo said about the htaccess is your best option.

    Enyo, trouble from Egyptian visitors.
     
  10. Enyo

    Enyo Moderator

    Messages:
    1,338
    Okay I take it leo has the IP(s) in use by the Egyptian visitors in which case he can determine there ISP and drastically cut down the amount of ranges that need to blocked.
     
  11. Leo154

    Leo154 Guest

    yes i do, but you see in egypt you can sign on with any isp you feel like.. its just a dial number with no password or user name....
     
  12. Enyo

    Enyo Moderator

    Messages:
    1,338
    So use the IPs you have logged to check the RIPE database and determine the IP ranges allocated to that ISP and start blocking them as outlined above, you will get them all eventually.
     
  13. Leo154

    Leo154 Guest

    its ok... he appoligized... apparently...

    still weak... egyptian...psh..

    :rolleyes:
     
  14. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    First off, why do you have trouble from the egyptions anyways?
     
  15. Leo154

    Leo154 Guest

    lol: my friends Egyptians and they are "different"... I don't want them spamming my site...

    btw. "different" is the only word i could use here
     
  16. Grandmaster

    Grandmaster Electronica Addict Political User Folding Team

    Messages:
    10,574
    Location:
    Santa Clara, CA
    heh, just go to the shoutbox on leo's site :p
     
  17. 03bigMark03

    03bigMark03 Guest

    This is MAD. Why would you want to block an entire country, I mean your friends, just log the excessive spamming and block them IP's, I think it's stupid blocking whole country's, I mean if we did country's would start blocking USA etc lol. Mad.
     
  18. Petros

    Petros Thief IV

    Messages:
    3,038
    Location:
    Pacific Northwest
    I think it's hilarious! When I saw the thread title alone, I laughed.
    :D

    This will become more popular in the future because of the innate human tendency to want to set itself apart from groups perceived as different. It's the new Tower of Babel.
     
  19. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    Now theres an idea :p
     
  20. Leo154

    Leo154 Guest

    tempting... tempting...