* [gentoo-user] Changing static IP remotely...
@ 2013-02-28 4:48 Jarry
2013-02-28 6:07 ` Amankwah
2013-02-28 12:38 ` Michael Mol
0 siblings, 2 replies; 7+ messages in thread
From: Jarry @ 2013-02-28 4:48 UTC (permalink / raw
To: gentoo-user
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Changing static IP remotely...
2013-02-28 4:48 [gentoo-user] Changing static IP remotely Jarry
@ 2013-02-28 6:07 ` Amankwah
2013-02-28 12:38 ` Michael Mol
1 sibling, 0 replies; 7+ messages in thread
From: Amankwah @ 2013-02-28 6:07 UTC (permalink / raw
To: gentoo-user
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Changing static IP remotely...
2013-02-28 4:48 [gentoo-user] Changing static IP remotely Jarry
2013-02-28 6:07 ` Amankwah
@ 2013-02-28 12:38 ` Michael Mol
2013-02-28 15:37 ` Mike Gilbert
2013-02-28 20:16 ` Kevin Chadwick
1 sibling, 2 replies; 7+ messages in thread
From: Michael Mol @ 2013-02-28 12:38 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1085 bytes --]
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.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 555 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Changing static IP remotely...
2013-02-28 12:38 ` Michael Mol
@ 2013-02-28 15:37 ` Mike Gilbert
2013-02-28 22:43 ` Florian Philipp
2013-02-28 20:16 ` Kevin Chadwick
1 sibling, 1 reply; 7+ messages in thread
From: Mike Gilbert @ 2013-02-28 15:37 UTC (permalink / raw
To: gentoo-user
On Thu, Feb 28, 2013 at 7:38 AM, Michael Mol <mikemol@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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Changing static IP remotely...
2013-02-28 15:37 ` Mike Gilbert
@ 2013-02-28 22:43 ` Florian Philipp
2013-02-28 22:46 ` Michael Mol
0 siblings, 1 reply; 7+ messages in thread
From: Florian Philipp @ 2013-02-28 22:43 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 725 bytes --]
Am 28.02.2013 16:37, schrieb Mike Gilbert:
> On Thu, Feb 28, 2013 at 7:38 AM, Michael Mol <mikemol@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
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Changing static IP remotely...
2013-02-28 22:43 ` Florian Philipp
@ 2013-02-28 22:46 ` Michael Mol
0 siblings, 0 replies; 7+ messages in thread
From: Michael Mol @ 2013-02-28 22:46 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 789 bytes --]
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 <mikemol@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?
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 555 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [gentoo-user] Changing static IP remotely...
2013-02-28 12:38 ` Michael Mol
2013-02-28 15:37 ` Mike Gilbert
@ 2013-02-28 20:16 ` Kevin Chadwick
1 sibling, 0 replies; 7+ messages in thread
From: Kevin Chadwick @ 2013-02-28 20:16 UTC (permalink / raw
To: gentoo-user
> 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)
_______________________________________________________________________
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-02-28 22:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-28 4:48 [gentoo-user] Changing static IP remotely Jarry
2013-02-28 6:07 ` Amankwah
2013-02-28 12:38 ` Michael Mol
2013-02-28 15:37 ` Mike Gilbert
2013-02-28 22:43 ` Florian Philipp
2013-02-28 22:46 ` Michael Mol
2013-02-28 20:16 ` Kevin Chadwick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox