Temporary failure in name resolution

Let’s break down the process of fixing the “Temporary failure in name resolution” error by modifying the /etc/resolv.conf file and restarting the systemd-resolved service.

Understanding the Problem: “Temporary failure in name resolution”

This error indicates that your system cannot translate domain names (like [geçersiz URL kaldırıldı]) into IP addresses (like 172.217.160.142). This translation is the job of the Domain Name System (DNS). When your system can’t reach a DNS server or there’s a problem with the DNS configuration, you encounter this error, preventing you from accessing websites and other network resources by name.

The Solution: Modifying /etc/resolv.conf and Restarting systemd-resolved

  1. /etc/resolv.conf – The DNS Configuration File: This file contains the DNS settings for your system. The most important setting here is nameserver, which specifies the IP address of a DNS server.

  2. Adding Google Public DNS Servers: By adding nameserver 8.8.8.8 and nameserver 8.8.4.4 to /etc/resolv.conf, you’re instructing your system to use Google Public DNS servers. These are reliable and widely available DNS servers.

    • 8.8.8.8: Google Public DNS primary server.
    • 8.8.4.4: Google Public DNS secondary server.
  3. The nano Command: sudo nano /etc/resolv.conf opens the /etc/resolv.conf file in the nano text editor with root privileges (required to modify system files).

  4. Restarting systemd-resolved: sudo systemctl restart systemd-resolved.service restarts the systemd-resolved service. This service is responsible for resolving domain names on systems using systemd (which is most modern Linux distributions). Restarting it ensures that the changes you made to /etc/resolv.conf are applied.

Step-by-step Instructions:

  1. Open your terminal.

  2. Edit the /etc/resolv.conf file:

    Bash

    sudo nano /etc/resolv.conf
    
  3. Add the following lines at the end of the file:

    nameserver 8.8.8.8
    nameserver 8.8.4.4
    

    If there are other nameserver lines in this file, adding these lines below them will prioritize Google’s DNS servers.

  4. Save the file (in nano, press Ctrl+X, then Y, then Enter).

  5. Restart the systemd-resolved service:

    Bash

    sudo systemctl restart systemd-resolved.service
    
  6. Test your internet connection by trying to access a website.

Important Note: On many modern Linux systems that use systemd-resolved, directly editing /etc/resolv.conf is not the recommended long-term solution. The file is often dynamically generated. Changes made directly to this file may be overwritten on reboot or network changes.

A More Permanent Solution (using resolved.conf):

