OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Custom DDNS - How to see the HTTP Response
« previous next »
  • Print
Pages: [1]

Author Topic: Custom DDNS - How to see the HTTP Response  (Read 3799 times)

Vinez

  • Newbie
  • *
  • Posts: 8
  • Karma: 1
    • View Profile
Custom DDNS - How to see the HTTP Response
« on: May 06, 2021, 03:28:59 pm »
Hello all,

Hope you can help me, I have searched the forum but found no related posts so here i go

I am setting up a custom ddns with my registrar, I have it fully configured, however i need to troubleshoot it by viewing the http response. i have turned on verbose logging and can see some messages in the logs. However i need to see the full http response.... How can i get this information? Do i need to setup SSH access and find it in the logs somewhere else? Is it not saved in the logging?

Thanks for helping in advance !
Logged

Nnyan

  • Jr. Member
  • **
  • Posts: 91
  • Karma: 8
    • View Profile
Re: Custom DDNS - How to see the HTTP Response
« Reply #1 on: May 06, 2021, 07:03:53 pm »
Other then what you have already done I'm not sure if that's available in OPNsense and it doesn't look to be a feature of the plugin.  I normally just get a DDNS update tool that works with your registrar (or a command line tool like noipy) that allows you to see the full response.
Logged

muchacha_grande

  • Full Member
  • ***
  • Posts: 219
  • Karma: 19
    • View Profile
Re: Custom DDNS - How to see the HTTP Response
« Reply #2 on: May 07, 2021, 03:08:13 pm »
Just try the updating url in your browser and see what you get. The DDNS service will usually respond with something like IPv4: <address> or IPv6: <address> whet it succeed
Logged

Vinez

  • Newbie
  • *
  • Posts: 8
  • Karma: 1
    • View Profile
Re: Custom DDNS - How to see the HTTP Response
« Reply #3 on: May 07, 2021, 04:57:22 pm »
Thanks for help!

How could I then confirm the curl command is running? Maybe my problem is in the syntax I am using I have to following filled in in the "update url" field.

curl X PATCH \ -H "Content-Type: application/json" \ -H "Authorization: Bearer KEYHERE" \ -d ' {   "dnsEntry": {     "name": "www",     "expire": 60,     "type": "A",     "content": "%IP%"   }  }  ' \ "ADRESSHERE"

in the logs it says it successfully updates the ip but I think it only updates the cache, I think it is not running the curl command. I tried looking with the packet capture with no success. I can confirm my curl command is working in "Visual Code". so maybe my syntax is wrong for opnsense. sorry I have tried to look for examples of custom dns setups but could not find any examples. How would I convert to an URL?

Again your help is greatly appreciated !
Logged

Vinez

  • Newbie
  • *
  • Posts: 8
  • Karma: 1
    • View Profile
Re: Custom DDNS - How to see the HTTP Response
« Reply #4 on: May 08, 2021, 03:55:42 pm »
Few hours later

I am nearly there XD, I have edited the plugins php file to support my provider TransIP the api looks similar to that of DigitalOcean.

/services_dyndns_edit.php: Dynamic DNS Record ID (): PAYLOAD: {"error":"Please supply the 'dnsEntries' parameter"}

That is how far I am now...

something is wrong with my array syntax in the code below:

$hostData = array("data" => "'dnsEntry': {
                                               'name': 'www',
                                               'expire': 60,
                                               'type': 'A',
                                               'content': '$this->_dnsIP' }");

I have tried many things but new to php, maybe you can see or spot the problem?
Logged

Vinez

  • Newbie
  • *
  • Posts: 8
  • Karma: 1
    • View Profile
Re: Custom DDNS - How to see the HTTP Response
« Reply #5 on: May 12, 2021, 02:41:50 pm »
All solved now, I can put in a pull request on GitHub if you are interested in adding the ISP TransIP to the list of supported ISP's.
Logged

Frank

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Custom DDNS - How to see the HTTP Response
« Reply #6 on: June 28, 2021, 10:56:28 pm »
Nice, I'd be interested in that too, as I'm planning to migrate my domains to TransIP soon.

/Frank
Logged

Benst

  • Newbie
  • *
  • Posts: 16
  • Karma: 1
    • View Profile
Re: Custom DDNS - How to see the HTTP Response
« Reply #7 on: July 02, 2021, 12:22:39 pm »
Quote from: Vinez on May 12, 2021, 02:41:50 pm
All solved now, I can put in a pull request on GitHub if you are interested in adding the ISP TransIP to the list of supported ISP's.

I'm also interested in TransIP ddns support. I did not see a pull request yet. Is your code available somewhere?

Thanks,
Ben
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Custom DDNS - How to see the HTTP Response
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2