clempaul / dreamhost-dynamic-dns

A Dynamic DNS updater for use with the Dreamhost API
Other
91 stars 39 forks source link

IPv6 issue #11

Closed luciodaou closed 4 years ago

luciodaou commented 4 years ago

https://github.com/clempaul/dreamhost-dynamic-dns/blob/5a9a6d0d583451f0344c34540dab69c4b15a7f82/dynamicdns.bash#L228

Hello, on my raspberry dig +short myip.opendns.com @resolver1.opendns.com resolves to nothing. Removing the +short shows that it is resolving a IPv6 address.

I managed to make it work using the following command to get a IPv4 public address: IP=$(curl -q https://ipinfo.io/ip)

clempaul commented 4 years ago

Hi @luciodaou, thanks for opening the issue!

Does dig +short myip.opendns.com @resolver1.opendns.com -4 return the right thing?

It might make sense for the script to support two modes, one for IPv4 and one for IPv6. Sadly my ISP doesn't support IPv6 so I can't test this myself.

luciodaou commented 4 years ago

Does dig +short myip.opendns.com @resolver1.opendns.com -4 return the right thing?

Yes it does!

clempaul commented 4 years ago

I've pushed a fix which should solve this issue for you. Thanks for reporting it!