Monthly Archives: March 2023


Ubuntu Pi-hole DNS Fix: Pi-hole could not start DNS service after upgrading Ubuntu

Ubuntu is a widespread Linux distribution that has gained popularity over the years. One of the advantages of Ubuntu is its Long-Term Support (LTS) releases, which have been supported for several years and receive regular updates and security patches. Upgrading from one LTS release to another is a common task for Ubuntu users. However, sometimes things don’t go as planned, and some services may fail to start after the upgrade. In this blog post, we will explore one issue that Ubuntu users may encounter when upgrading from 18.04LTS to 20.04LTS or 22.04LTS and how to fix it.

The problem we will discuss is related to Pi-hole, a popular network-level advertisement and Internet tracker blocking application. Pi-hole uses DNS (Domain Name System) to stop unwanted traffic on your network. After upgrading from Ubuntu 18.04LTS to 20.04LTS or 22.04LTS, some users may encounter an issue where the DNS service for Pi-hole fails to start. The reason behind this is a broken symbolic link at /etc/dnsmasq.d/lxd.

LXD is a system container manager that allows users to run multiple isolated Linux systems (containers) on a single host. During the upgrade process, the symbolic link for LXD may become broken, causing the DNS service for Pi-hole to fail to start. Fortunately, the solution to this problem is simple. Users can remove the broken symbolic link by running the following command in the terminal:

sudo rm /etc/dnsmasq.d/lxd;

Once the broken symbolic link is removed, users can restart the DNS service for Pi-hole by running the following command:

pihole restartdns;

This command will restart the Pi-hole FTL (Faster Than Light) daemon, which handles DNS requests and blocks unwanted traffic.

In conclusion, upgrading from one LTS release to another is a common task for Ubuntu users. However, sometimes things may not go as planned, and some services may fail to start after the upgrade. One such issue that users may encounter is related to Pi-hole, where the DNS service fails to start due to a broken symbolic link at /etc/dnsmasq.d/lxd. Fortunately, the solution to this problem is simple, and users can fix it by removing the broken symbolic link and restarting the Pi-hole FTL daemon.


Unable to negotiate with IP port 22: no matching host key type found. Their offer: ssh-rsa

Secure Shell (SSH) is a cryptographic network protocol that is commonly used for secure data communication, remote command-line login, and other network services. The SSH command is used to remotely connect to a server or device and execute commands on that device. In this blog post, we will explain the following SSH command and when the extra parameters are needed.

ssh -p 22 -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa user@host;

Breakdown of the SSH command

  • ssh: The command to initiate a Secure Shell connection to a remote host.
  • -p 22: The -p option specifies the port number that SSH should use to connect to the remote host. In this case, the port number is 22, which is the default SSH port number.
  • -o HostKeyAlgorithms=+ssh-rsa: The -o option allows the user to set SSH options. In this case, the option HostKeyAlgorithms specifies the key exchange algorithm that should be used for the connection. The +ssh-rsa parameter adds the ssh-rsa algorithm to the list of acceptable algorithms.
  • -o PubkeyAcceptedKeyTypes=+ssh-rsa: Similar to the previous parameter, this option specifies the type of public key that will be accepted for authentication purposes. The +ssh-rsa parameter adds the ssh-rsa key type to the list of acceptable key types.
  • user@host: Specifies the username and hostname of the remote machine to connect to.

When are the extra parameters needed?

The extra parameters in this SSH command are used to specify the key exchange and authentication algorithms that are acceptable for the SSH connection. This is important because older, less secure algorithms can be vulnerable to attacks. By specifying only the more secure algorithms, you can help ensure that your connection is as secure as possible.

The specific parameters used in this command are not always necessary, but they can be useful in certain situations. For example, if you are connecting to an older SSH server that uses weaker encryption algorithms, you may want to specify only the stronger algorithms that are supported by both the server and your client. Similarly, if you are connecting to a server that requires a specific type of public key for authentication, you can specify that key type using the PubkeyAcceptedKeyTypes option.

In general, it’s a good idea to use the most secure algorithms that are supported by both your client and the remote server. This can help ensure that your connection is as secure as possible and minimize the risk of unauthorized access or data breaches.