A better approach is to modify /etc/systemd/resolved.conf and then restart the service.

  1. Edit /etc/systemd/resolved.conf:
    Bash

    sudo nano /etc/systemd/resolved.conf
    
  2. Uncomment (remove the #) and change the DNS= lines to:
    DNS=8.8.8.8 8.8.4.4
    #FallbackDNS=
    
  3. Restart the systemd-resolved service:
    Bash

    sudo systemctl restart systemd-resolved.service
    

This method ensures that your DNS settings persist across reboots.

Guide to Centos Installation and Root Access on CloudStack

Introduction After installing the Centos operating system on CloudStack, you usually log in with the username centos. However, in some cases, root access may be required. This guide explains step-by-step how to log in to the system with the centos user, obtain root access, and optionally create a password for the root user.

Step-by-Step Guide

  1. Log in with the Centos User:

    • Connect to the Centos server you created in the CloudStack console using SSH or VNC.
    • Log in using the username centos and your password.
  2. Root Access with the Sudo Command:

    • Run the following command in the terminal:
      Bash

      sudo -s
      
    • This command gives you root privileges. You can now run commands as the root user.
  3. Create a Root Password (Optional):

    • Why Create a Root Password: For security reasons, it’s important to create a password for the root user. This prevents unauthorized access to the root account.
    • Create Password:
      Bash

      passwd
      

      This command will prompt you to enter a new password. Make sure you create a strong password.

  4. Direct Login with the Root User (Optional):

    • SSH Configuration:
      • Open the SSH configuration file:
        Bash

        nano /etc/ssh/sshd_config
        
      • Find the following line and change the value to yes:
        PermitRootLogin yes
        
      • Save the file by pressing Ctrl+X, then Y, and Enter.
      • Restart the SSH service:
        Bash

        systemctl restart sshd
        
    • You can now log in directly to the system using the root username and the new password you created.

Important Notes:

  • Security: Be careful with root privileges. Incorrect commands can crash your system.
  • Sudoers File: If you have multiple users on your system, you can edit the sudoers file to define which users can run which commands.
  • SSH Key: We recommend using SSH keys for a more secure login.
  • Strong Password: Create a strong and unique password for the root user.

Web Hosting vs. Windows Hosting: What’s the Difference?

Web hosting refers to the service of storing all the files and data of a website on a server that is connected to the internet. When users visit your website, they access the files on this server. Web hosting typically runs on Linux-based operating systems and supports a wider range of software and programming languages.

Windows hosting, on the other hand, runs on the Microsoft Windows operating system. It is ideal for web applications developed with Microsoft technologies such as ASP.NET and .NET Core. Windows hosting often offers more specialized and customizable solutions, catering more to the needs of businesses and organizations.

Key Differences Between Web Hosting and Windows Hosting

Feature Web Hosting (Typically Linux) Windows Hosting
Operating System Linux (Ubuntu, CentOS, etc.) Windows Server
Supported Software PHP, Python, Perl, MySQL ASP.NET, .NET Core, MSSQL
Use Cases Wide range of uses (blogs, e-commerce sites, personal websites, etc.) Specifically for applications developed with Microsoft technologies (enterprise websites, intranets, etc.)
Performance Generally higher performance Optimized specifically for Microsoft applications
Security High security standards High security standards, but with specific security features for the Microsoft ecosystem
Price Generally more affordable More expensive (especially for custom requirements)

Which Hosting Type Should You Choose?

  • If your website is developed with PHP, Python, or Perl: Web hosting may be more suitable for you.
  • If your website is developed with ASP.NET or .NET Core: Windows hosting would be a better choice.
  • If you need high performance and custom customization options: Windows hosting may be a better option.
  • If your budget is limited: Web hosting may be a more affordable option.

Conclusion

Web hosting and Windows hosting offer different solutions for different needs. Choosing the right hosting type based on your website’s technology and requirements is crucial for your site’s performance and security.

Changing the RDP port in Windows Server 2012, 2016, 2019, 2022

This manual covers the procedure for changing the RDP port in Windows Server 2012. Please note that all further procedures are designed to change the RDP port, which will lead to the disconnection of the current server connection; therefore we recommend using other options for connecting to the server (e.g. through the Web console in your hosting account). In order to accomplish this task, you need to edit the registry of the operating system. The registry may be edited using the relevant program editor.

Click Start and type cmd in the Search field.

windows server 2012 comand prompt

In the black console window that appears, type in and execute the regedit command.

windows server regedit

In the registry editor, it is necessary to find the RDP-Tcp partition, which can be done using following this path

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp:

windows server regedit port number

It is then necessary to find and open the PortNumber element (as on the figure above) in it.

Next, switch to the Decimal input format and specify a new port for the RDP connection:

windows server edit port number

When selecting a new port for connection, remember that there are several port categories broken down by their numbers:

  • Numbers from 0 to 10213 are known ports that are assigned and controlled by Internet Assigned Numbers Authority (IANA).
    They are normally used by various OS system applications.
  • Ports from 1024 to 49151 are registered ports designated by IANA. They can be used to solve particular tasks.
  • Port numbers from 49152 to 65535 are dynamic (private) ports that may be used by any applications or processes to solve work tasks.

Port rule

After changing a port for remote connection, it is necessary to open it in the firewall settings, otherwise all attempts of external connection will be blocked. To do this, it is necessary to use the Windows Firewall with Advanced Security snap-in. You can open it by going to the menu: Server manager —> Tools:

windows server  manager tools

It is necessary to select “Inbound Rules “, right click on this item and select “New rule“:

windows server  firewall inband rules add new

We will create a rule for the port:

windows server  firewall inband rules type

It is necessary to select protocol type (TCP or UDP) and specify the port that we set when editing the registry (in our example: TCP protocol, 60000 port number):

windows server new port input

The next step is to select the type of action that describes the rule. In our case, it is necessary to enable the connection using the specified port.

windows server  allow connection

The next step is to specify the scope of the rule – it depends on where the server is running (in a workgroup, domain or private access):

windows server  firewall rule profile

Then it is necessary to select a name for the rule (it is recommended to select the name in such a way that the rule can then be easily recognized among others):

windows server  firewall naming and finish

After that the server has to be rebooted.

Now the new new port needs to be used to connect to the server via RDP.