# Obtain the WAN IP from ssh

**URL:** <https://community.teltonika.lt/t/obtain-the-wan-ip-from-ssh/7184>\
**Category:** Networking Solutions\
**Created:** [August 8, 2024, 7:35am UTC](https://community.teltonika.lt/t/obtain-the-wan-ip-from-ssh/7184 "2024-08-08T07:35:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aseques](https://community.teltonika.lt/user_avatar/community.teltonika.lt/aseques/32/4619_2.png) [@aseques](https://community.teltonika.lt/u/aseques)\
**Post date:** [August 8, 2024, 7:35am UTC](https://community.teltonika.lt/t/obtain-the-wan-ip-from-ssh/7184/1 "2024-08-08T07:35:45Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![Simonas](https://community.teltonika.lt/letter_avatar_proxy/v4/letter/s/f1d935/32.png) [@Simonas](https://community.teltonika.lt/u/Simonas)\
**Post date:** [August 8, 2024, 9:32am UTC](https://community.teltonika.lt/t/obtain-the-wan-ip-from-ssh/7184/2 "2024-08-08T09:32:43Z")

</div>

Hi,  
I would suggest to use API if its done in remote system.  
[https://developers.teltonika-networks.com/](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'`

---

<div class="post-metadata">

**Author:** ![aseques](https://community.teltonika.lt/user_avatar/community.teltonika.lt/aseques/32/4619_2.png) [@aseques](https://community.teltonika.lt/u/aseques)\
**Post date:** [August 8, 2024, 12:27pm UTC](https://community.teltonika.lt/t/obtain-the-wan-ip-from-ssh/7184/3 "2024-08-08T12:27:23Z")

</div>

> [@Simonas](#):
>
> `ifstatus mob1s1a1_4 | jsonfilter -e '@["ipv4-address"][0].address'`

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

---

<div class="post-metadata">

**Author:** ![system](https://community.teltonika.lt/user_avatar/community.teltonika.lt/system/32/15707_2.png) [@system](https://community.teltonika.lt/u/system)\
**Post date:** [August 10, 2024, 4:27am UTC](https://community.teltonika.lt/t/obtain-the-wan-ip-from-ssh/7184/4 "2024-08-10T04:27:46Z")

</div>

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