Re: [gentoo-user] Changing static IP remotely...
On 02/27/2013 11:48 PM, Jarry wrote: Hi Gentoo users, what is the proper way of changing static IP-address remotely without the need to restart the whole system (or locking me out)? I have one interface with static IP, so first I'm going to edit /etc/conf.d/net. Then I will set up command for later execution: # echo '#!/bin/bash' /root/eth-restart # echo '/etc/init.d/net.eth0 restart' /root/eth-restart # chmod 0700 /root/eth-restart # at -f /root/eth-restart now + 5 min Then I terminate my ssh-session hoping 5 minutes later I can connect using new IP. Is this correct and all that is necessary? Jarry Probably the safest thing you can do is give the interface two IPs at once (both the old address and the new address) until you can confirm you can connect on the new IP, and then remove the old IP. Also, rather than using at to handle things like that, I like to use screen; if I get disconnected, programs running inside the screen session don't die...and there's no waiting for a scheduled job. signature.asc Description: OpenPGP digital signature
Re: [gentoo-user] Changing static IP remotely...
On Thu, Feb 28, 2013 at 7:38 AM, Michael Mol mike...@gmail.com wrote: On 02/27/2013 11:48 PM, Jarry wrote: Hi Gentoo users, what is the proper way of changing static IP-address remotely without the need to restart the whole system (or locking me out)? I have one interface with static IP, so first I'm going to edit /etc/conf.d/net. Then I will set up command for later execution: # echo '#!/bin/bash' /root/eth-restart # echo '/etc/init.d/net.eth0 restart' /root/eth-restart # chmod 0700 /root/eth-restart # at -f /root/eth-restart now + 5 min Then I terminate my ssh-session hoping 5 minutes later I can connect using new IP. Is this correct and all that is necessary? Jarry Probably the safest thing you can do is give the interface two IPs at once (both the old address and the new address) until you can confirm you can connect on the new IP, and then remove the old IP. Also, rather than using at to handle things like that, I like to use screen; if I get disconnected, programs running inside the screen session don't die...and there's no waiting for a scheduled job. Yeah, screen or tmux is the way to go.
Re: [gentoo-user] Changing static IP remotely...
Probably the safest thing you can do I use install scripts and so can have two system copies in tandem easily (aided by OpenBSD being simply brilliant with 0 kernel updates) and test out any procedure for a remote server locally with a VM before doing anything. -- ___ 'Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface' (Doug McIlroy) ___
Re: [gentoo-user] Changing static IP remotely...
Am 28.02.2013 16:37, schrieb Mike Gilbert: On Thu, Feb 28, 2013 at 7:38 AM, Michael Mol mike...@gmail.com wrote: On 02/27/2013 11:48 PM, Jarry wrote: Hi Gentoo users, what is the proper way of changing static IP-address remotely without the need to restart the whole system (or locking me out)? [...] # at -f /root/eth-restart now + 5 min [...] Also, rather than using at to handle things like that, I like to use screen; if I get disconnected, programs running inside the screen session don't die...and there's no waiting for a scheduled job. Yeah, screen or tmux is the way to go. `nohup` would work too, right? Regards, Florian Philipp signature.asc Description: OpenPGP digital signature
Re: [gentoo-user] Changing static IP remotely...
On 02/28/2013 05:43 PM, Florian Philipp wrote: Am 28.02.2013 16:37, schrieb Mike Gilbert: On Thu, Feb 28, 2013 at 7:38 AM, Michael Mol mike...@gmail.com wrote: On 02/27/2013 11:48 PM, Jarry wrote: Hi Gentoo users, what is the proper way of changing static IP-address remotely without the need to restart the whole system (or locking me out)? [...] # at -f /root/eth-restart now + 5 min [...] Also, rather than using at to handle things like that, I like to use screen; if I get disconnected, programs running inside the screen session don't die...and there's no waiting for a scheduled job. Yeah, screen or tmux is the way to go. `nohup` would work too, right? For what, exactly? signature.asc Description: OpenPGP digital signature
[gentoo-user] Changing static IP remotely...
Hi Gentoo users, what is the proper way of changing static IP-address remotely without the need to restart the whole system (or locking me out)? I have one interface with static IP, so first I'm going to edit /etc/conf.d/net. Then I will set up command for later execution: # echo '#!/bin/bash' /root/eth-restart # echo '/etc/init.d/net.eth0 restart' /root/eth-restart # chmod 0700 /root/eth-restart # at -f /root/eth-restart now + 5 min Then I terminate my ssh-session hoping 5 minutes later I can connect using new IP. Is this correct and all that is necessary? Jarry -- ___ This mailbox accepts e-mails only from selected mailing-lists! Everything else is considered to be spam and therefore deleted.
Re: [gentoo-user] Changing static IP remotely...
On Thu, Feb 28, 2013 at 05:48:02AM +0100, Jarry wrote: Hi Gentoo users, what is the proper way of changing static IP-address remotely without the need to restart the whole system (or locking me out)? I have one interface with static IP, so first I'm going to edit /etc/conf.d/net. Then I will set up command for later execution: # echo '#!/bin/bash' /root/eth-restart # echo '/etc/init.d/net.eth0 restart' /root/eth-restart # chmod 0700 /root/eth-restart # at -f /root/eth-restart now + 5 min Then I terminate my ssh-session hoping 5 minutes later I can connect using new IP. Is this correct and all that is necessary? Jarry -- I think that is correct but not necessary. just using a temporary IP address. assume your remote host network interface is eth0, the original IP is addr1, the last IP is addr2, the temporary IP is addr3. You can start a ssh session to addr1, and bind a temporary IP to the interface using: # ifconfig eth0:0 addr3 then terminate the ssh session, start a new session to addr3. changing the eth0's IP address to addr2 finally, you can start a ssh session to the last IP address *addr2* and release the temporary IP. # ifconfig eth0:0 down