Darren Kitchen

[Module] ddnsc - Dynamic Domain Name Service Client

15 posts in this topic

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
0

Share this post


Link to post
Share on other sites

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.

0

Share this post


Link to post
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.

0

Share this post


Link to post
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
0

Share this post


Link to post
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.

0

Share this post


Link to post
Share on other sites

Worked like a charm! Thanks for that. =)

(Sorry for late reply. Ran up against posting limit.)

0

Share this post


Link to post
Share on other sites

It is particulary useful when used in conjuction with UPnP_Portfwd to access the LAN Turtle directly from the outside.

Can anyone give an example of this please?

0

Share this post


Link to post
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.

0

Share this post


Link to post
Share on other sites

I suspected that is what this is trying to accomplish. Although I've read several times that you cannot SSH into the Ethernet side without reverse SSH first. Can you SSH directly this way?

I'm just trying to connect the dots. Thanks.

0

Share this post


Link to post
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.

0

Share this post


Link to post
Share on other sites

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!

0

Share this post


Link to post
Share on other sites

i am also trying to get this working with

dyndns ... could someone help pls....

its not working .... did the config manual also but no luck ...:-(

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.