Lock down phpmyadmin, IP restriction

From TomSchaefer.org Wiki

Jump to: navigation, search

/etc/phpmyadmin

config.inc.php

 $cfg['Servers'][$i]['AllowDeny']['order']  = 'deny,allow';
 $cfg['Servers'][$i]['AllowDeny']['rules'][] = 'allow % from 127.0.0.1';
 $cfg['Servers'][$i]['AllowDeny']['rules'][] = 'deny % from all';



Make sure you edit the top part of the script. If you put it under the 'Next' Server portion, then it will not work globally.


Mine looks like:

   $cfg['Servers'][$i]['AllowDeny']['order']  = 'deny,allow';
   $cfg['Servers'][$i]['AllowDeny']['rules'][] = 'allow % from 127.0.0.1';
   $cfg['Servers'][$i]['AllowDeny']['rules'][] = 'allow % from 192.168.1.0/24';
   $cfg['Servers'][$i]['AllowDeny']['rules'][] = 'deny % from all';
Personal tools