Obtain the WAN IP from ssh

I am looking into obtaining the WAN ip address from a TRB255 router. I found some posts on the old wiki with some broken links.
So far I am doing this:

ip -o -4 ad list dev qmimux0 | tr -s ’ ’ | cut -d’ ’ -f4
I’d rather use something more solid if available (even though this works ok)

Hi,
I would suggest to use API if its done in remote system.
https://developers.teltonika-networks.com/
If its done in router you can use API too or:
ifstatus mob1s1a1_4 | jsonfilter -e '@["ipv4-address"][0].address'

1 Like

Thanks a lot, we’re no ready for the API yet, but it’s a option that we were planning. Meanwhile I’Il use your comnand

This topic was automatically closed 40 hours after the last reply. New replies are no longer allowed.