How do I lock phpMyAdmin so only my IP can access it

Discussion in 'Security' started by mikeyd, Nov 19, 2008.

  1. #1
    Hi All

    I want to lock my phpMyAdmin installation so that only my IP's can access this part of my server, not sure how to do it myself and googing returned crud - any help appreciated.

    Thanks

    Mikey
     
    mikeyd, Nov 19, 2008 IP
  2. ryandanielt

    ryandanielt Well-Known Member

    Messages:
    1,797
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    185
    #2
    the only way I have seen this done so far is to add an extra couple lines of code in you phpmyadmin files. depending on how many files need to be edited this will cost money.
     
    ryandanielt, Nov 19, 2008 IP
  3. mikeyd

    mikeyd Peon

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I was pretty sure i could do it with htaccess?
     
    mikeyd, Nov 19, 2008 IP
  4. Thibaut

    Thibaut Well-Known Member

    Messages:
    886
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    140
    #4
    Hello,

    try to update your .htaccess with the following statements:

    order deny,allow
    deny from all
    allow from your_ip_address

    Regards
    Thibaut
     
    Thibaut, Nov 20, 2008 IP
  5. mikeyd

    mikeyd Peon

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi Thibaut

    I have tried this and it locks me out from the directory presenting me with this error page:

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
     
    mikeyd, Nov 20, 2008 IP
  6. Thibaut

    Thibaut Well-Known Member

    Messages:
    886
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    140
    #6
    Hello m8,

    try to add this statement:

    AddType x-mapp-php5 .php

    Regards
    Thibaut
     
    Thibaut, Nov 21, 2008 IP
  7. mikeyd

    mikeyd Peon

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Hi Thibaut

    My .htaccess file now reads

    AuthName "phpMyAdmin Area"
    AuthType Basic
    AddType x-mapp-php5 .php
    <Limit GET POST>
    order deny,allow
    deny from all
    allow from 86.153.160.174
    </Limit>

    but still not letting me into the directory
     
    mikeyd, Nov 21, 2008 IP
  8. bread102

    bread102 Peon

    Messages:
    40
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    hmmmmm i'd say change the ip to localhost, and try accessing phpmyadmin from localhost maybe that'll do the trick!
     
    bread102, Dec 6, 2008 IP