Jump to content

[Module] ddnsc - Dynamic Domain Name Service Client


Darren Kitchen

Recommended Posts

LAN Turtle user Shad contributed the module clomac.

Clone Clients MAC address into WAN interface

https://github.com/ShadGIT

https://forums.hak5.org/index.php?/user/51465-shad/

It's now available from modulemanager. I've created this thread for module support and discussion.

From the help:

DDNSC is a service which provides automatic Dynamic Domain Name updates. It is particulary useful when used in conjuction with UPnP_Portfwd to access the LAN Turtle directly from the outside.
You would need to register the hostname in any of the supported DDNS providers (see /usr/lib/ddns/services) and update the configuration with your info.
Example:
Service: no-ip.com
Hostname: turtle.ddns.net
Username: your@email.com
Password: yourpassword
Link to comment
Share on other sites

  • 1 month later...

Hi, I've been having an issue getting the DDNSC module to work. I put in all the correct info into the configuration, but when I hit 'Submit' I get a lot of 'Invalid arguments' and an 'Entry not found' and it tosses me back to the DDNSC menu. This is the same thing that happens when I put no info in at all and submit. When I try to start the module, after I've put in all my info (and received the errors) I get errors saying that /etc/init.d/ddns doesn't exist.

Has anyone else been having issues with it? It seems like it should be pretty straight-forward. (I have ddns working well in my pen-testing distro). Just haven't been able to get this animal working.

Link to comment
Share on other sites

no-ip is the same one I am using so that should be no problem. From the error you have posted (etc/init.d/ddns not found) I would say that the needed ddns scripts are not installed on the system.

Try this on the shell:

opkg update

opkg install ddns-scripts

It should have been automatically installed when the ddnsc module was first run, but maybe there was some problem during the installation process.

Let's see if that solves the problem.

Link to comment
Share on other sites

Thank you for the suggestion.

So, I ran the commands. The update went fine and when installing the scripts I got the following error:

Collected errors:
* resolve_conffiles: Existing conffile /etc/config/ddns is different from the conffile in the new package. The new conffile will be
placed at /etc/config/ddns-opkg.

I checked the files in /etc/config/ and both were empty so I deleted them and reinstalled just to be safe. Now there was no ddns file
in /etc/config/ so I assume it is what is created when you run the configuration from the module.

I checked /etc/init.d/ and there is now a ddns file there with stuff in it. So far so good. I fired up turtle and put my information
into DDNSC and I got the same submission errors. I checked /etc/config/ and the ddns file was created but it was empty.

Just for kicks I tried to start DDNSC anyways and it no longer has the init.d error. Now it just says:

uci: Invalid argument
Link to comment
Share on other sites

It looks like for some reason your /etc/config/ddns file got messed up or truncated.

I think copy and pasting this onto a new /etc/config/ddns file will fix it:

config service 'myddns'    option interface 'wan'    option use_syslog '1'    option use_https '0'    option force_interval '72'    option force_unit 'hours'    option check_interval '10'    option check_unit 'minutes'    option retry_interval '60'    option retry_unit 'seconds'    option ip_source 'web'    option ip_url 'http://checkip.dyndns.com/'    option service_name 'no-ip.com'    option domain 'yourhost.ddns.net'    option username 'youremail@gmail.com'    option password 'password'    option enabled '0'

After that, the configure option of DDNSC should load the values and let you change them.

Please let me know if this fixes the problem.

Link to comment
Share on other sites

You are welcome. Thank you for letting me know a possible flaw in DDNSC, in next version I will add some extra error-checking for restoring the base config file in case it gets damaged.

About the example in using it in conjunction with upnp_portfwd:

Supposse you connect the lan turtle to a LAN in which there is a UPNP enabled router that is the gateway to internet. (ie: many telco provided routers, adsl, etc).

You set up upnp_portfwd to redirect a port in the router, 20000 for example, to ssh in the turtle.

Then you can ssh to the external ip of the router from a remote location and you will ssh into the turtle.

BUT, what if you don't know what the external ip is? That's where ddnsc comes to help, as it will also map your no-ip host to the external ip.

Then you just ssh to your no-ip hostname port 20000, and voila! direct shell to the turtle from an arbitrary remote location.

It's just another way to have a shell into the turtle. It can be used standalone or in conjuction with all the other modules that provide reverse shells.

Link to comment
Share on other sites

Yes you can.

The only reason you cannot directly ssh into the turtle from the wan side is because the firewall blocks it, but upnp_portfwd also adds a rule to allow access the redirected port. So, as a side effect, after running upnp_portfwd you can also ssh to the now opened port from the WAN.

Link to comment
Share on other sites

  • 4 weeks later...

Hello all,

This is my first post and I just got my lan turtle having a lot of fun with it so far. I have ran into this same problem with the ddnsc module. I get a lot of 'Invalid arguments' and an 'Entry not found' and it sends me back to the DDNSC menu. I tried

opkg update

opkg install ddns-scripts

Uninstalling the module and re-installed it.

all with no luck

I was going to try and paste that info in a new /etc/config/ddns file. But still new to linux how would I go about doing that?

Thanks!

Link to comment
Share on other sites

  • 1 year later...
  • 4 years later...

This package had a major update and now you need to download additional packages in some cases to make work. For "noip.com" I did this:

wget https://downloads.openwrt.org/releases/packages-19.07/x86_64/packages/ddns-scripts_no-ip_com_2.7.8-14_all.ipk
opkg install ddns-scripts_no-ip_com_2.7.8-14_all.ipk

Then you configure the module like this:

Service: no-ip.com
Domain: ****.ddns.net
User: [your_username]
Password: [your_password]

People should have a look here as I'm not sure this module works "natively" with LAN Turtle.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...