In conclusion, the SSH command is a powerful tool for remotely connecting to and managing servers and devices. By understanding the different parameters and options available, you can customize your SSH connections to meet your specific needs and ensure that your connections are as secure as possible.


How to Create a Custom Local DNS Entry on a Ubiquity Dream Machine Pro

DNS (Domain Name System) is an essential part of the internet infrastructure that translates domain names into IP addresses. However, you can also use DNS for internal networks to assign custom hostnames to specific IP addresses. In this post, we will discuss how to create a custom local DNS entry on a Ubiquity Dream Machine Pro.

The first step is to assign a static IP address to the machine you want to create a custom DNS entry for. To do this, log in to the Dream Machine Pro’s web interface and navigate to https://10.1.1.254/network/default/clients. Find the machine you want to assign a static IP address to and click the “Static” button. Enter the IP address you want to assign and click “Save”.

Next, you need to assign a specific hostname to the machine. However, you might run into an error message that says “An error occurred while changing your settings”. This error occurs when you use a specific domain name like “bytefreaks.lcl”. To work around this issue, you can use a different TLD like “.net” instead.

If you still want to use the “.lcl” TLD, you will need to SSH into the Dream Machine Pro to modify the configuration files. Use the following SSH command to log in as root:

ssh -p 22 -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa [email protected];

If the default SSH command produces an error, you can use the above custom SSH command to log in successfully.

Once you have logged in via SSH, you will need to modify the following files:

  • /run/dnsmasq.conf.d/dns.conf
  • /mnt/data/udapi-config/ubios-udapi-server/ubios-udapi-server.state

The /run/dnsmasq.conf.d/dns.conf and /mnt/data/udapi-config/ubios-udapi-server/ubios-udapi-server.state files contain information about the local DNS entries. Use the “vi” editor to modify the /run/dnsmasq.conf.d/dns.conf file and replace the “.net” TLD with the “.lcl” TLD.

After you have made the necessary changes, exit the editor and kill the dnsmasq process using the following command:

pkill dnsmasq;

This command will stop the dnsmasq process, which is responsible for the DNS resolution. Then, execute dnsmasq again to ensure that it is running properly.

Now, you should be able to view your machine using the custom “.lcl” TLD from a browser. By creating a custom local DNS entry, you can simplify your local network administration and access your devices more easily.


Splitting a zip file (or any file) into smaller parts

In this post, we will explain the following commands:

  1. zip Original.zip Original/
  2. split -b 5M -d Original.zip Parts.zip.
  3. cat Parts.zip* > Final.zip
  4. unzip Final.zip -d Final

These commands are commonly used in Linux/Unix systems and can be very helpful when working with large files or transferring files over a network.

Command 1: zip Original.zip Original/

The zip command is used to compress files and create a compressed archive. In this command, we are compressing the directory named Original and creating an archive named Original.zip. The -r option is used to recursively include all files and directories inside the Original directory in the archive.

Command 2: split -b 5M -d Original.zip Parts.zip.

The split command is used to split a large file into smaller files. In this command, we are splitting the file Original.zip into smaller files with a size of 5 MB each. The -b option specifies the size of each split file, and the -d option is used to create numeric suffixes for the split files. The Parts.zip is the prefix for the split files.

Command 3: cat Parts.zip* > Final.zip

The cat command is used to concatenate files and print the output to the standard output. In this command, we are concatenating all the split files (which have the prefix Parts.zip) into a single file named Final.zip. The * is a wildcard character that matches any file with the specified prefix.

Command 4: unzip Final.zip -d Final

The unzip command is used to extract files from a compressed archive. In this command, we extract the files from the archive Final.zip and store them in a directory named Final. The -d option is used to specify the destination directory for the extracted files.

In conclusion, these commands can be beneficial when working with large files or transferring files over a network. By using the zip and split commands, we can compress and split large files into smaller ones, making them easier to transfer. Then, using the cat command, we can concatenate the split files into a single file. Finally, we can use the unzip command to extract the files from the compressed archive.