Advertisement: Linux VPS for $4/month - based on OpenVZ, credit card accepted, automatic setup.
+ Post New Thread
Results 1 to 2 of 2

Thread: How to change Linux dedicate server IP to another one from assigned subnet

  1. #1
    Administrator Fli's Avatar
    Join Date
    Mar 2013
    Post Thanks / Like
    Blog Entries

    How to change Linux dedicate server IP to another one from assigned subnet

    Dedicated serve provider assigned two IPv4 subnets to the server and i wanted to use IP from second subnet as my server primary IP. Primary VLAN DDoS Protected
    I modified networking configuration like this:

    nano /etc/network/interfaces
    (centos /etc/sysconfig/network or /etc/sysconfig/network-scripts/ifcfg-*)

    commented out/removed lines beginning "address" and "gateway" because these contained IPs from first subnet which i did not wanted to use. And as "address" used third IP from the subnet of my choice. Example they assigned subnet, so the third IP is , the second IP is gateway. so i updated interfaces file that way. One can use also other IP, but not first two IPs of the subnet.

    vi /etc/hosts

    replaced IP too there. I also updated hostname there and in my server provider control panel set reverse DNS record for the new IP to match this hostname of my choice.
    Example line: prox4m1 pvelocalhost

    then update also /etc/hostname

    service networking restart

    and from now on i was able to login my server via different IP i set above.

    If you have fix for this setup, please kindly share. Thank You

  2. #2
    Junior Member radwebhosting's Avatar
    Join Date
    Jan 2016
    Dallas, TX
    Post Thanks / Like

    Is this useful / helpfull? Yes | No
    Edit the /etc/sysconfig/network-scripts/ifcfg-eth0 and ensure the IPs are properly bound to the NIC.
    RAD WEB HOSTING - Dallas, Texas Data Center - WHM Reseller Hosting
    Clearance Dedicated Servers - 500Gbps DDoS Protection - KVM VPS Hosting

+ Post New Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
 Protected by : ZB BLOCK  &  StopForumSpam