LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-20-2008, 03:25 PM   #1
systemsengineer
LQ Newbie
 
Registered: Feb 2008
Posts: 2

Rep: Reputation: 0
How do you set the primary IP on a RHEL4 server w/ multiple IP addresses?


Hello all,
I have a RHEL4 server that hosts multiple websites, all w/ their own static address. I recently needed to open traffic up from one of the IPs to another server in my environment, and afterwards I noticed the default IP that my webserver uses to send traffic out is the last IP I added eth0:8. I really want it to be eth0 so that my firewall rules work. Does anyone know how you set the primary IP on box w/ multiple IPs?
 
Old 02-20-2008, 03:53 PM   #2
Deleriux
Member
 
Registered: Nov 2003
Posts: 89

Rep: Reputation: 17
I dont believe it is possible to change it at run time. Although its possible to rearrange your ip aliases to accomodate what you'd like as your primary address.

I would suggest just doing something like..

mv ifcfg-eth0 ifcfg-eth0:8.tmp
mv ifcfg-eth0:8 ifcfg-eth0
mv ifcfg-eth0:8.tmp ifcfg-eth0:8

service network restart.

Make sure theres someone around if you dont have local access to the machine .

If you use "ip" instead of ifconfig, the first ip assigned to your network device is always primary.
 
Old 02-20-2008, 08:23 PM   #3
systemsengineer
LQ Newbie
 
Registered: Feb 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks Deleriux. I realized I could change the aliases file, I was just wondering if there was a common way to do it when adding the IPs through the Network GUI.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What do I need to set up a network with multiple IP addresses? kerinism1 Linux - Networking 10 10-06-2007 05:33 AM
Multiple IP addresses Wim Sturkenboom Slackware 5 09-27-2006 02:31 PM
not possible multiple primary dns server? blackzone Linux - Networking 1 01-19-2005 12:11 AM
multiple primary key on gpg carboncopy Linux - Software 2 12-21-2004 08:19 AM
Multiple IP Addresses meshcurrent Linux - Networking 1 10-12-2002 05:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration