{"id":2871,"date":"2019-12-28T05:13:34","date_gmt":"2019-12-28T05:13:34","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=2871"},"modified":"2019-12-28T05:13:34","modified_gmt":"2019-12-28T05:13:34","slug":"ubntmod-check-range-of-ip-addresses-and-see-if-they-resolve-dns","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/ubntmod-check-range-of-ip-addresses-and-see-if-they-resolve-dns\/","title":{"rendered":"UBNTMOD check range of IP addresses and see if they resolve DNS"},"content":{"rendered":"\n<p>The following uses the <a href=\"https:\/\/www.incredigeek.com\/home\/ubntmod\/\">ubntmod.sh<\/a> script to check a device then report if it is resolving DNS or not.  ip=&#8221;192.168.1.&#8221; specifies the first part of the ip, the &#8220;for ((i=1; i&lt;=254;i++))&#8221; tells it to go from 192.168.1.1 &#8211; 192.168.1.254, change the beginning and ending number if you want to change the ip range.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ip=\"192.168.1.\" &amp;&amp; for ((i=10; i&lt;=30;i++)); do if ( fping ${ip}$i -r1 | grep alive); then .\/ubntmod.sh -i ${ip}${i} -e ; else echo ${ip}$i not alive; fi ; done <\/pre>\n\n\n\n<p>Broken out for easier reading.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ip=\"192.168.1.\" <\/code><br><code>for ((i=10; i&lt;=30;i++))<\/code><br><code>do <\/code><br><code>if ( fping ${ip}$i -r1 | grep alive); then <\/code><br><code>.\/ubntmod.sh -i ${ip}${i} -e <\/code><br><code>else echo ${ip}$i not alive<\/code><br><code>fi <\/code><br><code>done <\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p>If the script is able to log into the device and resolve DNS you should get<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">192.168.1.1 Resolves DNS<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The following uses the ubntmod.sh script to check a device then report if it is resolving DNS or not. ip=&#8221;192.168.1.&#8221; specifies the first part of the ip, the &#8220;for ((i=1; i&lt;=254;i++))&#8221; tells it to go from 192.168.1.1 &#8211; 192.168.1.254, change &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/ubntmod-check-range-of-ip-addresses-and-see-if-they-resolve-dns\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[266],"tags":[277,173,243,361,362],"class_list":["post-2871","post","type-post","status-publish","format-standard","hentry","category-scripts","tag-dns","tag-script","tag-scripts","tag-ubntmod","tag-ubntmod-sh"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=2871"}],"version-history":[{"count":1,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2871\/revisions"}],"predecessor-version":[{"id":2904,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/2871\/revisions\/2904"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=2871"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=2871"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=2871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}