NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
perrynmyers
Sep 27, 2020Star
Support for addn_hosts in dnsmasq on Orbi RBR50
Hi, I'm reviving a topic from 2018/2019 that has been closed for inactivity, because the issue still exists and has not been resolved yet. This is related to the closed thread: https://community.ne...
carlovn66
Mar 07, 2021Aspirant
In looking at your script a little closer, I think I have figured out that you do not actually run this on the Orbi router directly, but instead from a machine on the same network, correct? So, that negates all of my questions.
Sorry.
perrynmyers
Mar 08, 2021Star
carlovn66 wrote:In looking at your script a little closer, I think I have figured out that you do not actually run this on the Orbi router directly, but instead from a machine on the same network, correct? So, that negates all of my questions.
Sorry.
Yes carlovn66 that is correct. I run this script on a Fedora Linux host that is on the same network as the Orbi device.
One note is that with the very latest firmware on the RBS50 and RBR50, the login prompt has changed and that breaks the above expect script which looks for "login:" and "password:". Below is a revised script that accounts for that change:
#!/usr/bin/expect set addn_hosts "addn-hosts=/mnt/sda1/hosts\naddn-hosts=/tmp/dhcpd_hostlist\n" set host "192.168.1.1" set user "admin" set password "********************" set timeout 20 spawn telnet $host expect "telnet account:" send "$user\n" expect "telnet password:" send "$password\n" send "grep -qF addn-hosts /etc/dnsmasq.conf || (echo \'$addn_hosts\' >> /etc/dnsmasq.conf && echo 'addn-hosts added')\n" send "pidof dnsmasq\n" send "kill \$(pidof dnsmasq)\n" send "/usr/sbin/dnsmasq --except-interface=lo -r /tmp/resolv.conf\n" send "pidof dnsmasq\n"