VPS 및 전용 서버(호스팅 컨트롤 센터) 도움말

Adding IP Addresses to Your Linux Server (Loopback)

Warning: Do not complete these steps if you have a Virtual Private Server (VPS).

We have multiple configuration methods for our servers' networking. To make sure you use the correct procedure when configuring additional IPs on your server, please see Add more IP Addresses.

Some of the information in this article is advanced material we make available as a courtesy. Please be advised that you are responsible for properly following the procedures below. Customer Support cannot assist with these topics.

When you receive additional IPs for your server, you have to configure your server and firewall to accept requests from them.

Note: We configure all of your server's IP addresses automatically whenever you reprovision your server. However, reprovisioning erases all content from your server's hard drives. For more information, see Starting over with My Server (Reprovision)

We automatically configure additional IP addresses for Virtual Private Servers (VPS) — do not complete these steps.

CentOS/Fedora

  1. Connect to your server via SSH (more info).
  2. Switch to the root user (more info).
  3. Run the following command to switch to the folder where the network configuration scripts are located:
    cd /etc/sysconfig/network-scripts
  4. Run the following command to view the current network adapters:
    ls ifcfg*
    Your server's primary IP displays as ifcfg-eth0 and ifcfg-lo; additional IPs display as ifcfg-lo:0, ifcfg-lo:1, etc.
  5. Run the following command to add an entry for your new IP address:
    cp ifcfg-eth0 ifcfg-lo:[X]
    Where [X] is 2 less than the number of IPs the server will have after adding the new IP. For example, to add the server's third IP address, use 1 as the value of [X].
  6. Using a text editor, edit ifcfg-lo:[X] by changing the following values:
    • IPADDR — Change to the new IP address.
    • DEVICE — Change to lo:[X], where [X] is the same [X] value from the previous steps.
    • NETMASK — Change to 255.255.255.255.
    • Remove the entire line beginning with ETHTOOL_OPTS.
  7. Run the following command to bring the new IP online:
    /sbin/ifup ifcfg-lo:[X]
    Where [X] is the same [X] value from the previous steps.

Ubuntu

  1. Connect to your server via SSH (more info).
  2. Switch to the root user (more info).
  3. Run the following command to switch to the folder where the network configuration scripts are located:
    cd /etc/network/
  4. In a text editor, open the file interfaces. Your server's primary IP displays as eth0; additional IPs display as lo:0, lo:1, etc.
  5. Add the following to the bottom of this file, save it, and then exit the editor:
    auto lo:[X]
    iface lo:[X] inet static
    address [ip address]
    netmask 255.255.255.255
    • [X] is 2 less than the number of IPs the server will have after adding the new IP. For example, to add the server's third IP address, use 1 as the value of [X].
    • [ip address] is the new IP address you're adding to the server.
  6. Run the following command to bring the new IP online:
    /sbin/ifup lo:[X]
    Where [X] is the same [X] value from the previous steps.

이 글이 도움되었나요?
피드백을 보내주셔서 감사합니다. 고객 서비스 담당자에게 문의하시려면 지원 전화 번호 또는 위의 채팅 옵션을 이용하시기 바랍니다.
도와드릴 수 있어 기쁩니다! 더 도와 드릴 것이 있나요?
그것 유감스럽습니다. 혼동이 되었던 사항 또는 솔루션이 고객님의 문제를 해결하지 못했던 원인을 알려주세요.