opnsense / plugins

OPNsense plugin collection
https://opnsense.org/
BSD 2-Clause "Simplified" License
810 stars 593 forks source link

Dynamic DNS (dyndns) - NoIP Update broken since 21.1.5 -> 21.1.6 #2437

Closed mircsicz closed 2 years ago

mircsicz commented 3 years ago

Hi all, the upgrade to 21.1.6 broke "os-dyndns"

I've already opened a topic on the forums...

Steps to reproduce the behavior:

  1. Upgrade from 21.1.5|6 to 21.1.6|7
  2. when using NoIP paid accounts no updates will be pushed

Steps to resolve the issue:

  1. opnsense-revert -r 21.1.5 os-dyndns

Logs will follow...

Environment Bildschirmfoto 2021-05-29 um 02 18 13 Bildschirmfoto 2021-05-29 um 02 13 56

OPNsense 21.1.6-amd64 APU2

fichtner commented 3 years ago

It's in the release notes:

https://github.com/opnsense/plugins/blob/f7718fd6bfbbf9f2acc94d8498c6346c97f155b9/dns/dyndns/pkg-descr#L13

mircsicz commented 3 years ago

Danke/THX Franco,

but this doesn't solve the issue for me... How do I get it back to a working state?

I've once again locked myself out from a clients DynIP Homeoffice Router after the upgrade... As I expected it to be fixed/ forogt about it :-)

fichtner commented 3 years ago

For one you could contact the author annd/or inspect the commit... 98548b27811 I don't have this setup so I'm not going to interfere.

mircsicz commented 3 years ago

@vityank can please gi'me a hand. I'm by no means a programmer but can supply logs as needed

vityank commented 3 years ago

Hey @mircsicz, While the new API2 code works for me for a long time, let's inspect that could get wrong for you.

1) Do you have special symbols(Non latin alpha-numeric),incl spaces in your user name(I think username is limited) or password? 2) Can you check the log for errors in DynDNS? 3) If answer to (1) is yes, then can you test the patch eaf4a11 and report here? 4) If answer to (1) is no, Do you use full email as username for domain updates(I assume you don't use group updates, because it wasn't supported before)?

mircsicz commented 2 years ago

Sorry didn't get an Update / Notify on your reply...

  1. not so sure, see the next point
  2. I don't use an email as login, I use a username like this: group:username

This is the log for the 21.1.5 version Jul 21 11:37:39 router configctl[12295]: event @ 1626860259.13 msg: Jul 21 11:37:39 router.ee.lan config[40483]: [2021-07-21T11:37:39+02:00][info] config-event: new_config /conf/backup/config-1626860259.1277.xml Jul 21 11:37:39 router configctl[12295]: event @ 1626860259.13 exec: system event config_changed Jul 21 11:38:00 router php-cgi[40483]: /services_dyndns_edit.php: Dynamic DNS: updatedns() starting Jul 21 11:38:00 router php-cgi[40483]: /services_dyndns_edit.php: Dynamic DNS (xxx.ddns.me): 93.208.50.xxx extracted Jul 21 11:38:00 router php-cgi[40483]: /services_dyndns_edit.php: Dynamic DNS (xxx.ddns.me): running dyndns_failover_interface for wan. found pppoe0 Jul 21 11:38:00 router php-cgi[40483]: /services_dyndns_edit.php: Dynamic DNS (eernst.ddns.me via No-IP): _update() starting. Jul 21 11:38:01 router configctl[12295]: event @ 1626860280.52 msg: Jul 21 11:38:00 router.ee.lan config[40483]: [2021-07-21T11:38:00+02:00][info] config-event: new_config /conf/backup/config-1626860280.5161.xml Jul 21 11:38:01 router configctl[12295]: event @ 1626860280.52 exec: system event config_changed Jul 21 11:38:03 router php-cgi[40483]: /services_dyndns_edit.php: Dynamic DNS (xxx.ddns.me): _checkStatus() starting. Jul 21 11:38:03 router php-cgi[40483]: /services_dyndns_edit.php: Dynamic DNS (xxx.ddns.me): Current Service: noip Jul 21 11:38:04 router php-cgi[40483]: /services_dyndns_edit.php: Dynamic DNS (xxx.ddns.me): 93.208.50.xxx extracted Jul 21 11:38:04 router php-cgi[40483]: /services_dyndns_edit.php: Dynamic DNS: updating cache file /var/cache/dyndns_wan_xxx.ddns.me_0.cache: 93.208.50.xxx Jul 21 11:38:04 router php-cgi[40483]: /services_dyndns_edit.php: Dynamic DNS (eernst.ddns.me): (Success) DNS hostname update successful.

next I ran: opnsense-revert -r 21.1.8 os-dyndns so this is the log from that Save&ForeceUpgrade run:

Jul 21 11:43:05 router syslog-ng[39835]: Configuration reload request received, reloading configuration; Jul 21 11:43:05 router syslog-ng[39835]: Configuration reload finished; Jul 21 11:43:18 router php-cgi[74776]: /services_dyndns_edit.php: Dynamic DNS: updatedns() starting 93.208.50.xxx extracted Jul 21 11:43:18 router php-cgi[74776]: /services_dyndns_edit.php: Dynamic DNS (xxx.ddns.me): running dyndns_failover_interface for wan. found pppoe0 Jul 21 11:43:18 router php-cgi[74776]: /services_dyndns_edit.php: Dynamic DNS (xxx.ddns.me via No-IP): _update() starting. Jul 21 11:43:18 router configctl[21158]: event @ 1626860598.37 msg: Jul 21 11:43:18 router.ee.lan config[74776]: [2021-07-21T11:43:18+02:00][info] config-event: new_config /conf/backup/config-1626860598.369.xml Jul 21 11:43:18 router configctl[21158]: event @ 1626860598.37 exec: system event config_changed Jul 21 11:43:19 router php-cgi[74776]: /services_dyndns_edit.php: Dynamic DNS (xxx.ddns.me): _checkStatus() starting. Jul 21 11:43:19 router php-cgi[74776]: /services_dyndns_edit.php: Dynamic DNS (xxx.ddns.me): Current Service: noip Jul 21 11:43:19 router php-cgi[74776]: /services_dyndns_edit.php: Dynamic DNS (xxx.ddns.me): (Unknown Response)

vityank commented 2 years ago

Hi, just to clarify, do you use 'group:' prefix in your username? If so try to use without this prefix(I use group name as is with new code). If it's a problem I'll add code to cut the 'group:' prefix if present.

mircsicz commented 2 years ago

Thx for asking, this is how I format the username:

groupname:accountname

I can't check atm because the machine's with issue's are remote and there's no one I could reach...

vityank commented 2 years ago

Ok, What you write in 'hostname' field? Group name too, or one of its hosts?

mircsicz commented 2 years ago

I just realize this won't work for me as I've got specific group passwords, so if you cut the groupname part from the credential's this wouldn't fit to the default account username.

Or do I've a misunderstanding?

vityank commented 2 years ago

I use groups without special password, I think. In my case hostname field=group, account=account

vityank commented 2 years ago

Hey PR #2444 is ready for this ticket, and i moved it from Draft state to full PR after lot's of my own tests.

I've worked on it by creating new vhost and passworded group, with passwords having special symbols(including the : symbol). Also in this change I fixed the status parsing(You got beforehand 'Unknown response', while needed to get 'Invlaid user name or password').

So, while you didn't answered the question about hostname(The very important one) I assumed that you used hosts inside the group for that.

1) + WORKS hostname=vhost from grp user=group:userName (And probably other combinations like group#userName, but didn't tested them specifically) password:pass of the group.

This now works(With code from mentioned PR!) - If it's your case, then congrats.

2) - CAN'T WORK, This unfortunately seem as not supported by No-IP backend hostname=group user=group:userName password:pass of the group.

3) + GROUP UPDATE(W/O GROUP PASSWORD). hostname=group user=userName password:pass of the account.

Note - This is the case that is supported with main change, which broke your login. It didn't worked with old APIv1 backend , requiring to use hostnames directly, and main reason for me to develop those updates.Making working with regular groups a breeze.

mircsicz commented 2 years ago

@fichtner brauchst Du noch was?

Ich habe mir gerade mal für drei Kunden die über Dyn-IP angebunden sind einen Reminder erstellt der mich bei Ankunft an der Adresse daran erinnert ein Log zu erzeugen.

Positronico commented 2 years ago

I believe the @vityank option 1 isn't working. I get Unknown Response using:

Hostname=(my personal hostname, custom domain, paid account) user=group:account password:(group password)

Although, if I use my main password instead of the group password, the update works, even though I'm still using group:account instead of my main username.

vityank commented 2 years ago

@Positronico Did you applied the patch from the abovementioned PR or just used master/stable upstream branch? Because only patched version shall work, and this PR is not merged yet so patch must be applied manually for now.

OPNsense-bot commented 2 years ago

This issue has been automatically timed-out (after 180 days of inactivity).

For more information about the policies for this repository, please read https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md for further details.

If someone wants to step up and work on this issue, just let us know, so we can reopen the issue and assign an owner to it.