{"id":1220,"date":"2015-04-21T15:46:10","date_gmt":"2015-04-21T15:46:10","guid":{"rendered":"http:\/\/scunster.co.uk\/?p=1220"},"modified":"2015-04-21T15:48:21","modified_gmt":"2015-04-21T15:48:21","slug":"secure-restrict-phpmyadmin-access-via-ip-address","status":"publish","type":"post","link":"https:\/\/scunster.co.uk\/?p=1220","title":{"rendered":"Secure \/ Restrict phpMyAdmin access via IP address"},"content":{"rendered":"<p>A good way of helping to secure phpMyAdmin access is by restricting logon access by IP address.<\/p>\n<p>edit phpmyadmin.conf (which is located in \/etc\/httpd\/conf.d in CentOS)<\/p>\n<p>Whitelist your allowed IP addresses by adding or amending the following lines to your config file. Not forgetting to make sure that you leave 127.0.0.1 with access!<\/p>\n<pre>#\r\n#  Web application to manage MySQL\r\n#\r\n\r\n&lt;Directory &quot;\/usr\/share\/phpmyadmin&quot;&gt;\r\n  Order Deny,Allow\r\n  Deny from all\r\n  Allow from 127.0.0.1\r\n  Allow from 192.168.0.45\r\n  Allow from 65.660.xxx.xxx\r\n &lt;\/Directory&gt;\r\n\r\nAlias \/phpmyadmin \/usr\/share\/phpmyadmin\r\nAlias \/phpMyAdmin \/usr\/share\/phpmyadmin\r\nAlias \/mysqladmin \/usr\/share\/phpmyadmin<\/pre>\n<p>Now restart your apache server to apply the changes.<\/p>\n<p>This just restricts access to phpMyAdmin web interface, it doesn&#8217;t prevent other types of access to the MySQL database so make sure that all of you MySQL users have the correct permissions set for their relevant databases. Especially the user &#8220;root&#8221;!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A good way of helping to secure phpMyAdmin access is by restricting logon access by IP address. edit phpmyadmin.conf (which is located in \/etc\/httpd\/conf.d in CentOS) Whitelist your allowed IP addresses by adding or amending the following lines to your config file. Not forgetting to make sure that you leave 127.0.0.1 with access! # # [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[164,3,171,170,12],"tags":[200,245,274,275,85],"class_list":["post-1220","post","type-post","status-publish","format-standard","hentry","category-centos","category-linux","category-security-linux","category-security","category-webhosting","tag-centos-2","tag-ip-address","tag-phpmyadmin","tag-restrict","tag-root"],"_links":{"self":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1220"}],"version-history":[{"count":3,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1220\/revisions"}],"predecessor-version":[{"id":1223,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/1220\/revisions\/1223"}],"wp:attachment":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}