[opensuse] Dynamic DNS service [OT]
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Hi, Looking at my router, I see the possibility of setting up dynamic DNS service, for accessing my home from outside. My router offers these: DynDns.org TZO No-IP Do you have comments on any of those? Using the configuration on the router would save me from setting up some daemon in Linux. Should be easier, right? If not, I'm of course open to other possibilities. - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlhA21cACgkQja8UbcUWM1yRbQD+JKQvdeyGE8q81Sk2EhAk3fZK CYP9WAHQuimdtqWWgH4A/0F8jMNnR7hFSw8tOyb08qxLd8e59jdW0YaN+FbLAIuF =0J91 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
* Carlos E. R. <robin.listas@telefonica.net> [12-01-16 21:27]:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hi,
Looking at my router, I see the possibility of setting up dynamic DNS service, for accessing my home from outside. My router offers these:
DynDns.org TZO No-IP
Do you have comments on any of those?
I have used no-ip for years. They offered a lifetime dns for us$9 some years after I first started which would not have advertisements, and constant heckling to upgrade. I jumped on. Then another couple of years they told me my service needed to be upgraded to subscription, that the plan I had was being discontinued. I replied with a copy of my $9 "lifetime" service and told them they had a contract with me they needed to honor. After some more banter back and forth, they agreed to provide me another 30 years service at no additional cost. I accepted thinking that things may change drastically in that time-frame (another 20+ years) and being already in my late 60's (at that time), I may not have much need then.
Using the configuration on the router would save me from setting up some daemon in Linux. Should be easier, right? If not, I'm of course open to other possibilities.
I run a simple daemon script they provided (freely available) and have only updated it once. Easy to set-up, not difficult at all, prompts for info and does it's thing. And my router, cisco/logitech (and several netgears) support dyndns but not no-ip. -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Photos: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 Photos: http://wahoo.no-ip.org/piwigo @ http://linuxcounter.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2016-12-02 04:22, Patrick Shanahan wrote:
* Carlos E. R. <> [12-01-16 21:27]:
DynDns.org TZO No-IP
Do you have comments on any of those?
I have used no-ip for years. They offered a lifetime dns for us$9 some years after I first started which would not have advertisements, and constant heckling to upgrade. I jumped on. Then another couple of years they told me my service needed to be upgraded to subscription, that the plan I had was being discontinued. I replied with a copy of my $9 "lifetime" service and told them they had a contract with me they needed to honor.
After some more banter back and forth, they agreed to provide me another 30 years service at no additional cost. I accepted thinking that things may change drastically in that time-frame (another 20+ years) and being already in my late 60's (at that time), I may not have much need then.
Yes, I remember reading about this some time ago. https://en.wikipedia.org/wiki/No-IP +++............... No-IP's core product is dynamic DNS services ("DDNS"). The basic dynamic DNS services using a domain owned by No-IP are free to use as long as the account remains active. An upgraded service to use your own domain name will cost about $25 for the year. Dynamic IP addresses are common on residential cable or DSL broadband accounts. The free service allows users to setup between one and three hostnames on a domain name provided by No-IP. The host name will then resolve to the current IP address of that user's computer. A software client is also provided by No-IP for Windows, OS X, and Linux that can be run on the computer that has the dynamic address. No-IP also provides other DNS, e-mail, and Network Monitoring services. ...............++- That free service would be fine for my needs :-) - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlhA7b4ACgkQja8UbcUWM1wNdAD+LjlL9qGV3aWttdBr/qNSuywC 1uJrphSif8PMKiddb54A/jxpWBh49LkJ8OPTcSH//wUpcpptzEdrLj2I4O90E0wf =bZsO -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hi,
Looking at my router, I see the possibility of setting up dynamic DNS service, for accessing my home from outside. My router offers these:
DynDns.org TZO No-IP
Do you have comments on any of those?
I think dyndns.org was turned into dyn.com which was recently bought by Oracle, god knows why. <shameless plug> I can recommend http://www.dns24.ch </shameless plug>
Using the configuration on the router would save me from setting up some daemon in Linux. Should be easier, right? If not, I'm of course open to other possibilities.
It depends on how configurable your router is - if you can add your own update string etc, running it on the router is fine. -- Per Jessen, Zürich (-1.2°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-12-02 07:35, Per Jessen wrote:
Carlos E. R. wrote:
Looking at my router, I see the possibility of setting up dynamic DNS service, for accessing my home from outside. My router offers these:
DynDns.org TZO No-IP
Do you have comments on any of those?
I think dyndns.org was turned into dyn.com which was recently bought by Oracle, god knows why.
I hope my router knows that, or the setup will not work.
<shameless plug> I can recommend http://www.dns24.ch </shameless plug>
:-)) Noted, but my router doesn't know that one. In that case, it means running "something" in a computer in the LAN. How does "something" notice that the outside address has changed? I know that the IP can be found, but tracking the instant that it changes is not that trivial unless there is an active connection. I can only imagine periodically testing the IP, and communicating the change when found.
Using the configuration on the router would save me from setting up some daemon in Linux. Should be easier, right? If not, I'm of course open to other possibilities.
It depends on how configurable your router is - if you can add your own update string etc, running it on the router is fine.
As far as I know, no, it is not. The config is: DDNS provider : DynDns.org Hostname [ ] Interface 6/ppp0.1 DynDNS Settings Username [ ] Password [ ] .-.- DDNS provider : TZO Hostname [ ] Interface 6/ppp0.1 TZO Settings Email [ ] Key [ ] .-.- DDNS provider : No-IP Hostname [ ] Interface 6/ppp0.1 No-IP DDNS Settings Username [ ] Password [ ] -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Carlos E. R. wrote:
<shameless plug> I can recommend http://www.dns24.ch </shameless plug>
:-))
Noted, but my router doesn't know that one.
In that case, it means running "something" in a computer in the LAN. How does "something" notice that the outside address has changed?
I know that the IP can be found, but tracking the instant that it changes is not that trivial unless there is an active connection.
That's true, but most likely you don't need that sort of minimal latency. If you do, get a fixed IP :-)
I can only imagine periodically testing the IP, and communicating the change when found.
Well, it's really a bit of a waste - imagine this scheme: every 5 minutes: query dns24.ch to get your external IP. if it has changed, run an update on dns24.ch. compared to: every 5 minutes: send update to dns24.ch. -- Per Jessen, Zürich (2.6°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/02/2016 03:11 AM, Per Jessen wrote:
Well, it's really a bit of a waste - imagine this scheme:
every 5 minutes:
query dns24.ch to get your external IP. if it has changed, run an update on dns24.ch.
compared to:
every 5 minutes:
send update to dns24.ch.
On laptops, I do both using ddclient with dyndns.com. I update my external IP under one name. I update my internal IP under a different name. (The theory was If you track your stolen laptop to some large organization (say a school campus) you still need to tell that site what IP it is using). Can't say this has ever been necessary. NOTE: ddclient has been supplied by opensuse for years and years to do this with a variety of different service providers. I imagine it could be hacked to work with dns24.ch as well. -- After all is said and done, more is said than done. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
John Andersen wrote:
On 12/02/2016 03:11 AM, Per Jessen wrote:
Well, it's really a bit of a waste - imagine this scheme:
every 5 minutes:
query dns24.ch to get your external IP. if it has changed, run an update on dns24.ch.
compared to:
every 5 minutes:
send update to dns24.ch.
On laptops, I do both using ddclient with dyndns.com.
I update my external IP under one name. I update my internal IP under a different name.
(The theory was If you track your stolen laptop to some large organization (say a school campus) you still need to tell that site what IP it is using). Can't say this has ever been necessary.
NOTE: ddclient has been supplied by opensuse for years and years to do this with a variety of different service providers. I imagine it could be hacked to work with dns24.ch as well.
I imagine so too, it's not a big deal. ddclient is almost overkill, most people curl or wget, people with Fritz!Box use something called DDNS. -- Per Jessen, Zürich (2.0°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On December 1, 2016 6:24:23 PM PST, "Carlos E. R." <robin.listas@telefonica.net> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hi,
Looking at my router, I see the possibility of setting up dynamic DNS service, for accessing my home from outside. My router offers these:
DynDns.org TZO No-IP
Do you have comments on any of those?
Using the configuration on the router would save me from setting up some daemon in Linux. Should be easier, right? If not, I'm of course open to other possibilities.
- -- Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux)
iF4EAREIAAYFAlhA21cACgkQja8UbcUWM1yRbQD+JKQvdeyGE8q81Sk2EhAk3fZK CYP9WAHQuimdtqWWgH4A/0F8jMNnR7hFSw8tOyb08qxLd8e59jdW0YaN+FbLAIuF =0J91 -----END PGP SIGNATURE-----
I've used funds for over 15 years. A paying customer for the last 9. I've also used no-ip. Fun has gotten to be big business, and is not really focused on the free offerings any more, but I think they still do, I believe. -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-12-02 08:04, John Andersen wrote:
On December 1, 2016 6:24:23 PM PST, "Carlos E. R." <> wrote:
DynDns.org TZO No-IP
I've used funds for over 15 years. A paying customer for the last 9.
But "funds" is not in my router list. It is only those three above.
I've also used no-ip. Fun has gotten to be big business, and is not really focused on the free offerings any more, but I think they still do, I believe.
The wikipedia says they do. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Hi On 2016-12-02 03:24, Carlos E. R. wrote:
Hi,
DynDns.org TZO No-IP
Do you have comments on any of those? IMHO they are not free. Either you have to login every couple of weeks or pay. I use the alternative firmware dd-wrt on all my routers (mostly cheak TP-Link hardware) which support the free dyndns provider afraid.org.
best regards Thomas -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-12-02 09:11, Thomas Wagner wrote:
Hi On 2016-12-02 03:24, Carlos E. R. wrote:
Hi,
DynDns.org TZO No-IP
Do you have comments on any of those? IMHO they are not free. Either you have to login every couple of weeks or pay.
login? Manually? :-(
I use the alternative firmware dd-wrt on all my routers (mostly cheak TP-Link hardware) which support the free dyndns provider afraid.org.
Well, flashing that router is totally out of the question, it invalidates ISP support. It has to do my ISP fibre TV, too, and this is undocumented. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On 2016-12-02 09:11, Thomas Wagner wrote:
Hi On 2016-12-02 03:24, Carlos E. R. wrote:
Hi,
DynDns.org TZO No-IP
Do you have comments on any of those? IMHO they are not free. Either you have to login every couple of weeks or pay.
login? Manually? :-( Yep, login on their homepage an hit a certain button there. At least for
On 2016-12-02 11:29, Carlos E. R. wrote: the free version of no-ip. Years ago I had the free version von dyndns with the same required procedure. Scripting a login should be possible but once they change something you'll have to update the scripts.
Well, flashing that router is totally out of the question,
Ok, then I would go with a script on some raspberry (or a homeserver if available) that checks for an IP change periodically. Then your are also independent of a dynamic DNS provider. best regards Thomas -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-12-02 12:20, Thomas Wagner wrote:
On 2016-12-02 09:11, Thomas Wagner wrote:
Hi On 2016-12-02 03:24, Carlos E. R. wrote:
Hi,
DynDns.org TZO No-IP
Do you have comments on any of those? IMHO they are not free. Either you have to login every couple of weeks or pay.
login? Manually? :-( Yep, login on their homepage an hit a certain button there. At least for
On 2016-12-02 11:29, Carlos E. R. wrote: the free version of no-ip. Years ago I had the free version von dyndns with the same required procedure. Scripting a login should be possible but once they change something you'll have to update the scripts.
Oh. Well, for a test it will be doable.
Well, flashing that router is totally out of the question, Ok, then I would go with a script on some raspberry (or a homeserver if available) that checks for an IP change periodically. Then your are also independent of a dynamic DNS provider.
Maybe next time :-) On a different router I had I could track IP changes from the router log that was sent to a local machine. But the current one doesn't talk enough. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On Fri, 2 Dec 2016 12:20, Thomas Wagner wrote:
On 2016-12-02 11:29, Carlos E. R. wrote:
On 2016-12-02 09:11, Thomas Wagner wrote:
On 2016-12-02 03:24, Carlos E. R. wrote:
Hi,
DynDns.org TZO No-IP
Do you have comments on any of those? IMHO they are not free. Either you have to login every couple of weeks or pay.
login? Manually? :-( Yep, login on their homepage an hit a certain button there. At least for the free version of no-ip. Years ago I had the free version von dyndns with the same required procedure. Scripting a login should be possible but once they change something you'll have to update the scripts.
Well, flashing that router is totally out of the question, Ok, then I would go with a script on some raspberry (or a homeserver if available) that checks for an IP change periodically. Then your are also independent of a dynamic DNS provider.
Hmmm, many router have a "home-page" that you can see without even logging in on the router, e.g. on my router, a "easyBox 802", page is http://easy.box/ or via "gateway"-ip If you look at that page, many routers provide the outside IP on it. use wget/curl/(other tool) to get that page, extract that outside-IP compare to a locally stored value, if changed, store new value and run ddns-update script. run that test every minute via local cron. That way only the updates leave your private network. Does that make more sense to you? - Yamaban. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-12-02 12:33, Yamaban wrote:
Hmmm, many router have a "home-page" that you can see without even logging in on the router, e.g. on my router, a "easyBox 802", page is http://easy.box/ or via "gateway"-ip
Not mine, I think. You mean an info page of the router without login. Not that I know, no.
If you look at that page, many routers provide the outside IP on it. use wget/curl/(other tool) to get that page, extract that outside-IP compare to a locally stored value, if changed, store new value and run ddns-update script. run that test every minute via local cron. That way only the updates leave your private network.
Does that make more sense to you?
It does, yes. But no such luck. This is the script I use to find the external IP: Isengard:~ # cat /usr/local/bin/FindAndLogMyExternalIp #!/bin/bash LOGGER=/usr/bin/logger FACILIDAD=user.notice for((i=0;i<3;i++)) do set `wget --timeout=15 -qO - checkip.dyndns.org | cut -d":" -f2 | cut -d"<" -f1 | cut -d" " -f2` if test -n "$*" ; then $LOGGER -t Sistema -p $FACILIDAD "Logging the current external IP=" $* HORA=`date --rfc-3339=ns` echo "$HORA $*" break else HORA=`date --rfc-3339=ns` echo "$HORA IP not found ($i/3)" $LOGGER -t Sistema -p $FACILIDAD "Could not find current external IP; trying again ($i)." /bin/sleep 5 fi done Isengard:~ # And some times it fails. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Carlos E. R. wrote:
This is the script I use to find the external IP:
Isengard:~ # cat /usr/local/bin/FindAndLogMyExternalIp #!/bin/bash
LOGGER=/usr/bin/logger FACILIDAD=user.notice
for((i=0;i<3;i++)) do set `wget --timeout=15 -qO - checkip.dyndns.org | cut -d":" -f2 | cut
Used like that, I first got an http503, then --2016-12-02 13:53:00-- http://-/ Resolving - (-)... failed: Name or service not known. wget: unable to resolve host address ‘-’ then four attempts to get the address from dyndns. http://checkip.dns24.ch/ does the same, but it's not used very much. Yamaban's suggestion is pretty neat, if your router had such a home page. -- Per Jessen, Zürich (3.4°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-12-02 14:00, Per Jessen wrote:
Carlos E. R. wrote:
Used like that, I first got an http503, then
--2016-12-02 13:53:00-- http://-/ Resolving - (-)... failed: Name or service not known. wget: unable to resolve host address ‘-’
?? Weird.
then four attempts to get the address from dyndns.
http://checkip.dns24.ch/ does the same, but it's not used very much. Yamaban's suggestion is pretty neat, if your router had such a home page.
No, but I found it has a telnet, which does tell that IP. I would have to script it. I don't remember right now how I did that in the past. chat? No, that's for modem. What was it...? -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Carlos E. R. wrote:
On 2016-12-02 14:00, Per Jessen wrote:
Carlos E. R. wrote:
Used like that, I first got an http503, then
--2016-12-02 13:53:00-- http://-/ Resolving - (-)... failed: Name or service not known. wget: unable to resolve host address ‘-’
?? Weird.
then four attempts to get the address from dyndns.
http://checkip.dns24.ch/ does the same, but it's not used very much. Yamaban's suggestion is pretty neat, if your router had such a home page.
No, but I found it has a telnet, which does tell that IP. I would have to script it. I don't remember right now how I did that in the past.
chat? No, that's for modem. What was it...?
netcat might do it for you. -- Per Jessen, Zürich (3.9°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2016-12-02 14:56, Per Jessen wrote:
Carlos E. R. wrote:
No, but I found it has a telnet, which does tell that IP. I would have to script it. I don't remember right now how I did that in the past.
chat? No, that's for modem. What was it...?
netcat might do it for you.
No, it is an application that captures the input and output of another CLI application, simulating that it types commands and such. I have done this years ago but I don't remember the name. That way you can call telnet and issue the commands automatically, then exit. - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlhBhB0ACgkQja8UbcUWM1zXzQD+NTituoHh5r6m3f+LG6tAos10 Xg/R3A18FgnxO+TrygAA/1A6dna0qp38XTUYuSGyTQolpDDRadRa3QP8JOlNR4CJ =2DjB -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Carlos E. R. wrote:
No, but I found it has a telnet, which does tell that IP. I would have to script it. I don't remember right now how I did that in the past.
chat? No, that's for modem. What was it...?
netcat might do it for you.
No, it is an application that captures the input and output of another CLI application, simulating that it types commands and such. I have done this years ago but I don't remember the name.
I think I know what you mean, was it called "ex<something>" ? "screen" might be another alternative, but I still think netcat will do it: echo "dumpsysinfo" | netcat your.router 22 -- Per Jessen, Zürich (3.8°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Fri, Dec 2, 2016 at 5:36 PM, Per Jessen <per@computer.org> wrote:
I think I know what you mean, was it called "ex<something>" ? "screen" might be another alternative, but I still think netcat will do it:
It was "expect". Used Tk, IIRC. There is Perl modification Perl::Expect. I used it once to automate some test - create telnet sessions, controlled by scripts. It was not trivial to use, but worked nicely. There is similar functionality in Python built in (do not remember by heart, but can find out, if needed -- Mark Goldstein -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-12-02 16:59, Mark Goldstein wrote:
On Fri, Dec 2, 2016 at 5:36 PM, Per Jessen <per@computer.org> wrote:
I think I know what you mean, was it called "ex<something>" ? "screen" might be another alternative, but I still think netcat will do it:
I still have to pass the login and password interactively to telnet.
It was "expect". Used Tk, IIRC. There is Perl modification Perl::Expect. I used it once to automate some test - create telnet sessions, controlled by scripts. It was not trivial to use, but worked nicely. There is similar functionality in Python built in (do not remember by heart, but can find out, if needed
Thanks! Yes, that was it, expect. And "autoexpect" to generate the initial script: cer@Isengard:~> autoexpect telnet router.valinor autoexpect started, file is script.exp Trying 192.168.1.1... Connected to router.valinor. Escape character is '^]'. BCM963268 Broadband Router Login: **** Password:
wan show VCC Con. Service Interface Proto. IGMP NAT MLD Status IP ID Name Name address N/A 2 3 eth0.2 IPoE Disable Enable Disable Connected 10.*.*.* N/A 3 2 eth0.3 IPoE Enable Enable Disable Connected 10.*.*.* N/A 1 6 ppp0.1 PPPoE Disable Enable Disable Connected 83.Z.Y.X quit
Bye bye. Have a nice day!!! Connection closed by foreign host. autoexpect done, file is script.exp cer@Isengard:~> So, I already have "script.exp" done. [...] Finally, this does it: #!/bin/bash ~/bin/GetIpFromRouter.exp > ~/bin/router_output.log grep PPPoE router_output.log | awk '{ print $10}' -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Yamaban wrote:
On Fri, 2 Dec 2016 12:20, Thomas Wagner wrote:
On 2016-12-02 11:29, Carlos E. R. wrote:
On 2016-12-02 09:11, Thomas Wagner wrote:
On 2016-12-02 03:24, Carlos E. R. wrote:
Hi,
DynDns.org TZO No-IP
Do you have comments on any of those? IMHO they are not free. Either you have to login every couple of weeks or pay.
login? Manually? :-( Yep, login on their homepage an hit a certain button there. At least for the free version of no-ip. Years ago I had the free version von dyndns with the same required procedure. Scripting a login should be possible but once they change something you'll have to update the scripts.
Well, flashing that router is totally out of the question, Ok, then I would go with a script on some raspberry (or a homeserver if available) that checks for an IP change periodically. Then your are also independent of a dynamic DNS provider.
Hmmm, many router have a "home-page" that you can see without even logging in on the router, e.g. on my router, a "easyBox 802", page is http://easy.box/ or via "gateway"-ip
If you look at that page, many routers provide the outside IP on it. use wget/curl/(other tool) to get that page, extract that outside-IP compare to a locally stored value, if changed, store new value and run ddns-update script. run that test every minute via local cron. That way only the updates leave your private network.
Yep, that's a clever way of doing it. -- Per Jessen, Zürich (3.4°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-12-02 13:49, Per Jessen wrote:
Yamaban wrote:
If you look at that page, many routers provide the outside IP on it. use wget/curl/(other tool) to get that page, extract that outside-IP compare to a locally stored value, if changed, store new value and run ddns-update script. run that test every minute via local cron. That way only the updates leave your private network.
Yep, that's a clever way of doing it.
Now that I remember. There was a router I could access by ssh, and ask it the IP. I wrote a script doing that query, using, what was it, chat? I tried now and certainly, my router responds on telnet and I could login. No, it does not support ssh! But it is a piece of shit. I issued "dumpsysinfo" and it responded with several pages, some like XML! It dumps so much that it fill the terminal buffer completely. The "statistics" dumps output similar to "ifconfig" in Linux, and a paragraph is the ppp0.1 interface including the external IP. Not trivial to parse. Interestingly, it does include an IPv6 address! /64 "wan show" also displays the IPv4 external address on "ppp0.1", plus two other interfaces eth0.2 and eth0.3 with 10.... addresses. Doesn't show any IPv4 addresses. I think I may script it again. But maybe not soon enough. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Carlos E. R. wrote:
On 2016-12-02 13:49, Per Jessen wrote:
Yamaban wrote:
If you look at that page, many routers provide the outside IP on it. use wget/curl/(other tool) to get that page, extract that outside-IP compare to a locally stored value, if changed, store new value and run ddns-update script. run that test every minute via local cron. That way only the updates leave your private network.
Yep, that's a clever way of doing it.
Now that I remember. There was a router I could access by ssh, and ask it the IP. I wrote a script doing that query, using, what was it, chat?
I tried now and certainly, my router responds on telnet and I could login. No, it does not support ssh!
But it is a piece of shit. I issued "dumpsysinfo" and it responded with several pages, some like XML! It dumps so much that it fill the terminal buffer completely.
XML is easy to parse though - you can probably fish the ipaddress with a simple xpath. -- Per Jessen, Zürich (3.9°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2016-12-02 14:37, Carlos E. R. wrote:
"wan show" also displays the IPv4 external address on "ppp0.1", plus two other interfaces eth0.2 and eth0.3 with 10.... addresses. Doesn't show any IPv4 addresses.
Ooops, I meant IPv6. The IPv4 address is there. - -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlhBg2YACgkQja8UbcUWM1zT5QD/XO4J19QYb3aqnbn0HudzkqNF 6IgGK3Gi80sEuBitfyIA/i95azzvruvWjQ42pNfk75Rq6cph+3fooMjejpUZAsTG =riNF -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Carlos E. R. wrote:
Looking at my router, I see the possibility of setting up dynamic DNS service, for accessing my home from outside. My router offers these:
DynDns.org TZO No-IP
Do you have comments on any of those?
I think dyndns.org was turned into dyn.com which was recently bought by Oracle, god knows why. <shameless plug> I can recommend http://www.dns24.ch </shameless plug>
Using the configuration on the router would save me from setting up some daemon in Linux. Should be easier, right? If not, I'm of course open to other possibilities.
It depends on how configurable your router is - if you can add your own update string etc, running it on the router is fine. Otherwise it's a simple cronjob on a linux box. -- Per Jessen, Zürich (-1.2°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-12-02 09:26, Per Jessen wrote:
Carlos E. R. wrote:
<shameless plug> I can recommend http://www.dns24.ch </shameless plug>
Using the configuration on the router would save me from setting up some daemon in Linux. Should be easier, right? If not, I'm of course open to other possibilities.
It depends on how configurable your router is - if you can add your own update string etc, running it on the router is fine. Otherwise it's a simple cronjob on a linux box.
My router is not configurable, but hardcoded. I am reading now dns24-dynamic-dns-howto.pdf, and they don't provide a script. A cronjob that runs every five minutes querying the "update" link directly would not be appropriate. It really has to test first for IP changes. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Carlos E. R. wrote:
On 2016-12-02 09:26, Per Jessen wrote:
Carlos E. R. wrote:
<shameless plug> I can recommend http://www.dns24.ch </shameless plug>
Using the configuration on the router would save me from setting up some daemon in Linux. Should be easier, right? If not, I'm of course open to other possibilities.
It depends on how configurable your router is - if you can add your own update string etc, running it on the router is fine. Otherwise it's a simple cronjob on a linux box.
My router is not configurable, but hardcoded. I am reading now dns24-dynamic-dns-howto.pdf, and they don't provide a script. A cronjob that runs every five minutes querying the "update" link directly would not be appropriate. It really has to test first for IP changes.
It doesn't matter, as long as the webserver can handle the load. (which it can). -- Per Jessen, Zürich (2.5°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 12/02/2016 03:26 AM, Per Jessen wrote:
Carlos E. R. wrote:
Looking at my router, I see the possibility of setting up dynamic DNS service, for accessing my home from outside. My router offers these:
DynDns.org TZO No-IP
Do you have comments on any of those?
I think dyndns.org was turned into dyn.com which was recently bought by Oracle, god knows why.
<shameless plug> I can recommend http://www.dns24.ch </shameless plug>
*sigh* My Thompson DCW775 seems to have www.dyndns.org hard coded as the only option. IIR at one time DynDNS had a free single domain offering. I can't see that on the new oracle Upgraded web site. I look at their web site now, no I don't need "30 host names for just $40/year". That's US$40, of course, in a world where other currencies aren't doing so well by comparison. The DCW775 is, otherwise, an excellent cable modem and I'm happy with it. Its not as if I'm running an service on my home hosts that absolutely NEED named DNS access. Still, I feel hard done by. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anton Aylward wrote:
On 12/02/2016 03:26 AM, Per Jessen wrote:
Carlos E. R. wrote:
Looking at my router, I see the possibility of setting up dynamic DNS service, for accessing my home from outside. My router offers these:
DynDns.org TZO No-IP
Do you have comments on any of those?
I think dyndns.org was turned into dyn.com which was recently bought by Oracle, god knows why.
<shameless plug> I can recommend http://www.dns24.ch </shameless plug>
*sigh* My Thompson DCW775 seems to have www.dyndns.org hard coded as the only option.
Yeah, I think there are a few makes like that out there. You would need to run a cronjob then. -- Per Jessen, Zürich (2.3°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-12-02 09:26, Per Jessen wrote:
Carlos E. R. wrote:
<shameless plug> I can recommend http://www.dns24.ch </shameless plug>
Ok, I'm trying to set this up. At https://www.dns24.ch/admin/domains# it asks for my domains. I took it to be the invented name by which I want to access my machine (like "texas" in “texas.dyndns24.ch”), but it gives an error: Invalid domain name; a valid domain name consists of at least two labels, separated by '.' (period) •••This is your list of domains defined in the DNS24 database. You may use both regular and internationalized domain names and top level domains. When you create new domains, you may use your local format (dömain.ñame) or enter them directly using the punycode format (xn--dmain-jua.xn--ame-6ma). This utterly confuses me. I don't have a domain name! I want to create one, and it is a single word, not dots, to be the prefix to “.dyndns24.ch” -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
* Carlos E. R. <robin.listas@telefonica.net> [12-02-16 17:45]:
On 2016-12-02 09:26, Per Jessen wrote:
Carlos E. R. wrote:
<shameless plug> I can recommend http://www.dns24.ch </shameless plug>
Ok, I'm trying to set this up.
At https://www.dns24.ch/admin/domains# it asks for my domains. I took it to be the invented name by which I want to access my machine (like "texas" in “texas.dyndns24.ch”), but it gives an error:
Invalid domain name; a valid domain name consists of at least two labels, separated by '.' (period)
•••This is your list of domains defined in the DNS24 database.
You may use both regular and internationalized domain names and top level domains. When you create new domains, you may use your local format (dömain.ñame) or enter them directly using the punycode format (xn--dmain-jua.xn--ame-6ma).
This utterly confuses me. I don't have a domain name! I want to create one, and it is a single word, not dots, to be the prefix to “.dyndns24.ch”
you are trying to set up a domain on dns24.ch, not dyndns24.ch. fix the names and maybe you will have better luck :) -- (paka)Patrick Shanahan Plainfield, Indiana, USA @ptilopteri http://en.opensuse.org openSUSE Community Member facebook/ptilopteri Photos: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 Photos: http://wahoo.no-ip.org/piwigo @ http://linuxcounter.net -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-12-03 01:45, Patrick Shanahan wrote:
* Carlos E. R. <robin.listas@telefonica.net> [12-02-16 17:45]:
On 2016-12-02 09:26, Per Jessen wrote:
Carlos E. R. wrote:
<shameless plug> I can recommend http://www.dns24.ch </shameless plug>
Ok, I'm trying to set this up.
At https://www.dns24.ch/admin/domains# it asks for my domains. I took it to be the invented name by which I want to access my machine (like "texas" in “texas.dyndns24.ch”), but it gives an error:
Invalid domain name; a valid domain name consists of at least two labels, separated by '.' (period)
•••This is your list of domains defined in the DNS24 database.
You may use both regular and internationalized domain names and top level domains. When you create new domains, you may use your local format (dömain.ñame) or enter them directly using the punycode format (xn--dmain-jua.xn--ame-6ma).
This utterly confuses me. I don't have a domain name! I want to create one, and it is a single word, not dots, to be the prefix to “.dyndns24.ch”
you are trying to set up a domain on dns24.ch, not dyndns24.ch. fix the names and maybe you will have better luck :)
Must be typo on the instructions PDF. The question still remains, it is asking for two names separated by a dot. Why? What names? It doesn't give examples of what it is wanting. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On Sat 03 Dec 2016 03:32:49 AM CST, Carlos E. R. wrote:
Invalid domain name; a valid domain name consists of at least two labels, separated by '.' (period)
•••This is your list of domains defined in the DNS24 database.
You may use both regular and internationalized domain names and top level domains. When you create new domains, you may use your local format (dömain.ñame) or enter them directly using the punycode format (xn--dmain-jua.xn--ame-6ma).
This utterly confuses me. I don't have a domain name! I want to create one, and it is a single word, not dots, to be the prefix to “.dyndns24.ch”
you are trying to set up a domain on dns24.ch, not dyndns24.ch. fix the names and maybe you will have better luck :)
Must be typo on the instructions PDF.
The question still remains, it is asking for two names separated by a dot. Why? What names?
It doesn't give examples of what it is wanting.
Hi Your domain, since you don't have one create a fake one temporarily (carlos.er), then in the admin panel delete it the go to My domains and delete, then go to My dynDNS and add you hostname eg 'texas' I use dyndns (since my router supports it) with 30 hostnames, was a few years back on special for 5 years... -- Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890) openSUSE Leap 42.1|GNOME 3.16.2|4.1.34-33-default up 3 days 4:13, 3 users, load average: 0.27, 0.29, 0.40 CPU AMD Athlon(tm) II X4 635 @ 2.90GHz | GPU Nvidia GeForce 8800 GT -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-12-03 04:24, Malcolm wrote:
On Sat 03 Dec 2016 03:32:49 AM CST, Carlos E. R. wrote:
The question still remains, it is asking for two names separated by a dot. Why? What names?
It doesn't give examples of what it is wanting.
Hi Your domain, since you don't have one create a fake one temporarily (carlos.er), then in the admin panel delete it the go to My domains and delete, then go to My dynDNS and add you hostname eg 'texas'
Apparently it is not needed at all. Just click on the tab to go to "My dynDNS" instead and enter my machine name. I got it working, with updates from the command line, but it took me close to an hour to find out. This may be trivial to you guys, but me, I have never done anything similar...
I use dyndns (since my router supports it) with 30 hostnames, was a few years back on special for 5 years...
30 hostnames? I can't imagine so many. I use only one... Yes, my router supports 3 services, but in the end I went with this other one. It is free, no need to remember to refresh the subscription manually. I may also setup another one on the router, and compare ;-) What would happen if I invent a subdomain? It would not query my DNS to find out, I guess. Or would it? That would be extra service (pay). Then you could have hundreds of hostnames for the same price. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On Sat 03 Dec 2016 05:04:42 AM CST, Carlos E. R. wrote:
On 2016-12-03 04:24, Malcolm wrote:
On Sat 03 Dec 2016 03:32:49 AM CST, Carlos E. R. wrote:
The question still remains, it is asking for two names separated by a dot. Why? What names?
It doesn't give examples of what it is wanting.
Hi Your domain, since you don't have one create a fake one temporarily (carlos.er), then in the admin panel delete it the go to My domains and delete, then go to My dynDNS and add you hostname eg 'texas'
Apparently it is not needed at all. Just click on the tab to go to "My dynDNS" instead and enter my machine name. I got it working, with updates from the command line, but it took me close to an hour to find out.
This may be trivial to you guys, but me, I have never done anything similar...
I use dyndns (since my router supports it) with 30 hostnames, was a few years back on special for 5 years...
30 hostnames? I can't imagine so many. I use only one...
The dyndns service offer lots of different domains so could have one hostname and 30 different domains... Have 23 hosts at the moment and a few more to come..
Yes, my router supports 3 services, but in the end I went with this other one. It is free, no need to remember to refresh the subscription manually.
I may also setup another one on the router, and compare ;-)
What would happen if I invent a subdomain? It would not query my DNS to find out, I guess. Or would it? That would be extra service (pay). Then you could have hundreds of hostnames for the same price.
Have no idea, don't see it working unless it's registered? -- Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890) openSUSE Leap 42.1|GNOME 3.16.2|4.1.34-33-default up 3 days 5:07, 3 users, load average: 0.29, 0.60, 0.52 CPU AMD Athlon(tm) II X4 635 @ 2.90GHz | GPU Nvidia GeForce 8800 GT -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Malcolm wrote:
On Sat 03 Dec 2016 03:32:49 AM CST, Carlos E. R. wrote:
Invalid domain name; a valid domain name consists of at least two labels, separated by '.' (period)
•••This is your list of domains defined in the DNS24 database.
You may use both regular and internationalized domain names and top level domains. When you create new domains, you may use your local format (dömain.ñame) or enter them directly using the punycode format (xn--dmain-jua.xn--ame-6ma).
This utterly confuses me. I don't have a domain name! I want to create one, and it is a single word, not dots, to be the prefix to “.dyndns24.ch”
you are trying to set up a domain on dns24.ch, not dyndns24.ch. fix the names and maybe you will have better luck :)
Must be typo on the instructions PDF.
The question still remains, it is asking for two names separated by a dot. Why? What names?
It doesn't give examples of what it is wanting.
Hi Your domain, since you don't have one create a fake one temporarily (carlos.er), then in the admin panel delete it the go to My domains and delete, then go to My dynDNS and add you hostname eg 'texas'
Once you have created your account and logged in, you click "My dynDNS", change your servicelevel from "None" to "Basic", go back to "My dynDNS" and pick a hostname. -- Per Jessen, Zürich (1.9°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-12-03 03:32, Carlos E. R. wrote:
On 2016-12-03 01:45, Patrick Shanahan wrote:
This utterly confuses me. I don't have a domain name! I want to create one, and it is a single word, not dots, to be the prefix to “.dyndns24.ch”
you are trying to set up a domain on dns24.ch, not dyndns24.ch. fix the names and maybe you will have better luck :)
Must be typo on the instructions PDF.
No, the administration page is in dns24.ch, but the free domains are something.dyndns24.ch
The question still remains, it is asking for two names separated by a dot. Why? What names?
It doesn't give examples of what it is wanting.
I tried to ignore that page, and instead setup "basic" dynDNS, creating an invented hostname, so that I get "hostname.dyndns24.ch The instructions say that the updates are done by browsing to this address: http://userid:password@dyn.dns24.ch/update? hostname=hostname&type=type&data=data It is a long line. The userid is my email address, so it contains an "@" symbol. There is another "@" after the password. Can that work? :-? Well, it works in firefox, after several trials, but not with wget, says "bad port number". curl does work, because there is an example in the FAQ: curl --anyauth -u userid:password http://dyn.dns24.ch/update/?hostname=example.dyndns24.ch&type=A&data=127.0.0.1 Guided by that one, the equivalent for wget is: wget --user=... --password=.... wget "http://dyn.dns24.ch/update?....." The instructions do not mention that the "hostname" is the full hostname. This took me half an hour or more to find out. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Carlos E. R. wrote:
The instructions say that the updates are done by browsing to this address:
http://userid:password@dyn.dns24.ch/update? hostname=hostname&type=type&data=data
It is a long line. The userid is my email address, so it contains an "@" symbol. There is another "@" after the password. Can that work? :-?
In the username, you might need to encode the '@' as %40 I believe. It depends on the client you're using. In my elderly Firefox, I didn't need to, but Firefox popped up a window saying "you're about to log in with userid so-and-so". Then I created an AAAA record with this: http://dyn.dns24.ch/update?hostname=berlusconi.dyndns24.ch&type=AAAA&data=client If you don't specify your userid+password, Firefox will ask for them. You can also do the update with https://
Well, it works in firefox, after several trials, but not with wget, says "bad port number".
wget works too, but as you're running it from the command-line, don't forget appropriate quoting and/or escaping. The ampersands typically need escaping - or just put the whole URL in quotes.
Guided by that one, the equivalent for wget is:
wget --user=... --password=.... wget "http://dyn.dns24.ch/update?....."
Yes, something like that will also work. There's no real magic in the URL, it's just a URL with authentication. -- Per Jessen, Zürich (2.0°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-12-03 09:27, Per Jessen wrote:
Carlos E. R. wrote:
The instructions say that the updates are done by browsing to this address:
http://userid:password@dyn.dns24.ch/update? hostname=hostname&type=type&data=data
It is a long line. The userid is my email address, so it contains an "@" symbol. There is another "@" after the password. Can that work? :-?
In the username, you might need to encode the '@' as %40 I believe. It depends on the client you're using. In my elderly Firefox, I didn't need to, but Firefox popped up a window saying "you're about to log in with userid so-and-so". Then I created an AAAA record with this:
http://dyn.dns24.ch/update?hostname=berlusconi.dyndns24.ch&type=AAAA&data=client
If you don't specify your userid+password, Firefox will ask for them.
Yes, it did that once.
You can also do the update with https://
Ah, yes, I forgot that one. [...] Fails: "Unable to locally verify the issuer's authority" (and does nothing). I Need to download and install the certificate somewhere.
Well, it works in firefox, after several trials, but not with wget, says "bad port number".
wget works too, but as you're running it from the command-line, don't forget appropriate quoting and/or escaping. The ampersands typically need escaping - or just put the whole URL in quotes.
Guided by that one, the equivalent for wget is:
wget --user=... --password=.... wget "http://dyn.dns24.ch/update?....."
Yes, something like that will also work.
I could not make it work otherwise.
There's no real magic in the URL, it's just a URL with authentication.
"Just", LOL. To me it is magic :-) -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
Carlos E. R. wrote:
On 2016-12-02 09:26, Per Jessen wrote:
Carlos E. R. wrote:
<shameless plug> I can recommend http://www.dns24.ch </shameless plug>
Ok, I'm trying to set this up.
Let me add some short inline answers here, although your questions have probably already been answered by others.
At https://www.dns24.ch/admin/domains# it asks for my domains.
The main purpose of DNS24 is to be a free DNS, but you can just as easily use it for dyndns only.
I took it to be the invented name by which I want to access my machine (like "texas" in “texas.dyndns24.ch”), but it gives an error:
Invalid domain name; a valid domain name consists of at least two labels, separated by '.' (period)
'texas' above is a hostname, 'dyndns24.ch' is the domain name.
This utterly confuses me. I don't have a domain name! I want to create one, and it is a single word, not dots, to be the prefix to “.dyndns24.ch”
Then you go enable your account for dynamic DNS and reserve 'texas' as a hostname. -- Per Jessen, Zürich (1.9°C) http://www.dns24.ch/ - free dynamic DNS, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-12-03 09:07, Per Jessen wrote:
Carlos E. R. wrote:
...
This utterly confuses me. I don't have a domain name! I want to create one, and it is a single word, not dots, to be the prefix to “.dyndns24.ch”
Then you go enable your account for dynamic DNS and reserve 'texas' as a hostname.
The problem is that the registration process jumped to that page, so that I thought it was mandatory to fill it. Nor did I understand that it was asking for an existing domain of my own. Anyway, it is working now :-) I just have to finish the cronjob script. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On 2016-12-03 14:59, Carlos E. R. wrote:
On 2016-12-03 09:07, Per Jessen wrote:
Carlos E. R. wrote:
I just have to finish the cronjob script.
I have a coding problem. I obtain the current IP this way from the router: /usr/local/bin/GetIpFromRouter.exp > /run/DDNS/router_output.log CURRENTIP=`grep PPPoE /run/DDNS/router_output.log | awk '{ print $10}'` The first line is an expect script that does a telnet to the router, issues the command "wan show", which produces a text that includes the IP. The second line extracts the IP from the line, like this one: N/A 1 6 ppp0.1 PPPoE Disable Enable Disable Connected 192.168.1.1\r The problem is that as the router ends the line in non unix format, the variable awk gets is "192.168.1.1^M". How can I remove that "^M"? It produces several errors in the script. I don't know awk, so I don't know how the awk code could be modified: echo line | awk '{ print $10}' cut? I don't see how to extract till the last char minus one. Convert the entire telnet session to Linux format? dos2unix? No, does not work. This is the code: usr/local/bin/GetIpFromRouter.exp > /run/DDNS/router_output.log 2> /run/DDNS/router_output_err.log # remove ^M chars from eol /usr/bin/dos2unix /run/DDNS/router_output_err.log CURRENTIP=`grep PPPoE /run/DDNS/router_output.log | awk '{ print $10}'` 2> /run/DDNS/router_output_greperr.log echo "Last IP: $LASTKNOWNIP" echo "Current IP: $CURRENTIP" echo "Last IP: $LASTKNOWNIP Current IP: $CURRENTIP" The last echo produces this output: cer@Isengard:~> TrackIpAndUpdateDDNS dos2unix: converting file /run/DDNS/router_output_err.log to Unix format ... Last IP: 83.36.42.230 Current IP: 83.36.42.230 Current IP: 83.36.42.230 <<= cer@Isengard:~> The text "Last IP ..." in the last line is overwritten with "Current IP..." because it contains a carriage return. So the problem is in the awk code, it cuts too late. sed? I don't know how to use it. I could try appending an space to the line, perhaps... How? Ideas? -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On Sat, Dec 3, 2016 at 4:29 PM, Carlos E. R. <robin.listas@telefonica.net> wrote:
On 2016-12-03 14:59, Carlos E. R. wrote:
On 2016-12-03 09:07, Per Jessen wrote:
Carlos E. R. wrote:
I just have to finish the cronjob script.
I have a coding problem.
I obtain the current IP this way from the router:
/usr/local/bin/GetIpFromRouter.exp > /run/DDNS/router_output.log CURRENTIP=`grep PPPoE /run/DDNS/router_output.log | awk '{ print $10}'`
The first line is an expect script that does a telnet to the router, issues the command "wan show", which produces a text that includes the IP. The second line extracts the IP from the line, like this one:
N/A 1 6 ppp0.1 PPPoE Disable Enable Disable Connected 192.168.1.1\r
The problem is that as the router ends the line in non unix format, the variable awk gets is "192.168.1.1^M".
How can I remove that "^M"?
It produces several errors in the script.
I don't know awk, so I don't know how the awk code could be modified:
echo line | awk '{ print $10}'
cut? I don't see how to extract till the last char minus one.
Convert the entire telnet session to Linux format? dos2unix? No, does not work.
This is the code:
usr/local/bin/GetIpFromRouter.exp > /run/DDNS/router_output.log 2> /run/DDNS/router_output_err.log # remove ^M chars from eol /usr/bin/dos2unix /run/DDNS/router_output_err.log CURRENTIP=`grep PPPoE /run/DDNS/router_output.log | awk '{ print $10}'` 2> /run/DDNS/router_output_greperr.log
echo "Last IP: $LASTKNOWNIP" echo "Current IP: $CURRENTIP"
echo "Last IP: $LASTKNOWNIP Current IP: $CURRENTIP"
The last echo produces this output:
cer@Isengard:~> TrackIpAndUpdateDDNS dos2unix: converting file /run/DDNS/router_output_err.log to Unix format ... Last IP: 83.36.42.230 Current IP: 83.36.42.230 Current IP: 83.36.42.230 <<= cer@Isengard:~>
The text "Last IP ..." in the last line is overwritten with "Current IP..." because it contains a carriage return.
So the problem is in the awk code, it cuts too late.
sed? I don't know how to use it.
I could try appending an space to the line, perhaps... How?
Ideas?
tr -d "\r", perhaps: /usr/local/bin/GetIpFromRouter.exp | tr -d "\r" > /run/DDNS/router_output.log -- Mark Goldstein -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Sat, 3 Dec 2016 15:29, Carlos E. R. <robin.listas@...> wrote:
On 2016-12-03 14:59, Carlos E. R. wrote:
On 2016-12-03 09:07, Per Jessen wrote:
Carlos E. R. wrote:
I just have to finish the cronjob script.
I have a coding problem.
I obtain the current IP this way from the router:
/usr/local/bin/GetIpFromRouter.exp > /run/DDNS/router_output.log CURRENTIP=`grep PPPoE /run/DDNS/router_output.log | awk '{ print $10}'`
The first line is an expect script that does a telnet to the router, issues the command "wan show", which produces a text that includes the IP. The second line extracts the IP from the line, like this one:
N/A 1 6 ppp0.1 PPPoE Disable Enable Disable Connected 192.168.1.1\r
The problem is that as the router ends the line in non unix format, the variable awk gets is "192.168.1.1^M".
How can I remove that "^M"?
It produces several errors in the script.
I don't know awk, so I don't know how the awk code could be modified:
echo line | awk '{ print $10}'
cut? I don't see how to extract till the last char minus one.
Convert the entire telnet session to Linux format? dos2unix? No, does not work.
This is the code:
usr/local/bin/GetIpFromRouter.exp > /run/DDNS/router_output.log 2> /run/DDNS/router_output_err.log # remove ^M chars from eol /usr/bin/dos2unix /run/DDNS/router_output_err.log CURRENTIP=`grep PPPoE /run/DDNS/router_output.log | awk '{ print $10}'` 2> /run/DDNS/router_output_greperr.log
echo "Last IP: $LASTKNOWNIP" echo "Current IP: $CURRENTIP"
echo "Last IP: $LASTKNOWNIP Current IP: $CURRENTIP"
The last echo produces this output:
cer@Isengard:~> TrackIpAndUpdateDDNS dos2unix: converting file /run/DDNS/router_output_err.log to Unix format ... Last IP: 83.36.42.230 Current IP: 83.36.42.230 Current IP: 83.36.42.230 <<= cer@Isengard:~>
The text "Last IP ..." in the last line is overwritten with "Current IP..." because it contains a carriage return.
So the problem is in the awk code, it cuts too late.
sed? I don't know how to use it.
I could try appending an space to the line, perhaps... How?
Let's try "simple" first: [code of cron-script] # make sure LASTKNOWNIP is clean: tempip=`echo $LASTKNOWNIP | tr -d '\r'` LASTKNOWNIP=$tempip # get actual info from router, log errors /usr/local/bin/GetIpFromRouter.exp > /run/DDNS/router_output.log 2> /run/DDNS/router_output_err.log # grep out PPoE line, catch out wan ip, log errors CURRENTIP=`grep PPPoE /run/DDNS/router_output.log | tr -d '\r' | awk '{print $10}'` 2> /run/DDNS/router_output_greperr.log echo "Last IP: '$LASTKNOWNIP' Current IP: '$CURRENTIP'" [/code] that code (which is mostly what You'he shown) should give you: Last IP: '83.36.42.230' Current IP: '83.36.42.230' Ok, now what did I different: 1. Added cleanup of LASTKNOWNIP, most likely it still will have that added '\r' or '^M', lets remove that. 2. Removed dos2unix of the router_output_err.log, why the error log?? 3. Added cleanup to the output of grep, before awk. How did I do that cleanup? Using the most simple tool available: "tr" Cheers, have a fruitfull weekend, - Yamaban PS: Yes, it's seeing that single tree before the forest thing. Missing the obvious, because beeing to deep in the problem. Happens to every one now and then. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-12-03 16:02, Yamaban wrote:
On Sat, 3 Dec 2016 15:29, Carlos E. R. <robin.listas@...> wrote:
Let's try "simple" first:
[code of cron-script] # make sure LASTKNOWNIP is clean: tempip=`echo $LASTKNOWNIP | tr -d '\r'` LASTKNOWNIP=$tempip
You are right, the last IP was stored with the error.
# get actual info from router, log errors /usr/local/bin/GetIpFromRouter.exp > /run/DDNS/router_output.log 2> /run/DDNS/router_output_err.log
# grep out PPoE line, catch out wan ip, log errors CURRENTIP=`grep PPPoE /run/DDNS/router_output.log | tr -d '\r' | awk '{print $10}'` 2> /run/DDNS/router_output_greperr.log
echo "Last IP: '$LASTKNOWNIP' Current IP: '$CURRENTIP'" [/code]
that code (which is mostly what You'he shown) should give you:
Last IP: 'MY_IP' Current IP: 'MY_IP'
Ok, now what did I different:
1. Added cleanup of LASTKNOWNIP, most likely it still will have that added '\r' or '^M', lets remove that.
Yes, it is so.
2. Removed dos2unix of the router_output_err.log, why the error log??
Just in case there is some error, know about it. The intention is to email those to myself. Thus if the script fails somehow while I'm out, I still get an email with info, enough info to access via the IP and correct problem. Hopefully! We all know how sure things fail in computing ;-)
3. Added cleanup to the output of grep, before awk.
How did I do that cleanup? Using the most simple tool available: "tr"
Right! I forgot about that tool. Thanks! Now I have a different unrelated problem: dyn.dns24.ch says I'm not authorized. Why? It worked before. That's with wget. curl appears to works, but doesn't really say: cer@isengard:~> curl --anyauth -u USER:PASS "http://dyn.dns24.ch/update?hostname=MY_HOST.dyndns24.ch&type=A&data=IPNUMBER" 0000 Transaction successful, # affected row(s) = 0 cer@isengard:~> The output is misleading, see wget: cer@isengard:~> wget --user=LOGIN --password=PASSWORD "http://dyn.dns24.ch/update?hostname=MY_HOST.dyndns24.ch&type=A&data=MY_IP" --2016-12-03 16:43:58-- http://dyn.dns24.ch/update?hostname=MY_HOST.dyndns24.ch&type=A&data=MY_IP Resolving dyn.dns24.ch (dyn.dns24.ch)... 185.85.251.248, 2a03:7520:4c68:2::e047 Connecting to dyn.dns24.ch (dyn.dns24.ch)|185.85.251.248|:80... connected. HTTP request sent, awaiting response... 401 Unauthorized Reusing existing connection to dyn.dns24.ch:80. HTTP request sent, awaiting response... 200 OK Length: 51 [text/plain] Saving to: ‘update?hostname=MY_HOST.dyndns24.ch&type=A&data=MY_IP’ 100%[==================================================================================================>] 51 --.-K/s in 0s 2016-12-03 16:43:58 (4,29 MB/s) - ‘update?hostname=MY_HOST.dyndns24.ch&type=A&data=MY_IP’ saved [51/51] cer@isengard:~> Dunno, there is a 401 Unauthorized, then a 200 OK. I don't know what happened. The saved "file" from above wget says: 0000 Transaction successful, # affected row(s) = 0 Maybe that means success. :-? I need nutrients and rest. O:-) -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On 2016-12-03 16:54, Carlos E. R. wrote:
I need nutrients and rest. O:-)
Well, it is finally working. Cronjob setup and working. Every five minutes a cronjob interrogates the router, using a expect autogenerated script, issuing a command that prints the external IP and other things. The script extracts that IP, compares with the currently assigned IP, and if changed, updates the new IP to the dyndns service. If there was a change it sends an external email to me so that I know how things are going. Thanks everybody :-)) -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 El 2016-12-04 a las 21:21 +0100, Carlos E. R. escribió:
Well, it is finally working. Cronjob setup and working. Every five minutes a cronjob interrogates the router, using a expect autogenerated script, issuing a command that prints the external IP and other things. The script extracts that IP, compares with the currently assigned IP, and if changed, updates the new IP to the dyndns service. If there was a change it sends an external email to me so that I know how things are going.
Thanks everybody :-))
Well, it failed when I was away, I lost connectivity to it from remote. Fortunately, it told me that with an email, and the email headers contained the IP address and I could connect up again and investigate. It turned out that name resolution of "router" failed, because dnsmasq was configured to look also at the bind server on my desktop machine... which was switched off (and on during testing). Time out and failure solving local names, but not remote names (or postfix did not give up on timeout that easily). Very curious. Problem repaired. Phew! Redundancy is a good thing... - -- Cheers Carlos E. R. (from 13.1 x86_64 "Bottle" (Minas Tirith)) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iF4EAREIAAYFAlhLQDIACgkQja8UbcUWM1yxzAD+LKljyaUhLVMk7cIQiamrJXhf SJde0CSFZ2lAA51YeywA/jPXCfn3AlUGfL6gko26ZC186RF1/2fzaIWja/xaTw7k =YKpS -----END PGP SIGNATURE-----
Carlos E. R. wrote:
On 2016-12-03 14:59, Carlos E. R. wrote:
On 2016-12-03 09:07, Per Jessen wrote:
Carlos E. R. wrote:
I just have to finish the cronjob script.
I have a coding problem.
I obtain the current IP this way from the router:
/usr/local/bin/GetIpFromRouter.exp > /run/DDNS/router_output.log CURRENTIP=`grep PPPoE /run/DDNS/router_output.log | awk '{ print $10}'` The first line is an expect script that does a telnet to the router, issues the command "wan show", which produces a text that includes the IP. The second line extracts the IP from the line, like this one:
N/A 1 6 ppp0.1 PPPoE Disable Enable Disable Connected 192.168.1.1\r
The problem is that as the router ends the line in non unix format, the variable awk gets is "192.168.1.1^M".
How can I remove that "^M"?
Maybe use sed instead ? sed -e 's/^.*\([0-9.]\+\).*$/\1/' -- Per Jessen, Zürich (2.4°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
I came across: <https://dynv6.com/> -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (10)
-
Anton Aylward
-
cagsm
-
Carlos E. R.
-
John Andersen
-
Malcolm
-
Mark Goldstein
-
Patrick Shanahan
-
Per Jessen
-
Thomas Wagner
-
Yamaban