Results 1 to 7 of 7

Thread: Secure admin [MOD]

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Secure admin [MOD]

    I was thinking the best way to secure your admin panel. It was really simple in the end.

    Ill update this later to include an array of ips and wildcard ips

    Add to top of main.php
    Code:
    $ip = $_SERVER['REMOTE_ADDR']; //get ip
    $allow_ip = "165.45.54.765"; //your allowed ip - 165.45.54.765 is a fake ip for testing
    
    if ($allow_ip != $ip){
    //boot them off to the index page
    redirect( $config['baseurl'] );
    }

  2. #2
    Join Date
    Dec 2008
    Posts
    152

    Default

    Quote Originally Posted by carefree2 View Post
    I was thinking the best way to secure your admin panel. It was really simple in the end.

    Ill update this later to include an array of ips and wildcard ips

    Add to top of main.php
    Code:
    $ip = $_SERVER['REMOTE_ADDR']; //get ip
    $allow_ip = "165.45.54.765"; //your allowed ip - 165.45.54.765 is a fake ip for testing
    
    if ($allow_ip != $ip){
    //boot them off to the index page
    redirect( $config['baseurl'] );
    }

    You still have to manually put in the IP

  3. #3

    Default

    Its worth it BIGboy

  4. #4
    Join Date
    Dec 2008
    Posts
    152

    Default

    ill stick with the code i posted way back that uses .htacess

    But all in all this will work as well. people will still complain you have to change the IP around
    Last edited by bigoboy; 06-20-2009 at 11:21 AM.

  5. #5

    Default

    hackers can still read htaccess on a shared host, youll need to hard code it into the page itself for maximum protection.

    Last time i checked you have to still manually edit htaccess, wasnt that your point.

    Anyway to all the normal ppl here this is the way to do it

  6. #6
    Join Date
    Dec 2008
    Posts
    152

    Default

    Quote Originally Posted by carefree2 View Post
    hackers can still read htaccess on a shared host, youll need to hard code it into the page itself for maximum protection.

    Last time i checked you have to still manually edit htaccess, wasnt that your point.

    Anyway to all the normal ppl here this is the way to do it
    i think you are little bit confused oh which method is more secure my friend.

    If you honestly think putting that code into a .php file is more secure than the code used in the htaccess file then your are absolutely wrong my friend.

    So normal people ..................

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
  •