{"action":"created","issue":{"url":"https://api.github.com/repos/smxi/inxi/issues/81","repository_url":"https://api.github.com/repos/smxi/inxi","labels_url":"https://api.github.com/repos/smxi/inxi/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/smxi/inxi/issues/81/comments","events_url":"https://api.github.com/repos/smxi/inxi/issues/81/events","html_url":"https://github.com/smxi/inxi/issues/81","id":133256557,"number":81,"title":"Use a dns request for WAN IP address detection.","user":{"login":"sebma","id":4569306,"avatar_url":"https://avatars.githubusercontent.com/u/4569306?v=3","gravatar_id":"","url":"https://api.github.com/users/sebma","html_url":"https://github.com/sebma","followers_url":"https://api.github.com/users/sebma/followers","following_url":"https://api.github.com/users/sebma/following{/other_user}","gists_url":"https://api.github.com/users/sebma/gists{/gist_id}","starred_url":"https://api.github.com/users/sebma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebma/subscriptions","organizations_url":"https://api.github.com/users/sebma/orgs","repos_url":"https://api.github.com/users/sebma/repos","events_url":"https://api.github.com/users/sebma/events{/privacy}","received_events_url":"https://api.github.com/users/sebma/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/smxi/inxi/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/smxi/inxi/labels/help%20wanted","name":"help wanted","color":"159818"},{"url":"https://api.github.com/repos/smxi/inxi/labels/Priority-Low","name":"Priority-Low","color":"ededed"},{"url":"https://api.github.com/repos/smxi/inxi/labels/Type-Enhancement","name":"Type-Enhancement","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-02-12T14:34:55Z","updated_at":"2016-02-13T09:58:03Z","closed_at":null,"body":"Hi,\r\n\r\nI have just found on the web a must faster and reliable method to get the WAN IP address information :\r\n\r\n```\r\n$ dig  +short myip.opendns.com @resolver1.opendns.com\r\nx.y.z.t\r\n```\r\nand if I time it to see how long it lasts:\r\n\r\n```\r\n$ time dig +short myip.opendns.com @resolver1.opendns.com\r\nx.y.z.t\r\n\r\nreal    0m0.077s\r\nuser    0m0.018s\r\nsys     0m0.008s\r\n```\r\n\r\nPlease take a look at this [WAN IP via DNS](http://unix.stackexchange.com/a/81699/135038) for more information.\r\n\r\nCan you use this method in your script ?"},"comment":{"url":"https://api.github.com/repos/smxi/inxi/issues/comments/183633878","html_url":"https://github.com/smxi/inxi/issues/81#issuecomment-183633878","issue_url":"https://api.github.com/repos/smxi/inxi/issues/81","id":183633878,"user":{"login":"Mikaela","id":831184,"avatar_url":"https://avatars.githubusercontent.com/u/831184?v=3","gravatar_id":"","url":"https://api.github.com/users/Mikaela","html_url":"https://github.com/Mikaela","followers_url":"https://api.github.com/users/Mikaela/followers","following_url":"https://api.github.com/users/Mikaela/following{/other_user}","gists_url":"https://api.github.com/users/Mikaela/gists{/gist_id}","starred_url":"https://api.github.com/users/Mikaela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mikaela/subscriptions","organizations_url":"https://api.github.com/users/Mikaela/orgs","repos_url":"https://api.github.com/users/Mikaela/repos","events_url":"https://api.github.com/users/Mikaela/events{/privacy}","received_events_url":"https://api.github.com/users/Mikaela/received_events","type":"User","site_admin":false},"created_at":"2016-02-13T09:58:03Z","updated_at":"2016-02-13T09:58:03Z","body":"More reliable dig commands would be:\r\n\r\n```\r\ndig +short myip.opendns.com. A @208.67.222.222\r\ndig +short myip.opendns.com. AAAA @2620:0:ccc::2\r\n```\r\n\r\nWithout the `.` I think in case of DNS problem the query might turn into `myip.opendns.com.mikaela.info` as my DHCP domain is `mikaela.info`.\r\n\r\nAnother issue is that the resolver domains appear to be IPv4-only, so in order to get IPv4 and IPv6 reliably you must use the IP addresses directly, if I recall correctly these are the alternative OpenDNS nameserver."}}