Results 1 to 5 of 5

Thread: Anyone know how to Block Web Proxies

  1. #1
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts

    Anyone know how to Block Web Proxies

    So I have come across a couple php snippets that will detect if proxy is being used now I would like to know does anyone know of a script that will detect if one is being used and somehow break the proxy url and give them access to the main site?

    Not an important issue more for curiosity at this point.

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  2. #2
    Korrupt is offline Unknown Net Builder
    Join Date
    Apr 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Why not just use a header function to redirect to the main site if a proxy is detected?

  3. #3
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts
    That would be the type of code I am looking for

    I have this so far but cant get an } else { to load the main page if no proxy is detected.

    PHP Code:

    <?php
    if (
          
    $_SERVER['HTTP_X_FORWARDED_FOR']
       || 
    $_SERVER['HTTP_X_FORWARDED']
       || 
    $_SERVER['HTTP_FORWARDED_FOR']
       || 
    $_SERVER['HTTP_CLIENT_IP']
       || 
    $_SERVER['HTTP_VIA']
       || 
    in_array($_SERVER['REMOTE_PORT'], array(8080,80,6588,8000,3128,553,554))
       || @
    fsockopen($_SERVER['REMOTE_ADDR'], 80$errno$errstr30))
    {
        
    header('Location: http://www.example.com');
    }
    ?>

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  4. #4
    Ogle is offline Newbie Net Builder
    Join Date
    Mar 2009
    Posts
    65
    Thanks
    8
    Thanked 7 Times in 4 Posts
    That is not going to work, REMOTE_PORT is going to be a random port which changes every connect. The ports you have listed are indeed "common" proxy ports but they will be the source port that the client connects to and not from. You could check the client_ip to see if those ports are open, but then its still pretty pointless - missing out huge amounts of other setups while creating false positives for the port 80, a time out of 30 is fu*king huge also. Alot of people black hole tcp requests for closed ports, there for your client could be sitting waiting for 30seconds for your httpd to send it any thing else and will most likely time out.


    Those other FORWARDED headers are only set by certain types of proxy also, and mostly these are not the ones you want to worry about (Squid etc) abuse coming from.

    I would say give up before you waste too much time!

  5. #5
    Aquarezz's Avatar
    Aquarezz is offline Master Net Builder
    Join Date
    Dec 2008
    Location
    Belgium
    Posts
    3,852
    Blog Entries
    4
    Thanks
    683
    Thanked 591 Times in 463 Posts
    This is simple and could work.. it does here:
    Gratis Antiproxy Systeem - SiteDeals

    Bye
    |Nico Lawsons

  6. Thanked by:

    Szise (1 May, 2009)

Similar Threads

  1. how to block all spider ?
    By SonnyCooL in forum Managing
    Replies: 6
    Last Post: 26 January, 2012, 05:53 AM
  2. [Free] Block Bad Traffic
    By codename_B in forum Scripts
    Replies: 0
    Last Post: 9 February, 2011, 15:12 PM
  3. how to block bad traffic
    By alxgfx in forum Web Proxies
    Replies: 3
    Last Post: 25 July, 2010, 15:25 PM
  4. Free Proxies and Selling Proxies
    By R4z0r in forum Proxy List Announcements
    Replies: 0
    Last Post: 31 January, 2010, 00:38 AM
  5. Replies: 0
    Last Post: 17 January, 2009, 00:40 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •