IPv6 support

Discussion in 'Developers' Forum' started by clearminds, Mar 8, 2011.

  1. clearminds

    clearminds New Member


    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.

    $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
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    IPv6 support will be released as part of ISPConfig 3.0.4

    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.

    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.
  3. clearminds

    clearminds New Member

    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.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    We planned to add the ability to configure the IPv6 address trogh the interface an dnot to assign it automatically.
  5. clearminds

    clearminds New Member

    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
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Not yet. WE will start with the new ipv6 code after the release.

    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.

Share This Page