How to release WAN IP address on WAG120N router using wget

My ISP provider provides dynamically assigned IP address using DHCP. This solution has couple of drawbacks but it comes handy if I need to change IP address to overcome time limit restrictions on streaming services...

Using browser takes too much time but it is quite easy to use wget to release WAN IP address.

$ wget --tries=1 --post-data="todo=disconnect" --http-user=username --http-password=password http://192.168.1.1

--2012-01-03 00:19:15--  http://192.168.1.1/
Connecting to 192.168.1.1:80... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Connecting to 192.168.1.1:80... connected.
HTTP request sent, awaiting response... No data received.
Giving up.

It is important to set number of retries to 1 as there is no data received after action.

Now just ping something so device will auto connect after short period of time.

Milosz Galazka's Picture

About Milosz Galazka

Milosz is a system administrator working for a successful Polish company and a long time supporter of Free Software Foundation and Debian operating system.

Gdansk, Poland https://sleeplessbeastie.eu