Dynamic DNS Custom Result Match: can't make it work
-
Since there are issues with Namecheap DynDNS ("Unknown response") I am trying Custom Service Type. I update by URL and Namecheap response is the following:
<?xml version="1.0" encoding="utf-16"?><interface-response><Command>SETDNSHOST</Command><Language>eng</Language><IP>MyIP</IP><ErrCount>0</ErrCount><errors /><ResponseCount>0</ResponseCount><responses /><Done>true</Done><debug><![CDATA[]]></debug></interface-response>
There is a field in the setting: Result Match. The instructions state "This field should be identical to what the DDNS Provider will return if the update succeeds" and "To include the new IP in the request, put %IP% in its place."
So, I copied the above code and instead of the IP that Namecheap returns (denoted as MyIP above) I put %IP% as per instructions. After forced update I get
(Error) Result did not match.
and then the exact same string. I even verified them in Notepad++ and they match exactly. What am I missing here? I tried escaping slashes, question, exclamation, quotation marks, brackets, more and less signs. I always got "(Error) Result did not match." How is this supposed to work?
Verifying the response and the IP in it is important for me because in one instance pfSense updated the IP from WAN2 assuming it was the IP from WAN1. I am on dual-WAN with failover. It was not supposed to happen but that's another story. For now I want this Result Match to work.
-
I found out that when I hardcode my actual IP in the above string instead of %IP% there is a match and I get
php-fpm 202 /services_dyndns_edit.php: phpDynDNS (@): (Success) IP Address Updated Successfully!
Maybe I misunderstand the direction "To include the new IP in the request, put %IP% in its place" or it's not working. Is there a way to check what this %IP% resolves to? Is it a variable?
Can anyone help please?
-
I have a very strange update to this, which I cannot explain. I decided to create a test custom DynDNS entry and pointed its URL to my local web server. First I served just a text file with my IP and in the Result Match field I put %IP%. It worked and I got phpDynDNS (): (Success) IP Address Updated Successfully! Then I started to add some text, kept the hard-typed IP and placed the same text and %IP% instead of the IP into the Result Match field. It all worked. I came to the point where I put the exact Namecheap string into the file served by the web server, the one that never matched. But it matched this time. Then I went to the real DynDNS entry that never worked, put the same string into the Result Match field and it matched the Namecheap response this time. It's weird. I compared the response to the old one that was still sitting in my opened browser and they were exactly the same including headers. I usually don't type what I can copy/paste, so I don't think it was typing error.