HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   IPv6 support (http://www.howtoforge.com/forums/showthread.php?t=51778)

clearminds 8th March 2011 00:55

IPv6 support
 
Hia,

Have anyone come anywhere with the IPv6 support a bit longer?

Or should i start coding along on my own plugin to handle it?
My basic idea is to do the following.

Code:

$result = mysql_query("SELECT domain_id as did, sys_groupid as cid FROM web_domain");
while ($row = mysql_fetch_array($result)) {
    exec("/sbin/ip addr add dev eth0 your:net:goes:here:c".$row["cid"]."::".$row["did"]);
}

The basic idea is to just put up the IPs that the sites uses and automatically add the needed file on apache for the Vhost part - for the domain that it is all about.

So really just copy the config file that already have been created.
Change the IP to IPv6 address, change logfile to a -ipv6 logfile to trace special IPv6 use.

The DNS part should be handled by your self but it could be added to this plugin too. But it is hard for that one to know for what domains to create AAAA records, could add it for the basic one (that the domain is created for) and then you could just copy that one to the other once that you self want.

My question is really, can I hook a plugin into running each time the server.php runs.
And in that case how can I check if a domain have been modified so I may have to update the IPv6 address also.

So to make it short.
Every site should get an autogenerated IPv6 address. based on ClientID and DomainID.

Best Regards
Daniel

till 8th March 2011 09:14

IPv6 support will be released as part of ISPConfig 3.0.4

Quote:

My question is really, can I hook a plugin into running each time the server.php runs.
Yes, tahst the way the plugins work. Every function in the ispconfig server is implemented as plugin. See e.g. the apache plugin as example.

Quote:

And in that case how can I check if a domain have been modified so I may have to update the IPv6 address also.
The plugin is pnly called in case that something has been modified and the plugin gets the modified data as array. So never access the database directly from a plugin as this might break the transaction mechanism and so mess up your server setup.

clearminds 8th March 2011 09:30

Ok, so it's not that far off then.

Question is if it will do what i am after, add one unique ipv6 address auto to each vhost.

The line i shows you there is from vootup to put up all already configured vhosts ips.

till 8th March 2011 09:38

Quote:

Question is if it will do what i am after, add one unique ipv6 address auto to each vhost.
We planned to add the ability to configure the IPv6 address trogh the interface an dnot to assign it automatically.

clearminds 8th March 2011 20:06

Ok, cool, then i will try and code my own plugin that handles the auto adding of ipv6 instead.
Is the base code for ipv6 ghosts in svn yet so i can see how it is planned to be handled?

My plan is for ipbasednvhosts is to add ipv4 and ipv6 to the virtualhost tag in the apache config.

Is this the same way you are planning to do it? Or will you create separate files for ipv6 and ipv4?

Would be nice to be as compatible with stock function as possible.

Best regards
Daniel

till 8th March 2011 20:10

Quote:

Is the base code for ipv6 ghosts in svn yet so i can see how it is planned to be handled?
Not yet. WE will start with the new ipv6 code after the 3.0.3.3 release.

Quote:

Is this the same way you are planning to do it? Or will you create separate files for ipv6 and ipv4?
We will use one file. But the way we write the file will be changed, instead of having a ssl section and non ssl sectin plus the ipv6 sections, we will use the loop function of the template system to simplify the creation of the file.


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

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