Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Assistance with multiple IP networking

  1. #1
    Join Date
    Sep 2006
    Beans
    13

    Assistance with multiple IP networking

    Greetings,

    I'm a relatively new server owner and am having trouble wrapping my head around using multiple IP addresses. I have recently purchased a dedicated server running Ubuntu server 12.10 and part of the package was 4 additional IPv4 addresses. My goal is to use the server for hosting a game server or two along with a website. Right now I'm just trying to host a Minecraft server on one IP and setup Apache on another IP.

    Can anyone point me in the right direction here? Any help is greatly appreciated, thanks!

  2. #2
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,686
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Assistance with multiple IP networking

    Do you also have more than one network adapter to use or you have to use only one?

    I don't have much experience with multiple IPs on single adapter, but I don't see much point from it. The Minecraft and Web services will work on different ports in any case, the the max transfer will be limited by the max speed of the adapter. Having one or more IPs on it can't help much in my view.

    If you do have multiple adapters too, it's a different story. In that case you can use two or more adapters, each with different IP, and that makes sense because the transfer is done at the same time on both and the bandwith is higher.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  3. #3
    Join Date
    Sep 2006
    Beans
    13

    Re: Assistance with multiple IP networking

    Quote Originally Posted by darkod View Post
    Do you also have more than one network adapter to use or you have to use only one?

    I don't have much experience with multiple IPs on single adapter, but I don't see much point from it. The Minecraft and Web services will work on different ports in any case, the the max transfer will be limited by the max speed of the adapter. Having one or more IPs on it can't help much in my view.

    If you do have multiple adapters too, it's a different story. In that case you can use two or more adapters, each with different IP, and that makes sense because the transfer is done at the same time on both and the bandwith is higher.
    I'm not sure how to tell how many adapters I have. If ifconfig only shows eth0 and a local loopback does that mean there's only one adapter?

  4. #4
    Join Date
    Nov 2008
    Location
    Storybrooke
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Assistance with multiple IP networking

    Quote Originally Posted by AliasXNeo View Post
    I'm not sure how to tell how many adapters I have. If ifconfig only shows eth0 and a local loopback does that mean there's only one adapter?
    yes
    Ubuntu Forums Moderation Staff
    Okay then. We're relying on mirror dust and fairies but now we have a plan which is progress - Emma

  5. #5
    Join Date
    May 2007
    Location
    NY's first capital
    Beans
    2,440
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Assistance with multiple IP networking

    With only one adapter the major benefit would be reverse dns entry's for dedicated servers. This will allow each unique ip to have a valid ssl cert without any hacks.

    I think you'll likely be handeling the multiple ip's with DNS entries, perhaps unique domain names? Keep them in your pocket for future needs
    Nothing is ever easy, but if it is difficult you must be doing it wrong.

  6. #6
    Join Date
    Nov 2008
    Location
    Storybrooke
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Assistance with multiple IP networking

    Quote Originally Posted by AliasXNeo View Post
    Greetings,

    I'm a relatively new server owner and am having trouble wrapping my head around using multiple IP addresses. I have recently purchased a dedicated server running Ubuntu server 12.10 and part of the package was 4 additional IPv4 addresses. My goal is to use the server for hosting a game server or two along with a website. Right now I'm just trying to host a Minecraft server on one IP and setup Apache on another IP.

    Can anyone point me in the right direction here? Any help is greatly appreciated, thanks!
    Generally, I restrict ssh to a single IP, and enable ssh keys and each service (i.e. mail server, TF2 server, .etc .etc) to its own port.

    You also probably want to keep one ip unused as a backup, incase your server gets DDOSed or something.
    Ubuntu Forums Moderation Staff
    Okay then. We're relying on mirror dust and fairies but now we have a plan which is progress - Emma

  7. #7
    Join Date
    Nov 2008
    Location
    Storybrooke
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Assistance with multiple IP networking

    Generally, I restrict ssh to a single IP, and enable ssh keys and each service (i.e. mail server, TF2 server, .etc .etc) to its own port only for organizational/branding purposes (reverse IP). The only reason I would probably (I actually have a bad habit of running one service on one ip address, and I have 30 -odd ip addresses now...) really recommend seperate IP Addresses is when running things like gameservers and/or sites that are viable to attack.

    When under attack, ISPs/providers generally blackhole the ip address, and if that single ip contains your mail server, your web server, and your game server, they all go down. If you have your mail server, web server and game server all on different IP addresses, blackholing one IP Address will only take that service offline.
    Last edited by sandyd; December 30th, 2012 at 12:21 AM.
    Ubuntu Forums Moderation Staff
    Okay then. We're relying on mirror dust and fairies but now we have a plan which is progress - Emma

  8. #8
    Join Date
    Sep 2006
    Beans
    13

    Re: Assistance with multiple IP networking

    Quote Originally Posted by sandyd View Post
    Generally, I restrict ssh to a single IP, and enable ssh keys and each service (i.e. mail server, TF2 server, .etc .etc) to its own port only for organizational/branding purposes (reverse IP). The only reason I would probably (I actually have a bad habit of running one service on one ip address, and I have 30 -odd ip addresses now...) really recommend seperate IP Addresses is when running things like gameservers and/or sites that are viable to attack.

    When under attack, ISPs/providers generally blackhole the ip address, and if that single ip contains your mail server, your web server, and your game server, they all go down. If you have your mail server, web server and game server all on different IP addresses, blackholing one IP Address will only take that service offline.
    Good advice, thanks! So if I wanted to separate the Minecraft server instance from everything else, how would I set that up?

  9. #9
    Join Date
    Nov 2007
    Location
    Newry, Northern Ireland
    Beans
    1,258

    Re: Assistance with multiple IP networking

    When you run
    Code:
    ifconfig
    is the IP address one from a private subnet (192.168.x.x, 172.16.x.x, 10.x.x.x)? If not, you might be able to use virtual or logical IPs so eth0:1 is IP1, eth0:2 is IP2, etc.
    Can't think of anything profound or witty.
    My Blog: http://gonzothegeek.blogspot.co.uk/

  10. #10
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    9,134
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Assistance with multiple IP networking

    You can assign the other addresses to the single network adapter using "aliasing." For instance, if the primary IP address is 10.10.10.10, you could have the server listen on 10.10.10.11 as well by adding:

    Code:
    ifconfig eth0:0 10.10.10.11
    to the file /etc/rc.local. Then upon reboot your machine will appear to have two Ethernet adapters with separate addresses.

    I have used aliasing to create multiple SSL-enabled web sites on a single machine using one IP for each domain or virtual host. It also comes in handy when you want to assign a public IP address that forwards to a service behind the organization's firewall.

    A client got blacklisted by Barracuda the other day because an infected workstation behind the firewall became a spambot. Luckily the admins fixed the problem and got de-listed, but if the blacklist managers dragged their feet, I was planning on swapping my client's blacklisted address with another one in the subnet we manage and assigning the blacklisted address to a virtual Ethernet adapter to ensure that nothing breaks. I'd have to make a couple of changes to the iptables ruleset as well, of course.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •