Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I add a second dedicated IP to my home server?

I need two dedicated public IPs pointing to the same server. The reason for this is because I need two applications to use the same port.

I have another NIC installed if this is to any help. I'm using Ubuntu 10.10.

share|improve this question

migrated from Apr 26 '11 at 23:02

This question came from our site for system and network administrators.

Will I get another public IP when using aliases? If so, how can I find it out? – user58654 Apr 26 '11 at 23:22
@user58654 Hello, and welcome to Super User. Are you the same person who asked this question? If so, you need to associate your Super User and Server Fault accounts, so that you will have ownership of the question and can edit it. Updates to your question should be made by editing the question, not adding answers. If you need help with associating your accounts, please flag this post for a moderator by clicking the flag link above, and we can help you out. – nhinkle Apr 26 '11 at 23:50
You should also say what app you are running. Some, like httpd, make sharing a port trivial. – uSlackr Apr 27 '11 at 0:10
@user: Aliases, ifconfig, NICs - they don't know and don't care about addresses being "public" or "private". It only depends on whether the first address was assigned to your server directly, or to your home router. It would help if you updated your question with this information. The second address must be assigned in the same way. – grawity Apr 27 '11 at 11:14
(Also, AFAIK, aliases are deprecated on Linux. ip addr add is the new cool thing.) – grawity Apr 27 '11 at 11:14

In order to do this you will need to have the public IP's available. Adding aliases just utilitses more private IP address space which is practically unlimited in each network. Your ISP will need to provide you with an additional public IP which you will need to configure on your perimeter firewall, this can then be NAT'ed through to the second private IP to allow you to run two applications using the same port on different private and consequently public IP addresses.

share|improve this answer

A much better way to solve the issue you are having is run a small local "proxy" program on your server that does nothing but accept traffic on one port and redirect it to the port on the application that will evidently not allow you to change port.

Assume the application only listens on port 3000 and your external IP is, and you want a second instance listening on port 3001.

Under this setup, you would tell application instance A to listen on, tell application instance B to listen on, and tell your proxy program to listen on, and to redirect incoming connections from there to

Under Linux you can do this with iptables or another program called rinetd. I'm sure there are equivalent programs for Windows.

share|improve this answer

You must log in to answer this question.