Results 1 to 5 of 5

Thread: Anyone know how to Block Web Proxies

  1. #1
    Join Date
    Dec 2008
    Redmond, Oregon

    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
    Why not just use a header function to redirect to the main site if a proxy is detected?

  3. #3
    Join Date
    Dec 2008
    Redmond, Oregon
    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:

    if (
    in_array($_SERVER['REMOTE_PORT'], array(8080,80,6588,8000,3128,553,554))
       || @
    fsockopen($_SERVER['REMOTE_ADDR'], 80$errno$errstr30))

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

  4. #4
    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
    This is simple and could work.. it does here:
    Gratis Antiproxy Systeem - SiteDeals

    |Nico Lawsons

Similar Threads

  1. how to block all spider ?
    By SonnyCooL in forum Managing
    Replies: 6
    Last Post: 26 January, 2012, 06:53 AM
  2. [Free] Block Bad Traffic
    By codename_B in forum Scripts
    Replies: 0
    Last Post: 9 February, 2011, 16: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, 01:38 AM
  5. Replies: 0
    Last Post: 17 January, 2009, 01:40 AM

Tags for this Thread


Posting Permissions

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