Advertisement: Linux VPS from $4/month - contact support for custom offer.
 
+ 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
    Join Date
    Mar 2013
    Posts
    2,725

    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.

    1.2.3.192/27 Primary VLAN
    9.8.7.136/29 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 9.8.7.136/29 subnet, so the third IP is 9.8.7.138 , 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: 192.168.15.77 prox4m1.proxmox.com 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
    Location
    Dallas, TX
    Posts
    24


    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 - Multiple USA Data Centers - WHM Reseller Hosting
    Dedicated Servers] - Server Colocation - KVM VPS Hosting

+ Post New Thread

Similar Threads

  1. Discount offer for dedicate server
    By onliveserver in forum Social networks
    Replies: 0
    Last Post: 07-03-2017, 12:57 PM
  2. WTB WTB: Dedicated server with privacy and IP subnet?
    By Fli in forum Dedicated: Offers & Requests
    Replies: 0
    Last Post: 04-27-2017, 10:28 AM
  3. Replies: 0
    Last Post: 07-29-2016, 04:15 PM
  4. Help for choosing Windows Dedicate server
    By MiMino in forum General Advertisement
    Replies: 0
    Last Post: 10-10-2013, 12:47 PM
  5. How to determine assigned IPv6 addresses
    By Fli in forum Networking
    Replies: 0
    Last Post: 09-23-2013, 09:57 AM

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