Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Developers' Forum

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 13th March 2012, 02:24
desanidesigns desanidesigns is offline
Junior Member
 
Join Date: Mar 2012
Posts: 10
Thanks: 2
Thanked 1 Time in 1 Post
Question Remote Users, Adding a Client

I've been trying to get the 'client_add' remoting option to work as I would expect, but maybe I'm expecting too much.

Trying to add a new client, I am setting the following variables:
PHP Code:
$params = array(
"company_name" => $client_data['companyname'],
"contact_name" => $client_data['firstname']." ".$client_data['lastname'],
"username" => $details['option1']['value'],
"password" => $details['option3']['value'],
"language" => "en",
"usertheme" => 'default',
"street" => $client_data['address1']." ".$client_data['address2'],
"zip" => $client_data['postcode'],
"city" => $client_data['city'],
"state" => $client_data['state'],
"country" => $client_data['country'],
"telephone" => $client_data['phonenumber'],
"mobile" => "",
"fax" => "",
"email" => $client_data['email'],
"internet" => $client_data['domainname'],
"icq" =>"",
"notes" => $client_data['notes'],
"default_webserver" => $options['option3']['value'],
"default_mailserver" => $options['option3']['value'],
"default_dnsserver" => $options['option3']['value'],
"default_dbserver" => $options['option3']['value'],
"limit_web_ip" => $options['option2']['value'],
"template_master" => $options['option1']['value']); 
What isn't working as expected, is the "limit_web_ip." What I am expecting is that when the user creates a new site, they will only be able to use the IP I set in this field, assuming it is one of the server's configured IP addresses. Am I correct?

If yes, it is not working properly. The user can still select the asterisk or any of the IP addresses assigned to the server. How do I resolve this?

If I am incorrect, is there any functionality built in that would allow this restriction?

Thanks
Reply With Quote
Sponsored Links
  #2  
Old 13th March 2012, 09:38
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,413
Thanks: 834
Thanked 5,498 Times in 4,328 Posts
Default

Quote:
What isn't working as expected, is the "limit_web_ip." What I am expecting is that when the user creates a new site, they will only be able to use the IP I set in this field, assuming it is one of the server's configured IP addresses. Am I correct?
Youre wrong, the Limit you are searching for is set in the server_ip database table and not in the client table. See ispconfig interface: System > Server IP, there you assign the IP addresses to a client.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 13th March 2012, 15:03
desanidesigns desanidesigns is offline
Junior Member
 
Join Date: Mar 2012
Posts: 10
Thanks: 2
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by till View Post
Youre wrong, the Limit you are searching for is set in the server_ip database table and not in the client table. See ispconfig interface: System > Server IP, there you assign the IP addresses to a client.
I understand how to do all this manually; I need it done automagically. Is there any way to assign an IP to a client using the remoting framework?
Reply With Quote
  #4  
Old 13th March 2012, 16:21
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,413
Thanks: 834
Thanked 5,498 Times in 4,328 Posts
Default

The functions to add / edit / delete server IP adresses have been added in the svn stable branch. I've added the chnaged files.

You can get the SVN stable release with:

svn export svn://svn.ispconfig.org/ispconfig3/branches/ispconfig-3.0.4

the required files are:

interface/lib/classes/remoting.inc.php
interface/web/admin/lib/remote.conf.php

Copy these files into your ispconfig installation, then enable the new functions in the remote user. The function names are:

server_ip_get, server_ip_update and server_ip_delete
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 13th March 2012, 17:24
desanidesigns desanidesigns is offline
Junior Member
 
Join Date: Mar 2012
Posts: 10
Thanks: 2
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by till View Post
The functions to add / edit / delete server IP adresses have been added in the svn stable branch. I've added the chnaged files.

You can get the SVN stable release with:

svn export svn://svn.ispconfig.org/ispconfig3/branches/ispconfig-3.0.4

the required files are:

interface/lib/classes/remoting.inc.php
interface/web/admin/lib/remote.conf.php

Copy these files into your ispconfig installation, then enable the new functions in the remote user. The function names are:

server_ip_get, server_ip_update and server_ip_delete
I will check it out. Will this allow me to specify multiple clients per IP address or is it limited to 1 per IP? What I want to avoid is someone being able to select the asterisk when they're adding domains.

Edit: After changing all the domains to the asterisk, aside from those needing their ssl cert, nothing went awry. Must have been a misconfig on my part somewhere else causing the issue.

Last edited by desanidesigns; 13th March 2012 at 17:40.
Reply With Quote
  #6  
Old 13th March 2012, 17:27
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,413
Thanks: 834
Thanked 5,498 Times in 4,328 Posts
Default

In ISPConfig a IP address is either visible to all clients (if no client is assigned to the IP) or one client.

Quote:
What I want to avoid is someone being able to select the asterisk when they're adding domains.
The asterisk is a wildcard and not a IP, so its not affected by IP settings. The asterisk is always visible to all clients. Normally you would use the asterisk for all websites and assign only IP addresses to specific clients that need a sl website.

A function to disable the * wildcard will be availble in ISPConfig 3.0.5 as you can see in the roadmap:

http://bugtracker.ispconfig.org/inde...1977&project=3
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
desanidesigns (13th March 2012)
  #7  
Old 13th March 2012, 17:31
desanidesigns desanidesigns is offline
Junior Member
 
Join Date: Mar 2012
Posts: 10
Thanks: 2
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by till View Post
In ISPConfig a IP address is either visible to all clients (if no client is assigned to the IP) or one client.



The asterisk is a wildcard and not a IP, so its not affected by IP settings. The asterisk is always visible to all clients. Normally you would use the asterisk for all websites and assign only IP addresses to specific clients that need a sl website.

A function to disable the * wildcard will be availble in ISPConfig 3.0.5 as you can see in the roadmap:

http://bugtracker.ispconfig.org/inde...1977&project=3
I did see that in the roadmap. I believe what I ran into before is that when I selected the * for a domain, it messed with sites that didn't have the * and would show the wrong site. Say I went to www.a.com, it would show www.b.com.
Reply With Quote
  #8  
Old 13th March 2012, 17:40
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,413
Thanks: 834
Thanked 5,498 Times in 4,328 Posts
Default

Quote:
Originally Posted by desanidesigns View Post
I did see that in the roadmap. I believe what I ran into before is that when I selected the * for a domain, it messed with sites that didn't have the * and would show the wrong site. Say I went to www.a.com, it would show www.b.com.
The problem is that a IP address is priorized in favor of a wildcard by apache. But this can be avoided by the correct IP setup:

1) Create a "fake" client account and assign it the "main" ip which is internally used for all sites with *. So there is no site where this IP address is selected directly,all sites that point in DNS to this IP use * instead.

2) All websites that dont use SSL use *. The clients have no other choice then using * as there are no other IP's active on the server 'globally' and the only other IP is assigned to the fake client.

3) If you add a ssl site that requires a separate IP, add this new ip under system > Server IP and assign it to the client that owns this sl site. So this IP will only show up for him and no other customers.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
desanidesigns (13th March 2012)
  #9  
Old 13th March 2012, 22:47
desanidesigns desanidesigns is offline
Junior Member
 
Join Date: Mar 2012
Posts: 10
Thanks: 2
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by till View Post
The functions to add / edit / delete server IP adresses have been added in the svn stable branch. I've added the chnaged files.

You can get the SVN stable release with:

svn export svn://svn.ispconfig.org/ispconfig3/branches/ispconfig-3.0.4

the required files are:

interface/lib/classes/remoting.inc.php
interface/web/admin/lib/remote.conf.php

Copy these files into your ispconfig installation, then enable the new functions in the remote user. The function names are:

server_ip_get, server_ip_update and server_ip_delete
In the SVN I wasn't able to find any examples or API docs on these functions. I'm guessing the usage is:
Code:
$params = array("server_id" => 1);
server_ip_get($session_id, $params)

Returned is a multidimensional array containing the information from the server_ip table.
Is this correct?
Reply With Quote
  #10  
Old 13th March 2012, 23:06
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,413
Thanks: 834
Thanked 5,498 Times in 4,328 Posts
 
Default

The usage on all functions is similar. So if you refer to one of the _get functions, then you can pass an array as parameter to search or select values.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Tags
api, remote, remote users, remoting framework

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
Need help with ISPConfig Mail and Squirrelmail m.xander Installation/Configuration 109 3rd February 2012 00:15
Can't access to my website - after install problem pallermo Installation/Configuration 18 4th June 2010 13:29
Remote Framework - Client Add - Ispconfig 3 Germanius General 5 23rd December 2009 18:16
Strato Server - Restoring with SystemImager popper2001 HOWTO-Related Questions 5 28th July 2007 10:18
Creating image with Systemimager cuongtim HOWTO-Related Questions 3 18th November 2006 13:55


All times are GMT +2. The time now is 14:11.


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