Inadyn-mt (IPv6)

267 views
Skip to first unread message

Rodrigo Aluizio

unread,
Apr 28, 2017, 4:39:58 PM4/28/17
to Alt-F

Hi there. I’ve recently installed Alt-F on my DNS-320L Rev A3 and it works smoothly. The only issue I'm having right now is with the DDNS interface.

My country stablished the use of IPv6 at least as Dual Stack as a rule for all our ISP. So I really need inadyn-mt to update it, not only the IPv4 address. Once the IPv6 is the only way I can have remote access to my NAS.

I noticed that inadyn-mt is installed, instead of the old inadyn, that did not supported IPv6, but the Alt-F WEBUI, does not permit “IPv6 configuration”, and if I manually edit inadyn.conf, I can´t be sure if its working, once the WEBIU gives me this:

 

ddns.cgi: eval: line 1: --dyndns_system=dyn...@dyndns.org: not found ddns.cgi: eval: line 1: --retries=1: not found ddns.cgi: eval: line 1: --username=gxxxxs: not found ddns.cgi: eval: line 1: --password=XXXXX: not found ddns.cgi: eval: line 1: --alias=ralXXX.dnsXXXs.com: not found ddns.cgi: eval: line 1: --update_period_sec=3600: not found ddns.cgi: eval: line 1: --ip_server_name=ip6.me: not found

 

The configuration I need to be interpreted is like this:

--dyndns_system dyn...@dyndns.org

--retries 1

--username gxxxxs

--password XXXXX

--alias rXXX.dnXXXs.com ip6

--update_period_sec 3600

--ip_server_name ip6.me/

 

Any hints or ideas on how can I make it work properly and start on boot as well?

 

Thanks in advance, and by the way. Alt-F is awesome, way better than that slow stock firmware.

Congrats.

Rodrigo Aluizio

unread,
Apr 28, 2017, 4:41:22 PM4/28/17
to al...@googlegroups.com
By the way. I'm using RC6.
Removing the "--" reduced the erros to:

ddns.cgi: eval: line 1: ip6: not found ddns.cgi: eval: line 1: /: Permission denied

which seems to be a problem with the ipv6 request part.

Running inadyn-mt with this configuration using gives no error.

Em sexta-feira, 28 de abril de 2017 17:39:58 UTC-3, Rodrigo Aluizio escreveu:

Hi there. I’ve recently installed Alt-F on my DNS-320L Rev A3 and it works smoothly. The only issue I'm having right now is with the DDNS interface.

My country stablished the use of IPv6 at least as Dual Stack as a rule for all our ISP. So I really need inadyn-mt to update it, not only the IPv4 address. Once the IPv6 is the only way I can have remote access to my NAS.

I noticed that inadyn-mt is installed, instead of the old inadyn, that did not supported IPv6, but the Alt-F WEBUI, does not permit “IPv6 configuration”, and if I manually edit inadyn.conf, I can´t be sure if its working, once the WEBIU gives me this:

 

ddns.cgi: eval: line 1: --dyndns_system=dyndns@dyndns.org: not found ddns.cgi: eval: line 1: --retries=1: not found ddns.cgi: eval: line 1: --username=gxxxxs: not found ddns.cgi: eval: line 1: --password=XXXXX: not found ddns.cgi: eval: line 1: --alias=ralXXX.dnsXXXs.com: not found ddns.cgi: eval: line 1: --update_period_sec=3600: not found ddns.cgi: eval: line 1: --ip_server_name=ip6.me: not found

João Cardoso

unread,
Apr 30, 2017, 1:01:28 PM4/30/17
to al...@googlegroups.com


On Friday, 28 April 2017 21:41:22 UTC+1, Rodrigo Aluizio wrote:
By the way. I'm using RC6.
Removing the "--" reduced the erros to:

Yes, no leading '--' options should be used (but I have fixed it to be allowed).

