News
:
This forum is now permanently frozen.
m0n0wall Forum
>
m0n0wall Support (English)
>
General Questions
Topic: Has anyone found a decent way to automate an IP address change?
Pages: [
1
]
Topic: Has anyone found a decent way to automate an IP address change? (Read 2820 times)
Has anyone found a decent way to automate an IP address change?
« on: August 13, 2009, 15:53:38 »
bigforky
Posts: 7
Gang,
My ISP is changing my static IP...and as luck would have it I will be out of town two days before and two days after the IP change.
This isn't catastrophic as it's my home network, but in order to keep my "social director" happy with my computer hobbies I need to ensure uptime with the internet so the Askozia PBX stays running (took lots of convicing to get her to leap from Ma Bell...and losing the phone wouldn't help my cause.)
What I'm looking for is if anyone has found a means to script or schedule an IP address change for m0n0wall so I can set it up ahead of time to run after the ISP's IP rollover occurs - but before my wife wakes up ;-).
The perfect solution would be access to a cron script in m0n0 - but I understand the bloating concept....
The only thing I have been able to come up with is a second preconfigured m0n0wall and two obvious power cords for my wife to swap out.
There is brilliance on this forum...does anyone else have a better idea?
Regards-
Re: Has anyone found a decent way to automate an IP address change?
« Reply #1 on: August 13, 2009, 18:47:24 »
Fred Grayson
Posts: 994
Google turned this up. Not verified by me to work though. Give it a try.
http://m0n0.ch/wall/tools/reconnect.html
--
Google is your friend and Bob's your uncle.
Re: Has anyone found a decent way to automate an IP address change?
« Reply #2 on: August 13, 2009, 19:23:43 »
dotdash
Posts: 20
1) Prepare a config with the new addressing. Save this to a usb key or something.
2) Set your alarm to after your wife goes to sleep and before the isp switch.
3) Find coffee and some Internet access.
4) Remotely load the new config.
5) The box should now work after the ISP switch. Worst case, have her power-cycle.
Re: Has anyone found a decent way to automate an IP address change?
« Reply #3 on: August 13, 2009, 23:51:47 »
bigforky
Posts: 7
Thanks guys...
fredg -
I looked at wget, but the example I saw was using it to to automate backups by downloading the config file....but this is really clever if I can use wget to actually submit the new data to the web gui....and reboot the monowall.
Wget will also solve the issue I had with resetting the public IP on the askozia box.
dotdash-
This was my plan B....but it isnt' as easy as it sounds.
I left out of my earlier post that I am going to be out campign with buddies - well beyond the reach of my Verizon internet card....and I was trying to dodge driving 30 miles in the middle night after spending the evening around a campfire telling stories and drinking the occasional malted beverage. :-)
I am going to give the wget a whirl and see what happens. If it works, I will post the windows batch file syntax...
Thanks for the help guys-
Re: Has anyone found a decent way to automate an IP address change?
« Reply #4 on: August 20, 2009, 10:55:52 »
scooke
Posts: 9
Hi Fred,
Does this tutorial also work when you're connected with a dynamic WAN IP?
Can you maybe explain short what the script just does at he website you send:
http://m0n0.ch/wall/tools/reconnect.html
Re: Has anyone found a decent way to automate an IP address change?
« Reply #5 on: August 20, 2009, 16:20:01 »
Fred Grayson
Posts: 994
I have a dynamic IP via PPPoE on the WAN. I just tried this script and it worked perfectly. I didn't go all the way and put it in the Task Scheduler, I just ran it from a DOS box.
Works as advertised, enjoy.
--
Google is your friend and Bob's your uncle.
Re: Has anyone found a decent way to automate an IP address change?
« Reply #6 on: August 20, 2009, 16:49:34 »
scooke
Posts: 9
Ok, but I don't understand how this works? What does the script exactly do?
The task scheduler executes the script, so what happens next, can you tell me that?
Today it's the second time, at time of writing, that the internet connection is broken....
Now I have to call home and ask if they will reboot the monowall... We are thinking to use this in schools to connect serveral branches via an ipsec, but if monowall is unstable I'm afraid I don't gonna use this system.
thanks for the advice!!
«
Last Edit: August 20, 2009, 16:58:57 by scooke
»
Re: Has anyone found a decent way to automate an IP address change?
« Reply #7 on: August 28, 2009, 20:00:14 »
Lee Sharp
Posts: 517
It goes to the Interface Status page, and releases your IP, then gets a new one after 7 seconds.
Pages: [
1
]