1. This website uses cookies to improve service and provide a tailored user experience. By using this site, you agree to this use. See our Cookie Policy.
    Dismiss Notice

How to detect and block all proxy,vpn,tor... visitor on site

Discussion in 'PHP & Perl' started by AngelG9, Jun 24, 2019.

  1. AngelG9

    AngelG9 Registered Member

    Joined:
    Nov 28, 2018
    Messages:
    93
    Likes Received:
    2
    Gender:
    Male
    Does anyone have a script that blocks proxy, vpn, tor of visits?
     
  2. Dialgon

    Dialgon Regular Member

    Joined:
    Aug 3, 2018
    Messages:
    301
    Likes Received:
    26
    Gender:
    Male
    I'd like to have such script as well.
     
  3. neal007

    neal007 Newbie

    Joined:
    Jul 18, 2019
    Messages:
    3
    Likes Received:
    0
    Gender:
    Male
    i want also
     
  4. MattVlad

    MattVlad Newbie

    Joined:
    Dec 7, 2018
    Messages:
    4
    Likes Received:
    0
    Gender:
    Male
    Occupation:
    JV @ SER Power LIsts
    Location:
    SER Power Lists
    Home Page:
    There are some copy paste scripts. I have seen here as well. Would be great if someone share plugin solution for this :) .
     
  5. Goodi OG

    Goodi OG Regular Member

    Joined:
    May 29, 2019
    Messages:
    386
    Likes Received:
    147
    Gender:
    Male
    Occupation:
    Crawler
    Location:
    Paradise
    Home Page:
    I think you will need a hude list /database of all vpn and proxies. Something that https://www.inboxdollars.com/ uses. Till today, I haven't been able to register in that site because that don't support my country and it u use vpn or proxy, It get banned instantly.
     
  6. Imz

    Imz Junior Member

    Joined:
    Jul 1, 2019
    Messages:
    105
    Likes Received:
    63
    Gender:
    Male
    Location:
    UK
    I'm currently searching for something similar, I've found a couple of sites, most are paid, and the free ones aren't that great.

    Ideally... if theres one site with an API to block all of the above I wouldn't mind paying.
     
  7. nullday000

    nullday000 Jr. VIP Jr. VIP

    Joined:
    Mar 12, 2017
    Messages:
    118
    Likes Received:
    33
    Occupation:
    hq mobile proxies
    Home Page:
    You may try to implement getipintel net API, it shows pretty stable good results, but there is always a chance to ban some random real user, so be careful with automatic bans.
     
  8. Imz

    Imz Junior Member

    Joined:
    Jul 1, 2019
    Messages:
    105
    Likes Received:
    63
    Gender:
    Male
    Location:
    UK
    Yeh also iphub.info which has a free plan of 1000 per day.

    You might get some legit users caught up however it depends on your use case and why you want to block those users.
     
  9. FatBee

    FatBee Jr. VIP Jr. VIP

    Joined:
    Apr 4, 2015
    Messages:
    1,293
    Likes Received:
    699
    Gender:
    Male
    Maxmind fraud. Is pay per use and you have like 100k requests for 25usd i think
     
  10. NicheMansLand

    NicheMansLand Newbie

    Joined:
    May 18, 2013
    Messages:
    19
    Likes Received:
    4
    Gender:
    Male
    You can just use/query the free maxmind dbs hxxps://dev.maxmind.com/geoip/geoip2/geolite2/ , autoupdate them, and thats all. It flags tor/proxies, but not datacenter IPs.
     
  11. AdultScriptPro

    AdultScriptPro Registered Member

    Joined:
    Sep 8, 2010
    Messages:
    90
    Likes Received:
    29
    • Thanks Thanks x 1
  12. Mi C

    Mi C Junior Member

    Joined:
    Jun 17, 2017
    Messages:
    148
    Likes Received:
    27
    Gender:
    Male
  13. jones05

    jones05 Newbie

    Joined:
    Apr 4, 2010
    Messages:
    1
    Likes Received:
    0
    Gender:
    Male
    i use cloudflare to block most of bots and tor visits
     
  14. mariusblack

    mariusblack Registered Member

    Joined:
    Sep 10, 2016
    Messages:
    52
    Likes Received:
    8
    Gender:
    Male
    PHP:
    <?php
    if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) || ($_SERVER['HTTP_USER_AGENT']=='') || ($_SERVER['HTTP_VIA']!='')){ die("Proxy server not allowed.");}
    $proxy_headers = array('HTTP_VIA','HTTP_X_FORWARDED_FOR','HTTP_FORWARDED_FOR','HTTP_X_FORWARDED','HTTP_FORWARDED','HTTP_CLIENT_IP','HTTP_FORWARDED_FOR_IP','VIA','X_FORWARDED_FOR','FORWARDED_FOR','X_FORWARDED','FORWARDED','CLIENT_IP','FORWARDED_FOR_IP','HTTP_PROXY_CONNECTION');
    foreach(
    $proxy_headers AS $x){
    if(isset(
    $_SERVER[$x])) die("You're using proxy.");
    exit;
    }
    ?>
     
    Last edited: Dec 30, 2019
  15. Mi C

    Mi C Junior Member

    Joined:
    Jun 17, 2017
    Messages:
    148
    Likes Received:
    27
    Gender:
    Male
    It doesn't work on anonymous proxy which it does not reveal their forwarding IP address.