Koozali.org: home of the SME Server

Blocking phpmyadmin external access

Offline progitto

  • *****
  • 217
  • +0/-0
    • http://umbertomassari.dyndns.org
Blocking phpmyadmin external access
« on: March 13, 2007, 10:29:44 AM »
I want to block access from internet to phpmyadmin web interface (https://domain/myadmin), how can I do it?

Offline bpivk

  • *
  • 908
  • +0/-0
    • http://www.bezigrad.com
Blocking phpmyadmin external access
« Reply #1 on: March 13, 2007, 10:51:28 AM »
Edit the custom template if you used a contrib to install it.
Or lock the ibay if you installed it in an ibay.
"It should just work" if it doesn't report it. Thanks!

tarball

Blocking phpmyadmin external access
« Reply #2 on: March 13, 2007, 10:51:37 AM »
I put this in my httpd.conf and it worked for me:

Alias /myadmin /home/e-smith/files/ibays/Primary/myadmin

<Directory "/home/e-smith/files/ibays/Primary/myadmin">
  Options Indexes MultiViews
  AllowOverride none
  order deny,allow
  deny from all
  allow from 192.168.1.0/255.255.255.0  put.your.IP.here/255.255.255.252
  AddType application/x-httpd-php .php
</Directory>

I wanted it to be available from inside the LAN and from home only, and it was (my ISP gives me a 252 subnet).  

You could also put it in a secured ibay, couldn't you?

Offline william_syd

  • *****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Blocking phpmyadmin external access
« Reply #3 on: March 13, 2007, 11:02:09 AM »
Edit /etc/e-smith/templates/etc/httpd/conf/httpd.conf/86Phpmyadminmultialias

Change
allow from all
to
allow from { $localAccess; }

Save
expand the template
restart the web server

Maybe put the template in templates-custom
Regards,
William

IF I give advise.. It's only if it was me....

Offline progitto

  • *****
  • 217
  • +0/-0
    • http://umbertomassari.dyndns.org
Blocking phpmyadmin external access
« Reply #4 on: March 13, 2007, 11:03:59 AM »
I use contrib from MasterSleepy, I'll check if there is some custom template.

Edit: Thanks William, this is the solution!  :pint: