Ubuntu Unsupported upgrades

 Unsupported upgrades

Sometimes do-release-upgrade isn't able to run the upgrade to the latest version and it shows an error similar to this:

An upgrade from 'eoan' to 'focal' is not supported with this tool.

If that happens, you need to download a version-specific upgrader, you can find the link at https://changelogs.ubuntu.com/meta-release.

You need to download the upgrade tool for the version you are upgrading to. For example, if you are upgrading to Ubuntu 20.04 (focal), you'll see the link on that page as follows:

UpgradeTool: http://archive.ubuntu.com/ubuntu/dists/focal-updates/main/dist-upgrader-all/current/focal.tar.gz

The download is an archive which contains an executable with the code name of the release. execute it to run the upgrade tool for that release. Note that the archive extracts everything in the current directory so you might want to create a directory for it to extract into:

# Downloads the upgrader, check the link above for the URL of the file for your release
wget http://archive.ubuntu.com/ubuntu/dists/focal-updates/main/dist-upgrader-all/current/focal.tar.gz
# Extract it into a new directory
mkdir upgrader
tar -xaf focal.tar.gz -C upgrader
cd upgrader
# Run the executable, the name changes based on the release
./focal

This executable works the same as do-release-upgrade. If you still get the error of the upgrade not being supported, you might need to make an intermediate upgrade to an earlier version.

Adicionar registro DNS windows linha de comando

 Usando o Prompt de Comando (dnscmd)Abra o Prompt de Comando como Administrador e utilize a seguinte estrutura para adicionar um registro do tipo A (endereço IP):
dnscmd . /RecordAdd <NomeDaZona> <NomeDoHost> A <EnderecoIP>
Exemplo prático: 
dnscmd . /RecordAdd meu-dominio.com meu-servidor A 192.168.1.50

O ponto . indica que você está gerenciando o servidor DNS local.
Usando o PowerShell (Add-DnsServerResourceRecordA)
Abra o Windows PowerShell como Administrador e execute o comando correspondente para a zona de pesquisa direta:
Add-DnsServerResourceRecordA -Name <NomeDoHost> -IPv4Address <EnderecoIP> -ZoneName <NomeDaZona>
Exemplo prático: Add-DnsServerResourceRecordA -Name meu-servidor -IPv4Address 192.168.1.50 -ZoneName meu-dominio.com 

SNMP Oracle Linux

 

sudo yum install net-snmp net-snmp-utils -y 

 

nano /etc/snmp/snmpd.conf 

agentAddress  udp:10.20.1.2:161
rocommunity public

systemctl restart snmpd
 

Change 'mysql_native_password' authentication

 Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'


You can identify the affected users by running the following query in your MySQL console

SELECT user, host, plugin FROM mysql.user WHERE plugin='mysql_native_password';

Once you identify the users, update their authentication plugin using this command
ALTER USER 'user'@'location' IDENTIFIED WITH caching_sha2_password BY 'password';
FLUSH PRIVILEGES;


If your application or framework (such as an older version of PHP, Node.js, or a specific driver)
 does not support caching_sha2_password, you can use sha256_password as an alternative

Oracle linux security updates

 

- List available security packages:
dnf updateinfo list security
 

- List installed security updates:
dnf updateinfo list --installed --security


- Count available security updates (by severity):
dnf updateinfo summary
 

- Apply all available security updates:
sudo dnf update --security


- Apply a specific security advisory:
sudo dnf update --advisory=ELSA-YYYY-XXXX
 

- Update only specific package
sudo dnf upgrade openssh openssh-server openssh-clients 

NGINX - To allow a specific User-Agent from one IP address only


Step 1: Define the Map BlocksAdd this configuration inside the http {} block of your /etc/nginx/nginx.conf file. This logic evaluates the incoming User-Agent and IP address to flag unauthorized requests


http {
    # ... your existing http config ...

    # 1. Check if the User-Agent matches the restricted one
    map $http_user_agent $is_restricted_ua {
        default         0;
        "~*YourCustomUserAgent" 1; # Replace with your target User-Agent (regex matching)
    }

    # 2. Check if the client IP is NOT the authorized one
    map $remote_addr $is_unauthorized_ip {
        default        1;
        "192.168.1.50" 0; # Replace with your ONLY allowed IP address
    }

    # 3. Combine both conditions: Flag if it's the target UA AND an unauthorized IP
    map "$is_restricted_ua$is_unauthorized_ip" $block_request {
        default   0;
        "11"      1; # 1 (Restricted UA) + 1 (Unauthorized IP) = Block
    }
}



Step 2: Apply the Block RuleOpen your website's specific server configuration file (e.g., inside /etc/nginx/sites-available/) and use the combined variable to reject requests with a 403 Forbidden error.

server {
    listen 80;
    server_name yourdomain.com;

    # Place this rule globally inside the server block or inside a specific location block
    if ($block_request) {
        return 403;
    }

    location / {
        # ... your standard site configuration ...
    }
}

TLS/SSL certificate CSR

 
# CSR
openssl req -new -newkey rsa:4096 -keyout domain.key -out domain.csr


# Remove key password
openssl rsa -in encrypted.key -out decrypted.key


chain = crt + intermediary

Ubuntu Unsupported upgrades

 Unsupported upgrades Sometimes do-release-upgrade isn't able to run the upgrade to the latest version and it shows an error similar t...

Mais vistos