I have an OpenBSD firewall where I have to change the IP on the admin interface (including changing subnet/gateway) and I'm looking for how to do this remotely without losing my SSH (so I can fix things if there are problems).
Here is how I imaging being able to do it:
Add the new IP as an alias to my network interface. (Question: How do I properly add an IP on a different subnet than the orignal IP? http://www.openbsd.org/faq/faq6.html#Setup.aliases is unclear on whether there is anything special to do for a different subnet besides specify the netmask)
Add the new gateway with route. (Question: Should I add it as a 'default' gateway or just for the new subnet?)
SSH to the new IP.
Write a script to if down both the old and new IPs and up the new IP as the main interface IP, At this point I most definitely need to add the new gateway as a default gw right? Run it from within screen so it keeps going if network temporarily drops. (Question: Should this do the job? Are there any special gotchas I should keep my eye out for? Any tips on what commands to run to do this properly?)