I have also allowed the "hostname" entry to contain arbitrary strings, such as 'your_host ipv6'. But it is not checked for correctness, as it translates to the 'alias' option which is very complex to parse (from the manual page):
alias <alias host name>[, hash] [ip type] [if] [addr pref] [ip server[:port] <ip server url> [ip server host]]'

I have also added an entry for the ip_server_name option, so you can use 'ipv6.me /' (notice the space before the /). By default "checkip.dyndns.org /" is used.

Anyway, when configuration files are user edited, in general the webUI will not be able to use them, as most programs have many complex or conflicting options.
But generally the init scripts that start or stop the actual service don't use the configuration files, so you can use 'rcddns start|stop' from the command line to test your configuration, and when it works the webUI StartNow/StopNow should work and if boot enabled it will also starts at boot. You only have to restrain yourself from using the webUI to edit it.

Otherwise, is IPv6 working fine on Alt-F? Neither my ISP nor my home network is IPv6 ready, so I haven't test that.

I attach the two webUI files so you can test them, just drop them at /usr/www/cgi-bin/ and make then executable. Works for you?
ddns.cgi
ddns_proc.cgi

Rodrigo Aluizio

unread,
May 1, 2017, 8:13:25 AM5/1/17
to Alt-F

Hi there. First of all, thanks for the time.

Your cgi files work perfectly, and as you said, I just have to avoid edit the inadyn-mt configuration with the WEBUI.

But, as you probably suspected Alt-F doesn't support IPv6. I have other devices that are completely accessible using IPv6 (so the router is fine), but all ports of my DNS-320L appear as “filtered” and no connection is possible. I tried enabling Avahi (Zeroconf) but just that did not solve the issue (it may need some configuration adjustment I don’t know yet, I have to read more about it).


Thank you very much fou your attention João.


Em domingo, 30 de abril de 2017 14:01:28 UTC-3, João Cardoso escreveu:


On Friday, 28 April 2017 21:41:22 UTC+1, Rodrigo Aluizio wrote:
By the way. I'm using RC6.
Removing the "--" reduced the erros to:

Yes, no leading '--' options should be used (but I have fixed it to be allowed).

I have also allowed the "hostname" entry to contain arbitrary strings, such as 'your_host ipv6'. But it is not checked for correctness, as it translates to the 'alias' option which is very complex to parse (from the manual page):
alias <alias host name>[, hash] [ip type] [if] [addr pref] [ip server[:port] <ip server url> [ip server host]]'

I have also added an entry for the ip_server_name option, so you can use 'ipv6.me /' (notice the space before the /). By default "checkip.dyndns.org /" is used.

Anyway, when configuration files are user edited, in general the webUI will not be able to use them, as most programs have many complex or conflicting options.
But generally the init scripts that start or stop the actual service don't use the configuration files, so you can use 'rcddns start|stop' from the command line to test your configuration, and when it works the webUI StartNow/StopNow should work and if boot enabled it will also starts at boot. You only have to restrain yourself from using the webUI to edit it.

Otherwise, is IPv6 working fine on Alt-F? Neither my ISP nor my home network is IPv6 ready, so I haven't test that.

I attach the two webUI files so you can test them, just drop them at /usr/www/cgi-bin/ and make then executable. Works for you?




ddns.cgi: eval: line 1: ip6: not found ddns.cgi: eval: line 1: /: Permission denied

which seems to be a problem with the ipv6 request part.

Running inadyn-mt with this configuration using gives no error.

Em sexta-feira, 28 de abril de 2017 17:39:58 UTC-3, Rodrigo Aluizio escreveu:

Hi there. I’ve recently installed Alt-F on my DNS-320L Rev A3 and it works smoothly. The only issue I'm having right now is with the DDNS interface.

My country stablished the use of IPv6 at least as Dual Stack as a rule for all our ISP. So I really need inadyn-mt to update it, not only the IPv4 address. Once the IPv6 is the only way I can have remote access to my NAS.

I noticed that inadyn-mt is installed, instead of the old inadyn, that did not supported IPv6, but the Alt-F WEBUI, does not permit “IPv6 configuration”, and if I manually edit inadyn.conf, I can´t be sure if its working, once the WEBIU gives me this:

 

ddns.cgi: eval: line 1: --dyndns_system=dyn...@dyndns.org: not found ddns.cgi: eval: line 1: --retries=1: not found ddns.cgi: eval: line 1: --username=gxxxxs: not found ddns.cgi: eval: line 1: --password=XXXXX: not found ddns.cgi: eval: line 1: --alias=ralXXX.dnsXXXs.com: not found ddns.cgi: eval: line 1: --update_period_sec=3600: not found ddns.cgi: eval: line 1: --ip_server_name=ip6.me: not found

João Cardoso

unread,
May 1, 2017, 10:59:30 AM5/1/17
to Alt-F


On Monday, 1 May 2017 13:13:25 UTC+1, Rodrigo Aluizio wrote:

Hi there. First of all, thanks for the time.

Your cgi files work perfectly, and as you said, I just have to avoid edit the inadyn-mt configuration with the WEBUI.

But, as you probably suspected Alt-F doesn't support IPv6.


Have you enabled ipv6 under Setup->Host? I remembered testing that at link local level, without an intervening router, and it seemed to work (years ago). The 'ifconfig eth0' command will show the ipv6 addresses, and 'lsmod' will show the ipv6 related loaded kernel modules.
DNS-321/323 users have first to install the kernel-modules package (kernel-modules-armv5_4.4.45 if using the RC6 snapshot, search for it in the RC6 snapshot announce topic)
  
Please keep us informed of your progress.

Rodrigo Aluizio

unread,
May 1, 2017, 12:30:03 PM5/1/17
to Alt-F

IPv6 is enabled under Host settings and modules are laded. I got a global IPv6, which is the one I need to remotely connect to the NAS, but connections are closed.

I'll fool around (carefully) with some config files and options here, and read some stuff on the Internet. If I reach some progress, I let you know.

Till now, the only thing I got came from here but I found no /etc/nsswitch.conf file.


Regards.

João Cardoso

unread,
May 1, 2017, 3:02:46 PM5/1/17
to Alt-F


On Monday, 1 May 2017 17:30:03 UTC+1, Rodrigo Aluizio wrote:

IPv6 is enabled under Host settings and modules are laded. I got a global IPv6, which is the one I need to remotely connect to the NAS,

but connections are closed.


I'm afraid that a more complex setup is needed, as Alt-F is not ipv6 ready.
Notice that in the following I'm using link-local ipv6 addresses using a linux computer and a dns-320l connected through a switch, no router (routing) involved.

Most services under Alt-F are controlled through inetd, which uses /etc/inetd.conf to specify what/where to listen, so to test ssh I commented the ssh entry and added another specifying that inetd should listen ssh on ipv6:
#ssh    stream  tcp     nowait  root    /usr/sbin/dropbear      dropbear -i     # Light SSH/SFTP server
ssh     stream  tcp6    nowait  root    /usr/sbin/dropbear      dropbear -i     # Light SSH/SFTP server

Then, the trick part for those without a serial console (more on this latter), I killed inetd and started it again.
Then, from another computer:

silver:~ # ssh -6 fe80::9294:e4ff:fe05:6774%eth0
root@fe80::9294:e4ff:fe05:6774%eth0's password: 
COLUMNS=89;LINES=47;export COLUMNS LINES;

and 'logread' in the DNS-320L reported:

May  1 19:28:30 DNS-320L authpriv.info dropbear[3496]: Child connection from fe80::beae:c5ff:fede:c06d:56443
May  1 19:28:36 DNS-320L authpriv.notice dropbear[3496]: Password auth succeeded for 'root' from fe80::beae:c5ff:fede:c06d:56443

So, ssh under inetd control using ipv6 addressing is working, but it requires tricky manual intervention.

