Full IP protection (for hackers ect.)

Page 1 of 2 12 LastLast
Results 1 to 25 of 29
  1. #1
    Proficient Member DjInTrouble is offline
    MemberRank
    Dec 2010 Join Date
    The NetherlandsLocation
    180Posts

    Full IP protection (for hackers ect.)

    I am creating my Habbo CMS from scratch, and my PHP is great.
    But this isn't done, you can do javascript headers to redirect them to their site back(IP)

    PHP Code:
    $ip $_SERVER['REMOTE_ADDR'];

    if(
    $ip == 'FILL IN IP HERE')
    {
        echo
    "SUM TEXT HERE © DjInTrouble Protections 2010 - 2011.";

    Dunot remove copyright.
    For example, if you know my ip and you hate me, you can do this:

    $ip = $_SERVER['REMOTE_ADDR'];

    if($ip == '5.93.78.28')
    {
    echo"Sorry DjInTrouble, no permission for you.";
    }

    But don't remove copyright,please/
    Like me if I helped:)


  2. #2
    Developer Quackster is offline
    DeveloperRank
    Dec 2010 Join Date
    AustraliaLocation
    3,483Posts

    Re: Full IP protection (for hackers ect.)

    Why not more, etc.

    PHP Code:
    $ip $_SERVER['REMOTE_ADDR'];

    if(
    $ip == 'FILL IN IP HERE' || $ip == 'FILL IN IP HERE' || $ip == 'FILL IN IP HERE')
    {
        echo 
    "Your ip is banned.";


  3. #3
    Proficient Member DjInTrouble is offline
    MemberRank
    Dec 2010 Join Date
    The NetherlandsLocation
    180Posts

    Re: Full IP protection (for hackers ect.)

    Yeah, that for example does work too.

  4. #4
    Demi-God tweeney is offline
    MemberRank
    Aug 2008 Join Date
    888Posts

    Re: Full IP protection (for hackers ect.)

    After the echo, why not put exit;
    to stop loading more of the page? :P

  5. #5
    Proficient Member DjInTrouble is offline
    MemberRank
    Dec 2010 Join Date
    The NetherlandsLocation
    180Posts

    Re: Full IP protection (for hackers ect.)

    Hmm.. Tweeney I never thinked about that.
    Thanks.

  6. #6
    No, Just no. Matthew is offline
    MemberRank
    Jul 2008 Join Date
    United KingdomLocation
    1,408Posts

    Re: Full IP protection (for hackers ect.)

    uh, well done for mastering PHP. Even though I doubt this is your actual work. Problem is, is that IP bans aren't affective. They simply do not work or scale in the long run. Also, in the event of an emergency. I'd think it painstakingly slow and inefficient to have to SSH/FTP (whatever you do) to your 'ipban' file, add the IP address ect.

    You should consider doing it in MySQL.

  7. #7
    Dirty capitalists. X1M! is offline
    MemberRank
    Dec 2008 Join Date
    450Posts

    Re: Full IP protection (for hackers ect.)

    Easier method:
    PHP Code:
    <?php

    Define
    ("BANNED"""); // This could be changed to be MySQL results etc
    Define("DO"0); // edit this

    If(in_array($_SERVER['REMOTE_ADDR'], explode(","BANNED))):
    switch(DO):
    default:
    echo 
    "Permission denied.";
    exit();
    break;
    case 
    1:
    header("Location: http://127.0.0.1");
    break;
    endswitch;
    endif;

    ?>
    Sloppy PHP coding ftw
    Last edited by X1M!; 26-02-11 at 10:14 AM.

  8. #8
    Retired maritnmine is offline
    MemberRank
    May 2007 Join Date
    North KoreaLocation
    1,103Posts

    Re: Full IP protection (for hackers ect.)

    And what's new with this? xD

    - Martin

  9. #9
    Proficient Member JNike Rulez is offline
    MemberRank
    Sep 2010 Join Date
    GermanyLocation
    183Posts

    Re: Full IP protection (for hackers ect.)

    why dont u use htaccess?
    deny from 127.0.0.1
    deny from 127.0.0

    etc..

  10. #10
    Proficient Member DjInTrouble is offline
    MemberRank
    Dec 2010 Join Date
    The NetherlandsLocation
    180Posts

    Re: Full IP protection (for hackers ect.)

    I don't know.

  11. #11
    Proficient Member DjInTrouble is offline
    MemberRank
    Dec 2010 Join Date
    The NetherlandsLocation
    180Posts

    Re: Full IP protection (for hackers ect.)

    Hmm.. yeah but I hate it because I enabled it a time and emu doesn't work anymore. soo...

  12. #12
    swagggggg Livar is offline
    MemberRank
    Oct 2008 Join Date
    United KingdomLocation
    2,272Posts

    Re: Full IP protection (for hackers ect.)

    What the fuck does the site have to do with the firewall blocking emulator, dumb ass. Yes, what Martin said "What's new with this".

  13. #13
    Account Upgraded | Title Enabled! Milw0rm is offline
    MemberRank
    Jul 2007 Join Date
    660Posts

    Re: Full IP protection (for hackers ect.)

    The standard Windows Firewall is a no-go. The "extended" one is much better. If you install the Routing and Remote Access service i think you get it. It can block subnets, block ip's, open ports, close all ports exept blahblah.

    Edit: Thanks for this anyways, going to use it on my clan's homepage.

  14. #14
    hoi ik ben cool Merijn is offline
    MemberRank
    Dec 2009 Join Date
    The NetherlandsLocation
    492Posts

    Re: Full IP protection (for hackers ect.)

    Do you can make something that's blocking VPN connections?

  15. #15
    :joy: Jonteh is offline
    MemberRank
    Apr 2007 Join Date
    New York, USALocation
    3,372Posts

    Re: Full IP protection (for hackers ect.)

    PHP Code:
    <?php
    $ip 
    $_SERVER['REMOTE_ADDR'];
    if(
    mysql_num_rows("SELECT * FROM ip_bans WHERE ip = '".$ip."'");
    {
     die(
    'Blocked');
    }
    ?>
    table ip_bans, field ip.
    simple shit.

    edit: o btw, in your first post, die(); it or it will load the page.

  16. #16
    Account Upgraded | Title Enabled! Milw0rm is offline
    MemberRank
    Jul 2007 Join Date
    660Posts

    Re: Full IP protection (for hackers ect.)

    For the VPN connections use a Safe@Office box. It costs, but its worth it.

  17. #17
    What about no. Davidaap is offline
    MemberRank
    Nov 2009 Join Date
    773Posts

    Re: Full IP protection (for hackers ect.)

    Quote Originally Posted by Milw0rm View Post
    The standard Windows Firewall is a no-go. The "extended" one is much better. If you install the Routing and Remote Access service i think you get it. It can block subnets, block ip's, open ports, close all ports exept blahblah.

    Edit: Thanks for this anyways, going to use it on my clan's homepage.
    i mean the one in windows server 2008 r2 :P

  18. #18
    Account Upgraded | Title Enabled! Milw0rm is offline
    MemberRank
    Jul 2007 Join Date
    660Posts

    Re: Full IP protection (for hackers ect.)

    Yes, so do I. There is a firewall in windows called something like RRaS or something like it. It allows alot of shit, google it.

  19. #19
    ☮TAKU???? seanrom is offline
    MemberRank
    Nov 2009 Join Date
    1,004Posts

    Re: Full IP protection (for hackers ect.)

    lol, this was just a lame release xD A basic coder come with "fixes" xDD

  20. #20
    sexiess is a sin. Subway is offline
    MemberRank
    Jun 2010 Join Date
    2,491Posts

    Re: Full IP protection (for hackers ect.)

    oh shit, so many codes dont know which on is best ^^

  21. #21
    [̲̅$̲̅(̲̅1̲̅)̲̅$ ̲̅] leenster is offline
    MemberRank
    May 2008 Join Date
    KanaadaLocation
    992Posts

    Re: Full IP protection (for hackers ect.)

    Quote Originally Posted by Jontycat View Post
    PHP Code:
    <?php
    $ip 
    $_SERVER['REMOTE_ADDR'];
    if(
    mysql_num_rows("SELECT * FROM ip_bans WHERE ip = '".$ip."'");
    {
     die(
    'Blocked');
    }
    ?>
    table ip_bans, field ip.
    simple shit.

    edit: o btw, in your first post, die(); it or it will load the page.
    I think that's the better option.... add a custom msg for each ip for example.... or a custom redirect page / site....

    possibilities are endless.


    not a bad idea to add this to the hoesekeeping.... :0)
    Last edited by leenster; 27-02-11 at 01:50 AM.

  22. #22
    :joy: Jonteh is offline
    MemberRank
    Apr 2007 Join Date
    New York, USALocation
    3,372Posts

    Re: Full IP protection (for hackers ect.)

    Quote Originally Posted by leenster View Post
    I think that's the better option.... add a custom msg for each ip for example.... or a custom redirect page / site....

    possibilities are endless.


    not a bad idea to add this to the hoesekeeping.... :0)
    This is why we have IP bans.

  23. #23
    Banned c0mma is offline
    BannedRank
    Jan 2011 Join Date
    ^RaGEZONE^Location
    696Posts

    Re: Full IP protection (for hackers ect.)

    This don't work at all, is this for PHP? Because I tried this, and it does not work ;o

  24. #24
    :joy: Jonteh is offline
    MemberRank
    Apr 2007 Join Date
    New York, USALocation
    3,372Posts

    Re: Full IP protection (for hackers ect.)

    Quote Originally Posted by iPixelHotel View Post
    This don't work at all, is this for PHP? Because I tried this, and it does not work ;o
    You call yourself a PHP Programmer and you can't even tell what language its in.
    Pathetic excuse for a programmer.

  25. #25
    Banned c0mma is offline
    BannedRank
    Jan 2011 Join Date
    ^RaGEZONE^Location
    696Posts

    Re: Full IP protection (for hackers ect.)

    Dude, I was joking. I knew it was for PHP. I met it in the terms of sarcasm. Because the coded did not work as PHP, that's all ;l



Page 1 of 2 12 LastLast

Advertisement