david3
Occasional Visitor
I used to use Tomato firmware, and I have scripts that use the WAN IP.
I could get it like this:
Now I've updated my router (an Asus RT-N66U) to use Asuswrt-Merlin firmware, and I guess it doesn't work the same way, since the above code isn't giving me my WAN IP.
What's the best way to get the WAN IP for Asuswrt-Merlin?
The above does get an IP, but it's not my current IP (maybe an old one?)
Thanks.
I could get it like this:
Code:
#!/bin/sh
WANIP=$(nvram get wan_ipaddr)
echo $WANIP
Now I've updated my router (an Asus RT-N66U) to use Asuswrt-Merlin firmware, and I guess it doesn't work the same way, since the above code isn't giving me my WAN IP.
What's the best way to get the WAN IP for Asuswrt-Merlin?
The above does get an IP, but it's not my current IP (maybe an old one?)
Thanks.