How to Set Up Static IP Addresses on Your Dedicated Server

Configuring static IP addresses on your dedicated server ensures stability and allows seamless server management, especially when hosting websites or running services. Follow this step-by-step guide to configure static IP addresses on your dedicated server provided by QuickServers.net.


Step 1: Gather Your IP Address Information

  • Obtain the IP address details assigned to your server from QuickServers.net. This should include:
    • Static IP address
    • Subnet mask
    • Default gateway
    • DNS server addresses

Step 2: Access Your Server via SSH

  • Log in to your server using SSH. Use a terminal or an SSH client like PuTTY.
  • Example command:
    ssh root@your_server_ip  
    

Step 3: Configure the Network Settings

For CentOS/Red Hat-Based Systems:

  • Navigate to the network configuration directory:
    cd /etc/sysconfig/network-scripts/  
    
  • Open the network interface file using a text editor like nano. Replace ifcfg-eth0 with your network interface name:
    nano ifcfg-eth0  
    
  • Update the file with your static IP information:
    BOOTPROTO=none  
    IPADDR=your_static_ip  
    NETMASK=your_subnet_mask  
    GATEWAY=your_default_gateway  
    DNS1=your_primary_dns  
    DNS2=your_secondary_dns  
    ONBOOT=yes  
    
  • Save the file and exit the editor.

For Ubuntu/Debian-Based Systems:

  • Open the network configuration file:
    nano /etc/netplan/01-netcfg.yaml  
    
  • Add or update the configuration:
    network:  
      version: 2  
      ethernets:  
        eth0:  
          dhcp4: no  
          addresses:  
            - your_static_ip/your_subnet_mask  
          gateway4: your_default_gateway  
          nameservers:  
            addresses:  
              - your_primary_dns  
              - your_secondary_dns  
    
  • Save the file and apply the changes:
    netplan apply  
    

Step 4: Verify the Configuration

  • Restart your network service to apply the new settings:
    • For CentOS/Red Hat:
      systemctl restart network  
      
    • For Ubuntu/Debian:
      systemctl restart networking  
      
  • Check if the new static IP address is active:
    ip addr  
    

Step 5: Test Network Connectivity

  • Test if your server can connect to the internet and other devices:
    ping 8.8.8.8  
    ping google.com  
    
  • If the pings are successful, your static IP configuration is working correctly.

Step 6: Update Any Necessary Firewall or Security Settings

  • Ensure that any firewall or security rules on your server allow traffic to and from your new static IP address.
  • Update firewall rules with commands like iptables or firewalld as needed.

By following these steps, you can configure static IP addresses on your QuickServers.net dedicated server for optimal stability and performance. This setup ensures your server remains accessible and reliable for hosting websites and services.

Was this answer helpful? 0 Users Found This Useful (0 Votes)