Skip to content
View in the app

A better way to browse. Learn more.

Froxlor Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PowerDNS - MySQL - Shared Nameserver

Featured Replies

as far as I can tell froxlor only supports creation of bind named.conf files and doesn't store dns info in the database is that correct?

 

I am needing to store the dns in database as I need other applications to be able to share the dns server and not have entries from the other apps be destroyed or overwritten as changes in froxlor occur (or my below approach would work great with a delete from statement added to it)... I also want to use mysql replication to to keep secondary nameservers synced...

 

what I have done is create a simple bash script that utilizes the zone2sql command and pushes the data into the db and then set this as the bind reload command in froxlor... the table is smart enough not to allow duplicate entries however I would have to handle manual removal of entries.... is there a better way to handle this? perhaps a sql trigger since they are on the same server in different dbs? is anybody else doing anything like this that has some insight?

 

#!/bin/bash

cd /etc/bind 
ZONESQL="USE dns;"$(zone2sql -gmysql) 
echo $ZONESQL | mysql -u userwithwriteaccess -ppasswordhere

as far as I can tell froxlor only supports creation of bind named.conf files and doesn't store dns info in the database is that correct?

 

That's gonna change within the next version. We're working on it.

  • Author

how far along is the next ver? is it built on 0.9 or is it a rewrite?

if its like Alpha status perhaps I should run that and submit bug fixes...

 

if its still a far from that... is the transition from .9.x to 1.0 going to be painfree?

 

I guess in the meantime I will just write some insert and delete triggers to keep the dns data uptodate

the dns-rewrite will make it into the 0.9.x series

  • Author

ok so here is a working delete trigger if anyone is interested

so that bash script for named files along with this should work ok...

i'll probably take the time and write an insert trigger too but this will do fine for now...

 


delimiter $$
CREATE TRIGGER Domain_Delete AFTER delete ON panel_domains
 FOR EACH ROW BEGIN
   set @domain_id = (select id from dns.domains where name = old.domain);
   delete from dns.domains where id = @domain_id;
   delete from dns.records where domain_id = @domain_id;
 END$$

  • Author

this may be better and handle sub domains...

 

delimiter $$
CREATE TRIGGER Domain_Delete AFTER delete ON panel_domains
 FOR EACH ROW BEGIN
IF old.parentdomainid = 0 THEN
     set @domain_id = (select id from dns.domains where name = old.domain);
     delete from dns.domains where id = @domain_id;
     delete from dns.records where domain_id = @domain_id;
   ELSE
     delete from dns.records where name = old.domain;
   END IF;
 END$$

  • Author

maybe something like this for an insert domain trigger

 

i'm sure these triggers could be improved upon but it should work ok without changing existing code base

 

delimiter $$
CREATE TRIGGER Domain_Insert AFTER insert ON panel_domains
 FOR EACH ROW BEGIN
   set @ip = (select ip from panel_ipsandports where id = new.ipandport);
   IF new.parentdomainid = 0 THEN
  insert into dns.domains (name,type) Values(new.domain,"NATIVE");
  set @domain_id = LAST_INSERT_ID();
  insert into dns.records (domain_id, name, type, content, ttl, prio)
   Values(@domain_id, new.domain, "SOA",CONCAT("ns.",new.domain, " ", 
   new.domain, " ", DATE_FORMAT(CURRENT_DATE(), '%Y%m%d'), " 28800 7200 604800 39600"), 86400, 0);
  insert into dns.records (domain_id, name, type, content, ttl, prio)
   Values(@domain_id, new.domain, "NS", CONCAT("ns.",new.domain), 86400, 0);
  insert into dns.records (domain_id, name, type, content, ttl, prio)
   Values(@domain_id, new.domain, "A", @ip, 86400, 0);
  insert into dns.records (domain_id, name, type, content, ttl, prio)
   Values(@domain_id, CONCAT("www.",new.domain), "A", @ip, 86400, 0);
 insert into dns.records (domain_id, name, type, content, ttl, prio)
   Values(@domain_id, CONCAT("*.",new.domain), "A", @ip, 86400, 0);
  IF new.isemaildomain = 1 THEN
       insert into dns.records (domain_id, name, type, content, ttl, prio)
     Values(@domain_id, CONCAT("mail.",new.domain), "A", @ip, 86400, 0);
    insert into dns.records (domain_id, name, type, content, ttl, prio)
     Values(@domain_id, new.domain, "MX", CONCAT("mail.",new.domain), 86400, 10); 
  END IF;
   ELSE
  set @parent_domain = (select domain from panel_domain where id = new.parentdomainid);
  set @domain_id = (select id from dns.domains where name =@parent_domain);
  insert into dns.records (domain_id, name, type, content, ttl, prio)
   Values(@domain_id, new.domain, "A", @ip, 86400, 0);
   END IF;
 END $$

Right now I'm at a point of setting up redundant DNS servers, external to Froxlor boxes, to handle queries for different servers/domains.

 

I'm using PowerDNS with PowerAdmin. PowerAdmin has Templates, so it's pretty easy to move a domain from a server to another.

 

Froxlor multi server support looked very nice, but didn't see any news for a while about this (http://websvn.froxlor.org/browser/Froxlor/branches/multiserver has no updates for about 3 months). Moving a domain/account from a server to another is very handy sometimes ;)

 

Maybe I'll think about reading domain list from Froxlor (I'll use that for a Mail Gateway, to handle all the SPAM/Viruses from a single point and lightning the load on the servers).

 

Regards,

/Sorin

Froxlor multi server support looked very nice, but didn't see any news for a while about this (http://websvn.froxlor.org/browser/Froxlor/branches/multiserver has no updates for about 3 months). Moving a domain/account from a server to another is very handy sometimes ;)

 

yup, sorry, we're only three active developers at this time. Trying to do our best but sadly, we can't do everything at once :P

Yep, I know and really appreciate your work on this project.

 

Personally, I'm trying to help Froxlor with whatever I can do :D

 

Regards,

/Sorin

  • Author

Why would you want to move domains? If you have multiple DNS servers I would think you would want to have all names on all... then define them at the registrar as an NS and also put all on the setup for each domain... it will then hit them in a round robin balancing the load... not to mention redundancy... unless you have an unreal amount of traffic hitting them(unless you're running dns for hundreds of thousands of sites), and even in that case you would want each domain still on two servers...

 

 

just my two cents

  • Author

yup, sorry, we're only three active developers at this time. Trying to do our best but sadly, we can't do everything at once :P

 

If you're looking for more developers I may be interested in a couple months... the hosting company I'm starting is planning on using froxlor as our primary shared hosting CP so it would be in my best interest to assist as much as possible...

Sometimes you (the "hoster") will need to switch/move server (maybe switch from CPanel/Plesk to Froxlor :) ) for one or more domains (not all the domains on that server), and you have no access to NS control panel at registrar.

 

In this case, you won't change NS at registrar, just update your records :)

 

Seems logical to me :)

 

Regards,

/Sorin

  • Author

Sometimes you (the "hoster") will need to switch/move server (maybe switch from CPanel/Plesk to Froxlor :) ) for one or more domains (not all the domains on that server), and you have no access to NS control panel at registrar.

 

In this case, you won't change NS at registrar, just update your records :)

 

Seems logical to me :)

 

Regards,

/Sorin

 

Right so I'm still confused to why you would migrate from one nameserver to another... i would think that it would stay on the same nameservers and that all your panels would share...

Right now I have clients on Plesk servers, and I'm trying to move to Froxlor.

I can't move them all at once, so I have to move them to new NSs.

 

Taking in consideration my previous problems I had, I'm thinking about this solution.

This will allow to move/switch/replace any server, partially or not, and allowing a mixed solutions with any control panel.

 

Regards,

/Sorin

  • Author

Yes with this you could...

 

implement this on the froxlor server...

do a sql dump or use zone2sql(if using bind) on the plesk/cpanel boxes...

import the cpanel/plesk into the powerdns server

then you can move as needed the clients and do whatever with the box

 

or you could implment this

create a user@plesk/cpanelserver on the froxlor boxes mysql

tell it to push directly there if already using the mysql back end

Archived

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.