Home | Hardware | Internet News |Web Hosting |IT Management |Network Storage
LinuxPlanet
Search 
  Power Search | Tips 

 Front Door
 Discussion
 LinuxEngine
 Opinions
 Reports
 Reviews
 Tutorials
 News
 Technology Jobs

 Browse by subject.
Free Newsletter

Java/Open Source Daily
Linux Today
More Free Newsletters

Be a Commerce Partner


















internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

Print this article
Email this article

   LinuxPlanet / Tutorials







xDSL and Linux: Go Speed Racer!
Configuring IP Addresses

Nicholas M.M. Donovan
Tuesday, January 25, 2000 04:36:29 PM

Typically, the Linux user is able to configure most things from a command line or script. Often configuration utilities like netconfig on Slackware 7.0 and LinuxConf in Mandrake 7.0 make such configuration quite easy and painless.

Using your favorite utility, simply choose your appropriate hostname of your machine, the network to which it belongs, and any other details required of the utility. Most utilities will automatically restart the network for you and allow you to see your assigned IP address by typing :

/sbin/ifconfig

If you are unsure as to what tool to use, consult the HOW-TOs and other documentation on your system or available in various books.

Security is an issue when dealing with xDSL. If you are the system administrator and would like to script a simple control mechanism for your Internet-connected server or workstation, consider and modify to taste the following script. This script forces a new election of IP address on your machine, which can add to the security of your machine by making addresses a little more difficult to pin down.

#!/bin/sh
#
# Name: renet
# Author: Nicholas Donovan <nick@bynari.net)
# Function: resets the IP by bumping a request from DHCPCD
#
# Revisions:

# remove the old information
rm /etc/dhcpc/dhcpcd-eth0.cache - f
rm /etc/dhcpc/dhcpcd-eth0.info - f

# kill the runtime PID reference
rm /var/run/dhcpcd-eth0.pid - f

# request a new IP from server...
echo "making new DHCP request..."
/sbin/dhcpcd
sleep 3

# if changed properly tell it then pipe to log file...
echo "(dhcpcd) IP address changed to $1" | logger

# Display the new IP
clear
echo "Your new DHCP address is:"
/sbin/ifconfig eth0

# End of Script

Simply chmod 744 this script and place it into the /sbin directory.

As the administrator, you can add this command to your cron jobs that run on a regular basis and change this IP as often as desired.

Next: Firewall Considerations »

Skip Ahead

1 Don't Let the Man Keep You Down: Grab the Power of DSL for Linux
2 Working with DSL
3 Easy DHCP Configuration
4 Configuring IP Addresses
5 Firewall Considerations





Linux is a trademark of Linus Torvalds.


internet.com home | search | help! | about us

Jupiter Online Media

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers