On 08/18/18 07:52, Tom Horsley wrote:
On Fri, 17 Aug 2018 22:55:29 -0700
Jonathan Ryshpan wrote:

Can anyone
recommend a router that actually works?
I'm using this one which I wrote up on my web site:

https://tomhorsley.com/hardware/rt-ac5300/rt-ac5300.html

I believe asus has newer models these days, but they
all use similar firmware and have the merlin firmware
available.

Tom Horsley, your supply of knowledge amazes me.

I have an ASUS RT-AC1200G dual band router that I like very much.
But extracting the public IP via a script using wget and scraping the
result has eluded me, so I've resorted to interrogating an external
website to check the current value of my dynamically assigned IP
(which hardly ever changes).

After reading your quoted blurb, I realized that ssh access to the router
is the answer.  So I changed the administrator to 'dad', installed my public
key in the router, disallowed password login, and wrote this simple script:

/usr/local/bin/getip:

# Get IP from ASUS RT-AC1200G router using ssh login
# with keys for user dad;  Router administrator is set to 'dad'

sudo -u dad ssh  192.168.2.1 "/sbin/ifconfig eth0" |
    grep "inet addr" |
    sed -e "s/.*inet addr://" -e "s/ *Bcast.*//"

Now I can bang on 'getip' as often as I like without upsetting the internet.

Thanks.

--

	David A. De Graaf    DATIX, Inc.    Hendersonville, NC
	dad@datix.us         www.datix.us