?
Solved

Linux - Change IP Address

Posted on 2007-04-03
5
Medium Priority
?
2,570 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
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.
Suggested Courses
Course of the Month13 days, 17 hours left to enroll

800 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