-Notice that in the ssh command in the other computer I supplied the eth0 interface, as routing is not setup for link-local ipv6 on it.
-The difficult part is to make inetd be aware of the new configuration:
--For one, it does not supports 'tcp46', specifying to listen on both tcp4 and tpc6
--it looks like it does not support two enabled lines for the same service, one for tcp4 and other for tcp6
--the 'rcinetd reload' command, to force inetd to re-read its configuration file, does not works in this case. Neither 'rcinetd restart' works, as for "security" reasons stopping inetd is not allowed ('rcinetd stop' does not deliberately works and so 'rcinetd restart' blocks). So killing inetd and starting it again is needed -- which you might find difficult to do.

You can see what inetd is listen for using 'netstat -lnp'. You can of course start the ssh service standalone, out of inetd control.
 

I'll fool around (carefully) with some config files and options here, and read some stuff on the Internet. If I reach some progress, I let you know.

Till now, the only thing I got came from here but I found no /etc/nsswitch.conf file.


Alt-F uses uclibc, which does not uses nsswitch.conf
 


Regards.


Luck, and keep reporting.
Perhaps with your help Alt-F-v2 will be IPv6 ready :-)

Rodrigo Aluizio

unread,
May 1, 2017, 6:26:54 PM5/1/17
to al...@googlegroups.com

Before I do some mess with my NAS, :).

Do you know if Alt-F inetd service accepts "kill HUP" signal? It should make it reloads its configuration without really restarting. If so, I'll probably lose my SSH connection over local IPv4, but be capable to reestablish it over IPv6, at least locally as you did.

I want to be careful and avoid killing all connections to the NAS, if that happens, there will be no way to restore its original configuration (at least without a serial console), I suppose.


Also, I found some interesting information regarding inetd and IPv6 here! Is that true for inedt on Alt-F?

João Cardoso

unread,
May 2, 2017, 11:12:41 AM5/2/17
to Alt-F


On Monday, 1 May 2017 23:26:54 UTC+1, Rodrigo Aluizio wrote:

Before I do some mess with my NAS, :).

Do you know if Alt-F inetd service accepts "kill HUP" signal?


Yes, it accept. It's what  'rcinetd reload' does. But after that it logs that "address is already bound".

It should make it reloads its configuration without really restarting. If so, I'll probably lose my SSH connection over local IPv4, but be capable to reestablish it over IPv6, at least locally as you did.


Your best option is to install the Alt-F openssh package and then start it as a standalone server in port 2222 (Services->Network, opensshd, Configure).
You can then login under ssh on port 2222 and test inetd, or login on port 22 and test opensshd.
Or put ftp or dropbear as standalone servers (not under inetd control) as test their ipv6 capabilities, 

I'm not sure what do you want to setup using ipv6 on the box. My Q&D (quick and dirty) test was just to be sure the RC6 is ipv6 capable, and test inetd for that -- that does not guarantees that servers under inetd control are by themselves ipv6 capables.

I want to be careful and avoid killing all connections to the NAS, if that happens, there will be no way to restore its original configuration (at least without a serial console), I suppose.


If you don't "save settings", changes to configuration files for the base firmware (not for disk-installed packages) will vanish after a reboot, so you only have to reboot or poweroff the box using the front power button for >5 seconds. And as long as the network is up, the reset/usb button intermediate pressing (>10 <20 seconds) will open a telnet session on port 26, and the long >20 seconds pressing will reset all settings to its default values, so there are several safeguards.
 


Also, I found some interesting information regarding inetd and IPv6 her(basicalyeverything listed in /etc/settings will e! Is that true for inedt on Alt-F?


Only the big picture, the devil is on the details, as Alt-F uses busybox inetd, a stripped down and embed-customized inetd.

Rodrigo Aluizio

unread,
May 2, 2017, 5:53:02 PM5/2/17
to al...@googlegroups.com

Well, for now openssh solved my problems. I completely forgot that embedded devices normally use dropbear. Once I read your message I realized that. Installing openssh (server mode) gave me the access I needed over global IPv6 (ssh, scp and sftp). HTTP would be good, but now necessary.

Thanks very much João. Sorry to bother you that much, with such a simple task as installing a new package.


Any way, I may test your suggestion later and report back what I found out.

Reply all
Reply to author
Forward
0 new messages