Project

General

Profile

Feature #7493

Use inadyn as DDNS backend to support more providers

Added by Ben Whitman almost 4 years ago. Updated 11 months ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
Vladimir Vinogradenko
Category:
GUI (new)
Target version:
Estimated time:
Sprint:
Severity:
New
Backlog Priority:
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Description

Google Domains recently opened up their services publicly in the US, and they offer Dynamic DNS. It would be nice if it could be added to the list of DDNS providers. They utilize the dyndns2 protocol, and all relevant information can be found here: https://support.google.com/domains/answer/6147083.

DDNS_log.png (57.7 KB) DDNS_log.png Anonymous, 05/02/2016 03:19 AM
5871

Associated revisions

Revision fa9ce189 (diff)
Added by Vladimir Vinogradenko about 1 year ago

Switch inadyn-mt to https://github.com/troglobit/inadyn

Ticket: #7493

Revision 77d16033 (diff)
Added by Vladimir Vinogradenko about 1 year ago

Switch inadyn-mt to https://github.com/troglobit/inadyn

Ticket: #7493

Revision e7c2a7da (diff)
Added by Dru Lavigne about 1 year ago

Add framework for new DDNS fields. Still need to add descriptions.
Ticket: #7493
Ticket: #20908

Revision 45b8b3be (diff)
Added by Dru Lavigne about 1 year ago

Input descriptions for new fields.
Ticket: #7493
Ticket: #20908

History

#1 Updated by Jordan Hubbard almost 4 years ago

  • Category set to 2
  • Assignee set to Erin Clark
  • Target version set to 133

#2 Updated by Erin Clark almost 4 years ago

  • Status changed from Unscreened to Screened

#3 Updated by Ben Whitman over 3 years ago

I believe FreeNAS uses inadyn as its DDNS backend, is that correct? If so, it would seem that google domains DDNS support was added in December, so you'll probably need a build that's at least that recent. https://github.com/troglobit/inadyn/commit/ee7340e817354d387f4275e8c167161b45ee81f0

#4 Updated by Anonymous over 3 years ago

  • Priority changed from Nice to have to No priority

#5 Updated by Anonymous over 3 years ago

  • Due date set to 05/15/2015

#6 Updated by Anonymous over 3 years ago

  • Target version changed from 133 to Unspecified

BRB: This is actually much easier to do in 9.3, and we'll bring it into 10 at some point in the future.

#7 Updated by Erin Clark over 2 years ago

  • Target version changed from Unspecified to 49

I keep thinking this will be easy but then find it is more difficult since you have to do alot of script fu around inadyn-mt to make it work, I'm going to mark this as Future until inadyn-mt natively supports SSL and whatnot to make this work

#8 Updated by Ben Whitman over 2 years ago

No rush from me, I ended up just paying for a static IP from my ISP. Managed to get one out of the last block they're ever going to get from ARIN, so lucky me...

#9 Updated by Anonymous over 2 years ago

Hi Jordan,
I looked into this feature request.
Its about using dynamic DNS service provided by domains.google.com.
domains.google.com is a paid service. Also, this service is not available in India.
Do you have any domain name registered for testing purpose on domains.google.com or any idea how to bypass this mandatory requirement.

Thanks
Rajesh Kaushal

#10 Updated by Ben Whitman over 2 years ago

I do have a registered domain with Google domains that I'd be happy to let you test with. Shoot me an email qwertymodo at qwertymodo dot com.

#11 Updated by Mathew Keith over 2 years ago

Rajesh Kaushal wrote:

Hi Jordan,
I looked into this feature request.
Its about using dynamic DNS service provided by domains.google.com.
domains.google.com is a paid service. Also, this service is not available in India.
Do you have any domain name registered for testing purpose on domains.google.com or any idea how to bypass this mandatory requirement.

Thanks
Rajesh Kaushal

I will second this offer. rommy at appus dot org

#12 Updated by Anonymous over 2 years ago

5871

1. FreeNAS 9.10 already has updated Inadyn-mt which contains google DDNS support.
2. We configued Stunnel on FreeNAS 9.10. (Stunnel Configuration Given Below.)
3. We changed the FreeNAS GUI to add otion of domains.google.com in the FreeNAS DDNS service.
4. The Inadyn configuration ( arguments ) is different from existing DDNS service providers. The google reference doc was not clear on required commandline options. We figured it out after many trials. The working options given below.

--dyndns_system  --ip_server_name localhost:8081/. --update_period_sec 60 --background --syslog --username SwiZ0hXKbb1L6Ygo --password ilBs9zi1moIYoH9C --alias test1.qwertymodo.com

5. The Inadyn seems to be working and trying to connect google via Stunnel.

Log Message:
--------------------

Apr 14 22:28:33 freenas notifier: Thu Apr 14 22:28:33 2016: W:MAIN: Main: Error 'RC_CMD_PARSER_INVALID_OPTION' (0x50).
Apr 14 22:30:06 freenas notifier: Starting inadynmt.
Apr 14 22:30:06 freenas notifier: Thu Apr 14 22:30:06 2016: W:LANG: Cannot open language file. Will use english defaults, or default override (--lang_file <path/file_name>...)
Apr 14 22:30:06 freenas notifier: Thu Apr 14 22:30:06 2016: S:INADYN: Could not open default servers_additional.cfg. Will try svr_add_cfg option, if set...
Apr 14 22:30:06 freenas notifier: Thu Apr 14 22:30:06 2016: W:CMD_OPTS: Could not open default override language strings file, inadyn-mt/lang/en.lng...
Apr 14 22:30:06 freenas notifier: Thu Apr 14 22:30:06 2016: S:INADYN: Started 'inadyn-mt version 02.24.47' - dynamic DNS updater.
Apr 14 22:30:06 freenas notifier: Thu Apr 14 22:30:06 2016: E:CACHE_LIST Failed opening cache file in ip_cache_list_read...
Apr 14 22:30:06 freenas stunnel: LOG57: Service [psuedo-httpd] accepted connection from 172.XX.XX.118:54970
Apr 14 22:30:06 freenas stunnel: LOG37: s_connect: connect 2404:6800:4007:800::200e:443: No route to host (65)
Apr 14 22:30:06 freenas kernel: <118>Apr 14 22:30:06 freenas stunnel: LOG37: s_connect: connect 2404:6800:4007:800::200e:443: No route to host (65)
Apr 14 22:30:09 freenas stunnel: LOG57: s_connect: connected 216.58.197.78:443
Apr 14 22:30:09 freenas stunnel: LOG57: Service [psuedo-httpd] connected remote server from 172.XX.XX.118:51415
Apr 14 22:30:09 freenas stunnel: LOG57: Connection closed: 88 byte(s) sent to SSL, 641 byte(s) sent to socket
Apr 14 22:30:09 freenas notifier: Thu Apr 14 22:30:09 2016: E:INADYN: ip parse failed in check_my_ip_address...
-----------------------

Above log shows that connection is established to google via STUNNEL.

6. To test this, we need a environment with public IP (DHCP) to host a test web page and then access that page via Google DDNS.
Or
If someone has such environment, this ccan be tested.

STUNNEL Configuration:
--------------------------
Stunnel on FreeBSD

Since stunnel is already installed on the freeBSD, we will use that only
cd /usr/local/etc/stunnel/
cp stunnel.conf-sample stunnel.conf
openssl genrsa -out privkey.pem 2048
openssl req -new -x509 -key privkey.pem -out cacert.pem -days 365
chmod 600 cacert.pem
chmod 600 privkey.pem
Change /usr/local/etc/stunnel/stunnel.conf as below,
And invoke below command

cd /var/run
mkdir -p stunnel
chown stunnel:stunnel stunnel
chmod 0622 stunnel

-----------------------------------------
Now edit the /usr/local/etc/stunnel/stunnel.conf

cert = /usr/local/etc/stunnel/cacert.pem
key = /usr/local/etc/stunnel/privkey.pem
chroot = /var/run/stunnel
client = yes
; It is recommended to drop root privileges if stunnel is started by root
setuid = stunnel
setgid = stunnel
pid = /stunnel.pid

; Some debugging stuff useful for troubleshooting
;debug = 7
output = /var/log/stunnel.log

[psuedo-httpd]
accept = 8081
connect = domains.google.com:443

Add below lines also in /etc/rc.conf:
------------------------------------------
stunnel_enable="YES"
stunnel_pid_file="/var/run/stunnel/stunnel.pid"
------------------------------------------

=-=-=-=-=-=-=-=-=-=
To add google name in the DDNS options.

  1. mount -uw /
  2. python manage.py schemamigration services --auto
  3. python manage.py migrate services
  4. service django restart
    Add this line in choices.py:
    ('', 'domains.google.com'),
    and run above command

=-=-=-=-=-=-=-=-=-=

#13 Updated by Ben Whitman over 2 years ago

I have a few web servers running on a public IP, and my FreeNAS box is running the latest 9.10-STABLE. Give me a bit to try setting this all up and I'll give it a try. Though, really, you don't even need a web service. Just run the inadyn command, flush your DNS cache, then do a lookup to see if the record changed.

#14 Updated by Ben Whitman over 2 years ago

Rajesh, I've been trying to replicate your configuration, and have run into quite a few issues. Several pertain to permissions. For instance:

cd /var/run
mkdir -p stunnel
chown stunnel:stunnel stunnel
chmod 0622 stunnel

The last one should be chmod 0722 stunnel, otherwise stunnel doesn't have write permissions to create the pid file.

Also, you have to create the stunnel user in order for any of this to work. It looks like FreeNAS tends to run its services as root, as evidenced by the fact that basically everything in /var/run is owned by root:wheel, but that's more of an implementation detail for if this actually gets worked in officially.

Also, there are issues with the /usr/local/etc/rc.d/stunnel file. For one, you need to change the pidfile line to match the one you configured. Currently, I'm still having issues where I can issue service stunnel start and it will start, but then service stunnel status/stop/restart all think that stunnel isn't started, so there's still an issue there.

Anyway, having done all of that, trying to run inadyn manually with the parameters you posted just gives me an error

[root@freenas] /var/run/stunnel# inadyn-mt --dyndns_system --ip_server_name localhost:8081/. --update_period_sec 60 --background --syslog --username SwiZ0hXKbb1L6Ygo --password ilBs9zi1moIYoH9C --alias test1.qwertymodo.com
Wed May 11 12:41:57 2016: W:LANG: Cannot open language file. Will use english defaults, or default override (--lang_file <path/file_name>...)
Wed May 11 12:41:57 2016: S:INADYN: Could not open default servers_additional.cfg. Will try svr_add_cfg option, if set...
Wed May 11 12:41:57 2016: W:GETCMD: Error parsing option 2 ('--dyndns_system')

and then displays the usage, which then clearly lists --dyndns_system as a valid option

Parameters:
. . .
'--dyndns_system': [NAME] - optional DYNDNS service type. SHOULD be one of the following:
. . .
-For domains.google.com: (requires SSL bridge, like stunnel)

so I'm not sure why it won't take it. I'm running the latest FN 9.10-STABLE.

#15 Updated by Anonymous over 2 years ago

Hi Ben,

Ravi Tripathi will reply in this defect.

Rajesh

#16 Updated by Anonymous over 2 years ago

Hi Ben,

We need to create the stunnel user first from FreeNAS itself before stunnel configuration. We created a stunnel user in our setup too. But, we missed to mention this in our last update over the bug.

Yes, it requires the permission ( 0722) so that it can create the PID file. But, we skipped this pid file creation in our testing to make things work initially.

PID file creation is the ideal way to configure the setup, which we have mentioned in our document for this defect. We will share it once this feature is complete.

Can we have your setup and details over an email so that we can look into these issues you are having? Since this was working in our setup, surely we can fix this and provide further detailed document.

Just a thought- Since Google DDNS mandate to have stunnel setup & configuration, we can provide the configuration options from FreeNAS UI itself to make the things more user-friendly, please suggest.

Regards,
-Ravi

#17 Updated by Anonymous over 2 years ago

Hi Ben,

Please let me know if i can help in this, Thank you !!

-Ravi

#18 Updated by Ravi Tripathi about 2 years ago

Hi Ben,
I have done the configuration already, Please do let me know if i can provide the details, Thanks

-RT

#19 Updated by Steve Seaney about 2 years ago

Please let me know if I can assist with testing, etc. I would like to see the feature request implemented.

#20 Avatar?id=14398&size=24x24 Updated by Kris Moore about 2 years ago

  • Priority changed from No priority to Nice to have
  • Target version changed from 49 to 9.10.2

#21 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 2 years ago

  • Target version changed from 9.10.2 to 9.10.2-U1

#22 Avatar?id=14398&size=24x24 Updated by Kris Moore almost 2 years ago

  • Target version changed from 9.10.2-U1 to 9.10.3

#23 Avatar?id=14398&size=24x24 Updated by Kris Moore over 1 year ago

  • Target version changed from 9.10.3 to 9.10.4

#24 Updated by Ravi Tripathi over 1 year ago

@Jordan , @Kris, Can you assign the ticket to me, if feasible. I had configured and tested this long back,Please suggest, Thanks

#25 Avatar?id=14398&size=24x24 Updated by Kris Moore over 1 year ago

It won't let me assign to you, however you are welcome to submit a pull request and we'll get it in for you!

#26 Updated by Ravi Tripathi over 1 year ago

Sure Kris, I will create the config document and pull request for the fix, Thanks so much :)

Regards,
-RT

#27 Updated by Ravi Tripathi over 1 year ago

Ravi Tripathi wrote:

Sure Kris, I will create the config document and pull request for the fix, Thanks so much :)

Regards,
-RT

Oops , Seems that test1.qwertymodo.com provided by Ben is not working now or gone.

@Ben , @Mathew Keith or anyone share if he has Google domain registered?

Regards,
-RT

#28 Updated by Ben Whitman over 1 year ago

Shoot me another email and I'll set it back up. My address is listed above.

#29 Avatar?id=14398&size=24x24 Updated by Kris Moore over 1 year ago

  • Assignee changed from Erin Clark to Suraj Ravichandran

#30 Avatar?id=14398&size=24x24 Updated by Kris Moore over 1 year ago

  • Target version changed from 9.10.4 to 11.1

#31 Updated by Dru Lavigne about 1 year ago

  • Assignee changed from Suraj Ravichandran to William Grzybowski

William: please load balance between Vladimir and Nikola.

#32 Updated by William Grzybowski about 1 year ago

  • Status changed from Screened to Unscreened
  • Assignee changed from William Grzybowski to Vladimir Vinogradenko
  • Target version changed from 11.1 to 11.2-BETA1

inadyn-mt seems to support google domains but I dont think it can handle https.

We may investigate switching inadyn-mt with http://troglobit.com/inadyn.html

This is a low priority ticket though.

#33 Updated by Vladimir Vinogradenko about 1 year ago

  • Status changed from Unscreened to Screened

#34 Updated by Vladimir Vinogradenko about 1 year ago

  • Status changed from Screened to Fix In Progress

#35 Updated by Vladimir Vinogradenko about 1 year ago

  • Status changed from Fix In Progress to Ready For Release

#36 Updated by William Grzybowski about 1 year ago

  • Target version changed from 11.2-BETA1 to 11.1

#37 Updated by Dru Lavigne about 1 year ago

  • Subject changed from Google Domains as DDNS provider to Use inadyn as DDNS backend to support more providers
  • Target version changed from 11.1 to 11.1-BETA1

#38 Updated by Dru Lavigne 12 months ago

  • Status changed from Ready For Release to Resolved

#39 Updated by Joe Maloney 11 months ago

  • Needs QA changed from Yes to No
  • QA Status Test Passes FreeNAS added
  • QA Status deleted (Not Tested)

Also available in: Atom PDF