Jump to content
Froxlor Forum
  • 0

[merged] IPv6 Dualstack (Apache, Bind)


lowb1rd

Question

I dont't know much about Froxlor 1.0 or any developments regarding the dualstack support.

 

It seems to me that there is not too much of a progress so I took myself a little time to think about adding dualstack support to Froxlor.

 

The idea: Accept Dualstack-IPs by adding an IPv4 and IPv6 address seperated by a space. This requires to alter the VARCHAR-Length of the IP in panel_ipsandports in the database.

 

ALTER TABLE `panel_ipsandports` CHANGE `ip` `ip` VARCHAR( 55 ) NOT NULL DEFAULT ''

 

Here is the patch. I'm testing this right now and it seems to work OK. However, it might break parts of Froxlor I'm not using so this needs further testing. The patch only takes care of Apache and Bind config creation. Ngix and Lighttpd is untouched and therefore probably broken.

 

A dualstack Apache vhost container looks like this:

 

<VirtualHost 127.0.0.1:80 [::1]:80>
 [..]
</VirtualHost>

 

froxlor_ipv6_ipandport.gif

froxlor_ipv6_ipandport2.gif

 

Unless I oversee some mayor thing, this doesn't seem too complicated to me. Any comments on this are most welcome, so we might eventually have dualstack support in Froxlor in 2012 :)

 

 

(I couldn't decide where to put that format_ipport() function yet)

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

lighttd, nginx, exim and a few others I could handle. The problem is that just about every daemon that binds to an IP that is supported by frox is going to be impacted with this move. That means a lot of debugging and recoding. ATM I only use Frox for webserver control. All else I am running across a secured DB connection and letting my DNS, mail and other services do automated setups and controls that way. I am bringing a test/dev system up sometime this week so will be more able to support other portions soon.

Link to comment
Share on other sites

I have cloned

https://github.com/tilman19/Froxlor

and it's running live now for like 2 or 3 months.

 

I have also downloaded 0.98-rc1 and copied the files over because I thought that this multistack patch was in rc1

however it wasn't

 

the above version is 0.98-svn6 with the multistack patch

it's working great except and you add an IP the vhost file isn't recreated, you have to change the path and change it back so a recreate event fires

 

excuse my bluntness but why isn't this excellent patch in 0.98-rc1 yet?

and how could I contact tilman19? because you can't create issues on a fork on github.

Link to comment
Share on other sites

ok thank you :) I guess tilman19 is the key and solution.

I'd like to stay with the official version because it's maintained.

this modification works (for my needs, no local dns) but it could be improved upon.

I see he posted in this thread, I'll send him a message.

Link to comment
Share on other sites

Hi,

just discovered that Froxlor is active again, so here?s my answer to the public and not only dalu!  :) 
Very nice to hear that my solution is in production on other sites as well! 
In the last month I was quiet busy, I?m really sorry.
I can make a pull request, the problem is, it?s just not finished yet, as there are at least three things to do:

1. Adjust the lighttpd config. The current one won?t do anything once the database is converted to multistack.
2. I got an error when creating a new domain, I believe it was when I had froxlor create a standard subdomain.
3. As you mentioned, configs are not rewritten when changing IPs. You can hit "Recreate Config Files" as workaround.


At least 1 and 2 definitely need to be fixed before any release. Not hard problems, but especially No 1 will take quiet some time.
Apache config was relatively easy, nginx was more work, and lighttpd seems to be similar to nginx in the way the configs are written.
So a lot of code has to be moved around to work. Nginx could be the base to copy from for this patch.

Also there where many code duplications in the code. I did not clean it up but just added my code in between,

so there are now even more duplicates. 

The patches in Redmine should be git-Patches, but I can also make a pull request on github,
but before release somebody has to finish it!
So just let me know how I should proceed!!!


Here everything is running fine, no bugs for me so far. And as mod-log-sql is dropped I may as well stick to my current Froxlor, as I
got a pretty special dual-server setup that needs mod-log-sql for awstats, see http://forum.froxlor.org/index.php?/topic/1661-/?p=22296
for more information on that.

Hope this helps for now!

 Tilman

Link to comment
Share on other sites

I have also been digging into this for quiet a while and looked into it more after I read your post. I?m no dev and I?m realy into Git and this kind.

But as far as I see Froxlor 1.0 is still in early phase of developement (APIs not finalized, ...).

But there is a patch on the way (not finalized yet) for froxlor 0.9 (See Bugtracker).

 

Your solution may work as well, and as most services do not grab their IP out the MySQL-database there are actually not many conflicts in terms of binding,

maybe some of the example config files need to be parsed differently, no big deal.

 

Personaly I see your solution as a nice quick hack, ignoring one of the big benefits of IPv6: A lot of IP adresses. Your server may get 1 IPv4 adress, but

a whole subnet on v6. It?s now finaly possible for everyone to offer SSL-Hosting, as every customer/domain can have 1 IP(v6). (At the end froxlor should

be able to add IPs to the network interface itself!). With your solution I now end up setting a fixed combination of IPv4 and IPv6 for every customer, causing

a lot of work when the IPv4 Adress should change for whatever reason.

 

The solution that is worked on in the multistack branch in Git is more flexibel.

I put this on a testing system, and the IP Selection already looks realy nice:

544Froxlor_Multistack.png

 

The basis is made with a many-to-many relationship table `domain_to_ip`. This is the most proper solution I can think of.

And in my opinion we should focus on getting this solution to work at best till World IPv6 Launch Day on June 6th.

 

Most probably I won?t have time till begining of march to work myself in the sources and froxlor specific apis, but I may well be able to get some nice

SQL-statements that only need to be converted to config-files. And that can?t be to difficult, the apache-config is pretty simple, and froxlor also can

handel AAAA Records with bind.

 

Looking forward to provide IPv6 Support on June 6th!

Link to comment
Share on other sites

I'm working on dual stack without problems with the simple patch from here: http://redmine.froxlor.org/issues/177 (see my last comment)

 

I think this solution (using alias domains) is simple but effective, and requires nothing but this single patch in one file (per http daemon).

 

It shouldn't be too hard to make it work with other http daemons light lighttpd, but I just don't know have the expertise for these.

 

Stefan

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...