Gentoo Archives: gentoo-user

From: Michael Mol <mikemol@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Changing static IP remotely...
Date: Thu, 28 Feb 2013 12:38:27
Message-Id: 512F4FAD.5040304@gmail.com
In Reply to: [gentoo-user] Changing static IP remotely... by Jarry
1 On 02/27/2013 11:48 PM, Jarry wrote:
2 > Hi Gentoo users,
3 >
4 > what is the proper way of changing static IP-address remotely
5 > without the need to restart the whole system (or locking
6 > me out)?
7 >
8 > I have one interface with static IP, so first I'm going to edit
9 > /etc/conf.d/net. Then I will set up command for later execution:
10 >
11 > # echo '#!/bin/bash' > /root/eth-restart
12 > # echo '/etc/init.d/net.eth0 restart' >> /root/eth-restart
13 > # chmod 0700 /root/eth-restart
14 > # at -f /root/eth-restart now + 5 min
15 >
16 > Then I terminate my ssh-session hoping 5 minutes later
17 > I can connect using new IP. Is this correct and all that
18 > is necessary?
19 >
20 > Jarry
21
22 Probably the safest thing you can do is give the interface two IPs at
23 once (both the old address and the new address) until you can confirm
24 you can connect on the new IP, and then remove the old IP.
25
26 Also, rather than using at to handle things like that, I like to use
27 screen; if I get disconnected, programs running inside the screen
28 session don't die...and there's no waiting for a scheduled job.

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Changing static IP remotely... Mike Gilbert <floppym@g.o>
Re: [gentoo-user] Changing static IP remotely... Kevin Chadwick <ma1l1ists@××××××××.uk>