Solved

Linux - Change IP Address

Posted on 2007-04-03
5
2,561 Views
Last Modified: 2013-12-15
I have a customer that is using a Toshiba Magnia SG20 as a web server.  We need to change th IP Addrress on this server.  Normally I woul log onto the console and do just that, but sinc ethere is no monitor and keyboard on this device, what is the best way for me to change the IP Address?
0
Comment
Question by:rshooper76
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:rajendraone
ID: 18848233
Can it be accessed remotely I mean from current IP address. If you know the current IP address and if it has telnet or ssh enabled then try login to it and chang the IP address and restart the network service. Be careful that you do the things right before restarting.

Goodluck,
Rajen
0
 
LVL 8

Accepted Solution

by:
frashii earned 500 total points
ID: 18848629
There are a couple of different ways to change an IP address on a linux machine, but what you need to be careful of is that after a reboot, or after the network service is restarted it does not revert back to the previous one.

Each distro of Linux has its own way of doing things, and you are best off using the proper tools. Yes, a simple ifconfig script change might do the trick, but it might not 'stick' as a mentioned above.

What version of linux are you running ?

One of my favorite tricks when I do something dangerous is to set up a cron job that will 'reset' the IP address, firewall rule, etc every 5 minutes so that if I make a mistake, all I must do is wait 5 minutes for it to be put back. Once you sucessfully make the change, you delete the cron job. Once again, this requires knowledge of how you distro stores its configuration information.
0
 
LVL 9

Author Comment

by:rshooper76
ID: 18870115
It is running Debian.   I have used ifconfig commands to change this IP Address, but won't the IP Address change back when it's rebooted?
0
 
LVL 8

Expert Comment

by:frashii
ID: 18929820
The answer is the /etc/network/interfaces for debian.

Look for the line that has the interface you want to change, most probably eth0, but it could be another (Please do a ifconfig and check!)

Here is how a static IP looks :

iface eth0 inet static
       address 192.168.1.10
       netmask 255.255.255.0
       network 192.168.1.0
       broadcast 192.168.1.255
       gateway 192.168.1.1
0
 
LVL 9

Author Comment

by:rshooper76
ID: 18932217
I actually found this on my own, but goign to etc/network/interfaces is exactly what I did.  Thanks.
0

Featured Post

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question