Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 28th August 2012, 12:05
radim_h radim_h is offline
Senior Member
 
Join Date: Jan 2007
Location: Prague, Czech
Posts: 420
Thanks: 33
Thanked 24 Times in 19 Posts
Send a message via ICQ to radim_h
Default howto - disable default remote access to sql, enable webserver access automatically

Maybe someone can use this
.
I have multiserver setup, where Database server is different then webserver
server1: ISPConfig webinterface, DNS, oldwebserver
server2: mailserver, dbserver

When you add Database in Sites=> Database menu, there is Remote Access IPs field (separate by , and leave blank for any)

I don't like that access to mysql server is enabled by default from anywhere. Want to explicitly allow all accessing IPs . And i also need webserver to have allowed access to DB by default (my clients will never know what to fill into that field)

It's easy:
On Database server edit file
/usr/local/ispconfig/server/plugins-available/mysql_clientdb_plugin.inc.php

and change
//if(trim($host_list) == "") $host_list = '%';
to
if(trim($host_list) == "") $host_list = '1.2.3.4';

and also change
//if(!is_array($host_list)) $host_list = explode(',', $host_list);
to
if(!is_array($host_list)) {$host_list = split(',', $host_list); $host_list[] = '1.2.3.4';}

where 1.2.3.4 is adress of your webserver (or any server you want to allow acces to by default)

You can check result in Privileges table in phpMyAdmin

Last edited by radim_h; 28th August 2012 at 12:10.
Reply With Quote
Sponsored Links
  #2  
Old 28th August 2012, 12:50
Croydon Croydon is offline
ISPConfig Developer
 
Join Date: Jul 2007
Location: Koblenz, Germany
Posts: 932
Thanks: 16
Thanked 262 Times in 208 Posts
Default

In current svn version (3.0.5) the web-server that the database is assigned to is automatically added to the remote ips.
Please do NOT use php function split as it is highly deprecated! Use explode instead.
__________________
Marius Cramer

pixcept KG
Reply With Quote
  #3  
Old 28th August 2012, 12:51
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,395
Thanks: 833
Thanked 5,490 Times in 4,322 Posts
Default

Quote:
When you add Database in Sites=> Database menu, there is Remote Access IPs field (separate by , and leave blank for any)

I don't like that access to mysql server is enabled by default from anywhere. Want to explicitly allow all accessing IPs . And i also need webserver to have allowed access to DB by default (my clients will never know what to fill into that field)
There is no default access from everywhere. This field is used in combination with the remote access checkbox only, so the ddefault is that databases can be accessed from localhost only and not from everywhere.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #4  
Old 28th August 2012, 13:29
radim_h radim_h is offline
Senior Member
 
Join Date: Jan 2007
Location: Prague, Czech
Posts: 420
Thanks: 33
Thanked 24 Times in 19 Posts
Send a message via ICQ to radim_h
 
Default

sorry, didn't see that checkbox, i'm using modified template...
.. happy is integrated in 3.0.5, i will not need change code after update
Reply With Quote
Reply

Bookmarks

Tags
access, multiserver, mysql

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
phpmyadmin error lifeisboost Installation/Configuration 9 14th August 2008 19:19
Can't start apache Musty Server Operation 12 9th March 2008 13:58
Default Mail scan settings for new users timehost Installation/Configuration 3 26th October 2007 12:05
Exim MTA dazblade Server Operation 4 16th July 2007 18:42
setup fails on debian 3.1 dtrumbower Installation/Configuration 7 7th March 2006 13:42


All times are GMT +2. The time now is 23:43.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.