hxping7 / wl500g

Automatically exported from code.google.com/p/wl500g
0 stars 0 forks source link

please add forced_update_period to inadyn in web interface #423

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello.

please help me. I use no-ip.com service, and router may be have uptime up to 3 
month. if I use inadyn from web interface, there are no need to update my ip, 
and after 30 days without update my free host is deleted. please add 
forced_update_period option in web interface, it is really need for a free 
users. or talk me how I can do it, and I send to your group ready solution.

Russian: прошу прощения за кривой английский. 
прошу вас добавить настроку 
принудительного периода обновления ip 
адреса в no-ip и им подобных. проблема в том 
что роутер может иметь uptime до нескольких 
месяцев и при этом ip не меняется. а 
бесплатный аккаунт в случае не обновления 
ip в течении 30 дней стирает хост. при наличии 
такой настройки (inadyn это поддерживает) эта 
проблема исчезнет. или посоветуйте как мне 
самому это сделать, а я пришлю готовое 
решение, которое после вашего ревью может 
войти в сборку.

thank you!!!!

Original issue reported on code.google.com by Mifisto...@gmail.com on 28 Oct 2013 at 7:12

GoogleCodeExporter commented 9 years ago
У меня прошивка 1.9.2.7-rtn-r4330
Тоже мучался с настройкой этого параметра, 
потом вдруг заработало.
Теперь у меня на dyndns адрес принудительно 
обновляется примерно раз в два дня.
Прилагаю файл с моими настройками взятые 
из файла: /opt/etc/inadyn.conf
Сам процесс запускаю через /tmp/local/sbin/post-mount 
командой:
/opt/bin/inadyn --input_file /opt/etc/inadyn.conf
Надеюсь что поможет !

Original comment by obraz...@gmail.com on 26 Nov 2013 at 11:54

Attachments:

GoogleCodeExporter commented 9 years ago
it's sufficient to add /usr/local/etc/ddns.conf file with additional inadyn 
options and save this file to flashfs

Original comment by themiron.ru on 26 Nov 2013 at 11:08

GoogleCodeExporter commented 9 years ago
thank you, guys!

I try to add command to /usr/local/etc/ddns.conf:
forced_update_period 86400
and save this file to flashfs. after reboot it command attach to this file 
/etc/ddns.conf with my dyndns settings

But after 1 day of work a couldn't find in system log any line about inadyn 
force update IP. is it normal? or I written error command in 
/usr/local/etc/ddns.conf file?

Original comment by Mifisto...@gmail.com on 3 Mar 2014 at 5:12

GoogleCodeExporter commented 9 years ago
Hi,
I found out that in my system (WL-500gP V2) the inadyn configuration file is in 
/tmp/etc/ddns.conf. I added the option to update the ip in the background after 
x minutes. I think this option should be available in the web ui, because in 
addition to the problem outlined by the reporter here, whenever the router is 
not controlling itself the Internet connection (in my case, it's a static 
client of a modem, which controls the Internet connection on its own), it could 
never know whenever a reconnection has occurred, hence an DDNS update is 
required (for instance because of a line problem). So, this is a basic and 
essential configuration option for a DDNS client, I think.

Original comment by mauro...@tiscali.it on 24 Jul 2014 at 8:12

GoogleCodeExporter commented 9 years ago
I confirm that creating the new file /usr/local/etc/ddns.conf with just the 
additional options and applying changes with "flashfs save && flashfs commit && 
flashfs enable && reboot" causes /tmp/etc/ddns.conf to have them appended after 
reboot.
However I also can't determine if it's working as supposed or not, since I have 
no evidence of inadyn being running in the background after reboot. "ps | grep 
inadyn" shows nothing.
In my case I put the following two lines in /usr/local/etc/ddns.conf:

background
period 600

Original comment by mauro...@tiscali.it on 24 Jul 2014 at 8:30

GoogleCodeExporter commented 9 years ago
I confirm that even if I add those lines in /usr/local/etc/ddns.conf, inadyn is 
not running in the background, so the IP is not periodically updated.
Could this be fixed please?

Original comment by mauro...@tiscali.it on 1 Sep 2014 at 12:48

GoogleCodeExporter commented 9 years ago
I think I've understood what's happening. I solved my problem by adding:
inadyn -F /etc/ddns.conf
in /usr/local/sbin/post-boot
Now, after booting up, the device is correctly leaving an instance of inadyn 
running in background. Anyway, looking at /tmp/syslog I see that just after 
booting there are two inadyn processes running: one that simply checks my IP 
(and updates it if needed, I guess) and the other one which is my process run 
in post-boot. The first one stops running (it doesn't write anything else in 
syslog), while the other one keeps on running (I see subsequent periodic checks 
and updates).
So, my guess is that the default init script is running inadyn, but it's not 
passing it the configuration file in /etc/ddns.conf (which contains also the 
user-supplied values stored in /usr/local/etc/ddns.conf) but rather just the 
default configurations set in the web UI. This is why I don't find the inadyn 
process running after boot, even if I added the background and period options 
in my configuration file.

@Mifisto: I think you're setting the wrong option in /usr/local/etc/ddns.conf: 
you should use "forced-update", not "forced_update_period". If you use 
"forced-update", the parameter is correctly passed to inadyn (given that you're 
starting inadyn in post-boot as I wrote earlier). You can see that by checking 
/tmp/syslog.
The bad news is that if you're using no-ip, it seems like no-ip is filtering 
out forced updates with no actual IP change... so it can't be used to keep the 
free service alive. Anyway, this issue is still valid, because a periodic check 
that intercepts IP changes is really needed and the web UI should allow you to 
set it.

Original comment by mauro...@tiscali.it on 7 Sep 2014 at 9:53

GoogleCodeExporter commented 9 years ago
@Mauro: I already solve my problem. I disable ddns in firmware web-gui, then, 
as @obraz wrote, put /opt/etc/inadyn.conf with correct settings (+background, 
+forced_update_period), and add to post-mount the same string:
/{path_to_inadyn}/inadyn --input_file /opt/etc/inadyn.conf

I think, that now it is only one correct way to do force update ip. But early I 
preffered to have an option in web-gui.

Original comment by Mifisto...@gmail.com on 9 Sep 2014 at 6:45