Linode Forum Index Linode Forum
Linode Community Forums
 


Need help setting up a second public IP address

Click here to go to the original topic

 
       Linode Forum Index -> Linux Networking
Author Message
fifo



Joined: 29 Sep 2005
Posts: 79
Location: Miami, Florida

Posted: Sat Apr 25, 2009 6:58 pm    Post subject: Need help setting up a second public IP address  

I am trying to set up apache on my machine to host two websites that require ssl. I already purchased both ssl certificates and have the first site running with ssl and all using virtual hosts with the first specific IP. I tried setting up the new site with the new IP I purchased but it didn't work. I am running Gentoo ... Must I do anything to my machine for it to recognize that second IP? If i do an ifconfig I only see the first IP address listed there.

Any help would be great.
Back to top  
alexsh1



Joined: 22 Sep 2008
Posts: 48
Location: London, UK

Posted: Sat Apr 25, 2009 8:15 pm    Post subject:  

Are you sure you do not see the second IP address if you do ifconfig? The main IP would be under eth0 and the additional is under eth0:0

Can you ping the second IP address? Looks like could be a problem with this on the VPS level.
Back to top  
pparadis



Joined: 23 Apr 2009
Posts: 41

Posted: Sat Apr 25, 2009 10:22 pm    Post subject: Config for multiple IPs.  

You can reference the Linode docs on configuring static IP addresses to make sure you've got everything set up right: http://www.linode.com/wiki/index.php/Configure_Static_IP
Back to top  
fifo



Joined: 29 Sep 2005
Posts: 79
Location: Miami, Florida

Posted: Mon Apr 27, 2009 8:52 pm    Post subject: Solved  

Thanks for the help!

Got it done with the following commands for Gentoo ...

vi /etc/conf.d/net

config_eth0=( "xxx.xxx.xxx.xxx/24" "yyy.yyy.yyy.yyy/24")
routes_eth0=( "default via xxx.xxx.xxx.1" "default via yyy.yyy.yyy.1" )

/etc/init.d/net.eth0 restart


If anyone is going to follow my footsteps make sure you add the routes_eth0 otherwise you wont work!
Back to top  
DanFx



Joined: 02 Aug 2009
Posts: 1

Posted: Sun Aug 02, 2009 6:56 am    Post subject:  

I just made the switch from dhcp to a static IP today on a Debian 5 install and I thought I would post a couple of comments that might help the next person looking for help on this topic (this info was not on the Wiki page mentioned earlier in this thread):

1 - I was trying to figure out how to disable the dhcp client after the switch to a static IP was implemented. Turns out you don't need to do anything: if no network interfaces are configured to use dhcp then the dhcp client does not start. You can double check by running the following command

ps -ef | grep "dhcp"

which should return only your 'grep' if nothing else related to dhcp is running

2 - After having switched to a static IP configuration and rebooted my linode, I noticed that the 'sudo' command was saying that a hostname was not found. Looks like you have to set the hostname once manually by creating a file named 'hostname' under /etc in which you should have one line for your hostname: I used the hostname that was assigned by linode and which you can find under the 'Network' tab in the Linode manager. It shows your hostname next to your IP address in the following format

<hostname>.members.linode.com

Where <hostname> looks like 'li##-##' (letters l and i followed by 2 digits followed by a dash followed by 2 digits). I did put only the 'li##-##' value in my /etc/hostname file

You need to rebbot your linode one more time after creating the /etc/hostname file.
Back to top  
fifo



Joined: 29 Sep 2005
Posts: 79
Location: Miami, Florida

Posted: Tue Aug 04, 2009 6:09 am    Post subject: Forgot DNS  

I just came across this again!

For got you must also add the dns settings
dns_servers_eth0=("W.X.Y.Z" "W.X.Y.Z")
Back to top  
 
       Linode Forum Index -> Linux Networking
Page 1 of 1