What's new

Anyways to see list of WAN IP's given by ISP in the router

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

wizin

Regular Contributor
I want to see list of given IP's and anyway to force change it?
 
Without changing much you'd be able to pull the WAN IP from the system logs - for a period at least, if it's changing often enough. Creating a script that pulls the info would be a doddle.
But, forcing an address onto the WAN port and expecting your ISP to use it? I seriously doubt that would work, though just restarting the WAN connection which will cause a new WAN IP to be issued can be achieved using SCMERLIN.
 
I want to see list of given IP's and anyway to force change it?
To gather the list of WAN IPs assigned by your ISP, you could try capturing in a log file the DHCP event when WAN gets a new lease & IP address using the "/jffs/scripts/dhcpc-event" script.

Something like this:
Bash:
#!/bin/sh
#################################################################
# dhcpc-event
# Capture DHCP event on WAN getting a new lease & IP address.
#---------------------------------------------------------------#
if [ "$1" = "bound" ]
then
    {
        date
        printf "WAN Event: [$1], WAN IP Address: [$(nvram get wan0_ipaddr)]\n"
    } >> "${HOME}/${0##*/}.log"
fi
#EOF#
The above code assumes you're using the primary WAN unit (i.e. wan0).
Note that you should change the path of the log file to a more permanent location so that it persists across reboots. If the WAN IP address changes very frequently, you may want to add code to limit the size of the log file before it grows too big.

WRT forcing a WAN IP address change, that usually depends on your ISP. In my particular case, if I unplug my router's WAN Ethernet cable from my ISP modem for about 15-20 minutes, and then plug it back in, it almost always gets a new IP address.

My 2 cents.
 
I want to see list of given IP's and anyway to force change it?
Shameless plug...

Or install wicens (WAN IP Change Email Notification Script) from AMTM and setup Email notifications for WAN IP changes with historical IPs and lease times
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top