Click to See Complete Forum and Search --> : Linux 2.2


Ken Conrad
08-11-2001, 03:10 PM
I have a firewall running Linux 2.2.14
I need to change the IP address for the Internet connection.

What file do I have to modify and what are the commands to do so. The person who looks after this linux box is on holidays and I need to do this now as we are moving tomorrow.

Thanks

Ken

bdl
08-11-2001, 05:54 PM
You'll have to know a couple of things beforehand, namely:


The new IPADDRESS & NETMASK
The GATEWAY address


The commands to change it are quite simple, just issue the following (as root):

prompt# ifconfig eth0 down

prompt# ifconfig eth0 $IPADDRESS netmask $NETMASK up

prompt# route add default gw $GATEWAY eth0


These commands assume you are using the first (and probably only) NIC on the machine, which is eth0. You replace the variables I have shown with the correct numeric values and you should be set. Luck!

BTW, if you can persuade the admin to upgrade to linux 2.2.19 or above, it'd be in your best interest.

[ 11 August 2001: Message edited by: bdl ]