www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

DYNAMIC DNS CUSTOMIZABLE

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> Request a new feature
View previous topic :: View next topic  
Author Message
pgbuz



Joined: 05 Aug 2016
Posts: 38

PostPosted: Fri Sep 02, 2016 7:10 pm    Post subject: DYNAMIC DNS CUSTOMIZABLE Reply with quote

will be fine to have a custom dyndns to connect to the dyndns service we like. It is a big pity that zeroshell has not a dyndns customizable like other routers. Thank you Fulvio Ricciardi. Your is a very good project.
Back to top
View user's profile Send private message
iulyb



Joined: 02 Jun 2016
Posts: 103

PostPosted: Tue Sep 06, 2016 11:05 pm    Post subject: Reply with quote

Hi,
I have a working patch for this. https://github.com/jb68/zeroshell-ui/tree/dyn-dns
This will allow you to specify a template url + username and password. Works well for me with joker.com
You can test here http://www.zeroshell.org/forum/viewtopic.php?p=15266#15266

I didn't publish it yet because there are a few things that needs to be tied in:

1) Design - Current ZS version is basically an iteration from the very first one that supported dyndns and store only limited data. I had to rewrite how data are kept to be more general. This was bigger that I initially thought: https://github.com/jb68/zeroshell-ui/compare/dyn-dns
While is working great on custom mode it need to be checked on legacy modes.
2) Not all providers will have a check url so I had to piggyback on dyndns. This is also a major issue when using net balancer.

3) Split DNS - this happens if you have ZS to host a local authoritative zone. A simple example is having a home.domain.com as a dyn dns and having home.domain.com as an SOA on ZS. In this way nas.home.domain.com will be your NAS. Wink
The original ZS script will use the ZS resolver so if this happens then you will need to update the internal pointer on ZS resolver which is in LDAP.
This is one way to implement this, the other is to use the DNS server from a forwarder. I did it in the first way (updating LDAP) but my feeling is that the other way is more elegant.

4) DynDNS and Net Balancer in balancing mode. Currently there is no way of associating a DynDNS with a connection defined in Net Balancer. Unfortunately the process does the change by accessing a checkIP url in order to get the router IP. Basically in this scenario DynDNS will randomly update to one of the connection.

5) DynDNS and multiple independent GW. Let say we have LAN1, LAN2, WAN1, WAN2 and WAN1 and WAN2 are 2 different IFs without netbalance or failover each having its own dyndns. (personally I don't see this as a likely setup but is possible).

My current version deal with point 1 and 2, I also have some code that address point 3 and nothing for point 4 or 5.
Back to top
View user's profile Send private message
iulyb



Joined: 02 Jun 2016
Posts: 103

PostPosted: Mon Feb 27, 2017 1:12 am    Post subject: Reply with quote

Hi,
After several fixes and some tests I created a patch:
http://jb68.com/pkg/ddns-ZS-3.7.1_1.patch

I think a patch is more flexible.
In order to use it, download and save the patch on
/DB/opt/patch

Then add this line in preboot script:
Code:

cd /root/kerbynet.cgi &&  patch -p0 </DB/opt/patch/ddns-ZS-3.7.1_1.patch
Back to top
View user's profile Send private message
iulyb



Joined: 02 Jun 2016
Posts: 103

PostPosted: Thu Jun 01, 2017 3:06 am    Post subject: Re: one more adjustment plz Reply with quote

Cybernol wrote:
Hi iulyb
Like under line 79
WGET="${WGET/__IP__/$IP}"

now my update URL can look like:
https://__USERNAME__:__PASSWORD__@freedns.afraid.org/nic/update?hostname=__HOSTNAME__&myip=__IP__

And if possible remove this line:
logger -t DDNS "WAN IP=$IP $HOST=$RESOLUTION (no update)"

as it writes an entry in the DDNS log every 30secs or so Wink
Regards
Arnold


Hi Arnold,
This was easy.. I did this changes.
However we cannot merge this branch into master cause I am not using the master to generate a release. Master is used to have an image to current release.

I will also generate a new patch and post it. Also
__USERNAME__:__PASSWORD__@ .. from your url should not be necessary the username and pass are added anyway in the header.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> Request a new feature All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group