ydns / bash-updater

YDNS Bash Updater Script
GNU General Public License v3.0
80 stars 43 forks source link

Error getting local IP Address #38

Open marcorighi opened 9 years ago

marcorighi commented 9 years ago

Hi, I have two computer in two different networks (ddd.ydns.eu - with eth0 and wlan0 and yinyang.ydns.eu with only eth0).

The updater.sh line current_ip=curl --silent --sslv3 https://ydns.eu/api/v1/ip works fine for yinyang.ydns.eu but it creates some problems for ddd.ydns.eu

On updater.sh execution I got

Command 529 of 29 #./updater.sh -V [2015/08/27T00:35:34] Current IP: 2a00:1620:c0:30:XXXX:XXXX:XXXX:XXXX [2015/08/27T00:35:35] YDNS host update failed: ddd.ydns.eu (no suitable host record found)

so I suggest to change this line using current_ip=lwp-request -o text checkip.dyndns.org | awk '{ print $NF }'

in order to patch quickly the bug. In future this command can be changed in something else.

The value 2a00:1620:c0:30:XXXX:XXXX:XXXX:XXXX (where X represents a data omissions) corresponds to wlan0 interface (it is a laptop with eth0 interface and wlan0 interface).

My ifconfig generates the following output

eth0 Link encap:Ethernet HWaddr 6c:3b:XX:XX:XX:XX
inet addr:146.48.XXX.XXX Bcast:146.48.87.255 Mask:255.255.248.0 inet6 addr: fe80::XXXX:XXXX:XXXX:XXXX/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6690429 errors:0 dropped:1 overruns:0 frame:0 TX packets:86147 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:642568722 (612.8 MiB) TX bytes:13411428 (12.7 MiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:58789 errors:0 dropped:0 overruns:0 frame:0 TX packets:58789 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:9030200 (8.6 MiB) TX bytes:9030200 (8.6 MiB)

wlan0 Link encap:Ethernet HWaddr 2c:d0:XX:XX:XX:XX inet addr:146.48.XXX.XXX Bcast:146.48.55.255 Mask:255.255.248.0 inet6 addr: fe80::XXXX:XXXX:XXXX:XXXX/64 Scope:Link inet6 addr: 2a00:1620:c0:30:XXXX:XXXX:XXXX:XXXX/64 Scope:Global UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:180893 errors:0 dropped:0 overruns:0 frame:0 TX packets:32488 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:78568834 (74.9 MiB) TX bytes:4931200 (4.7 MiB)

Write to me if I can provide other informations.

Best Regards Marco Righi