Empty

Total: £0.00

Securing phpMyAdmin to 127.0.0.1 for SSH connections with PuTTY - Ubuntu 10.04

By marksams, 06/07/2011 - 00:00

Once phpMyAdmin is installed, it's best to deny access to the /phpmyadmin path from the internet as many automated scripts will be scanning your web server for potential routes into your system. I've seen this activity hitting my servers as soon as they are publicly available.

Lock down phpMyAdmin connections to allow from 127.0.0.1 only - we will use an SSH tunnel to connect.

ssh-localhost-configuration-for-phpmyadmin


  • Type the following command to edit the phpmyadmin apache configuration

    • sudo nano /etc/phpmyadmin/apache.conf
  • Enter the following in the <directory> configuration

    • Order Allow,Deny
    • Allow from 127.0.0.1
    • ..then save and exit
  • Restart Apache

    • sudo /etc/init.d/apache2 restart

Configure PuTTY to make an SSH tunnel when you make a connection to your server.

putty_ssh_tunnel_configuration_for_phpmyadmin


  • Browse to 'Connection' -> 'SSH' -> 'Tunnels'
  • Add 8080 as the source port and 'localhost:80' as the destination
  • Click 'Add'
  • This tunnel will be created the next time you connect to the server (click 'Open' now if you want)

Browser URL for accessing phpMyAdmin via the SSH tunnel

Comments

By Anthony on

As the number of small business, membership, and internet marketing websites still increase, so to does the recognition of Open Source website and eCommerce content management systems. With an outsizes selection of those free platforms available to settle on from, including such popular choices as WordPress, Drupal, Jocular, Magneto and eCommerce, the one thing all of them have in common is that the sort of database system used. MySQL is one among the foremost popular database platforms available today, Cheap Essay Writing Service offering an excellent deal of reliability and flexibility when supporting an internet site or content management platform.