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.

5 Replies

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.

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/ConfigureStaticIP" target="blank">](http://www.linode.com/wiki/index.php/Co … _Static_IP">http://www.linode.com/wiki/index.php/ConfigureStatic_IP](

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!

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

.members.linode.com

Where 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.

I just came across this again!

For got you must also add the dns settings

dnsserverseth0=("W.X.Y.Z" "W.X.Y.Z")

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct