How to use DNS-over-TLS with Stubby?

Following the announcement of DNS over TLS for Google DNS (, we examine how to configure DNS-over-TLS on our computers by using Stubby.

First, let’s install Stubby from the Ubuntu 18 software repository;

sudo apt install stubby

Stubby will start working directly with pre-defined configuration. To add Google DNS, add the following lines to the configuration file;


Re-scan hard drives after a resize without rebooting

We can rescan hard drives after resize a virtual disk for a virtual machine without having to reboot the virtual machine. To do that; trigger a re-sync of the kernel for all the SCSI devices unless you know exactly which one it is connected to;

ls /sys/class/scsi_device/
echo 1 > /sys/class/scsi_device/0\:0\:0\:0/device/rescan
echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan
echo 1 > /sys/class/scsi_device/2\:0\:1\:0/device/rescan

Setting up VPN Gateway with Raspberry PI (VPN Router)

RaspberryPI VPN Gateway

The increasing availability of High-grade and  budget friendly VPS (virtual private server) services accelerated personal projects. Raspberry PI and DigitalOcean VPS helped me alot while getting my VPN Gateway (VPN Router) project done. It works in site-to-site VPN model and we are going to be able to tunnel all our LAN traffic pass trough our VPS. In this model, we are going to be able to use remote VPS‘s Internet connection.

Paid/Free VPN service providers provide very slow Internet connection in practice without any reason. By using this project, I have pushed my daily Internet traffic trough Europe based VPS servers to Turkey without feeling any slowness, for many years. According to my personal experience, below 100ms packet latency doesn’t noticeably effect web surfing experience. (more…)

Cannot connect to RDP over SSH to multiple hosts

I have several RDP over SSH connections defined in Remmina. When I connect to one, the fingerprint is stored in .freerdp/known_hosts – but for the “host”, due to the SSH tunnel.

When I try to connect to the next RDP over SSH connection, this fails with “Unable to connect to RDP server”, due to the record in known_hosts.

Unable to connect to TDP server

Seems like Remmina should allow several RDP to localhost to avoid this.

Workaround: Remove ~/.freerdp/known_hosts between each connection.

Permanent workardound:

rm .freerdp/known_hosts && ln -s /dev/null .freerdp/known_hosts

Noise Problem, connecting a PC to a Hi-Fi sound system

kevlar_speakerRecently I bought a pair of Yamaha HS80M monitors for using with my desktop pc. They make sound great but when I volume up there was a very high level of deep noise. After having a short talking with my electronic engineer friend, I got the idea why the system gets noise from my pc. He told me that I should cut the ground loop in order the stop the noise.

I swapped monitor’s plug system with a non-grounded multi plug. That cut the ground loop and now there is no noise at all. In my case the ground was very weak, my pc makes to much noise and I use a copper sound cable.

Another noise resource can be your cable. I use BELKIN100%-coverage aluminum/Mylar foil shielded copper audio cable, it helps to stop environmental noise.

If you need more detailed explanation, leave a comment.

Change RedHat RHEL / Centos hostname

To change Centos or RHEL hostname, follow 3 steps below;

– edit /etc/hosts file; localhost.localdomain localhost

– edit /etc/sysconfig/network file;

– post new hostname to the kernel or restart network service;

echo "" > /proc/sys/kernel/hostname
/etc/init.d/network restart

Ubuntu, empty trash from CLI?

To empty our trash from terminal on Ubuntu;

sudo rm -rf ~/.local/share/Trash/

for boot partititon;

sudo rm -rf /boot/.Trash-0/

Be careful while using ‘rm -rf’ as it deletes the files and directories permanently.

RHEL Disk I/O Performance Tunning

If you struggled to cope with disk I/O on virtual host machines which runs on Centos or RHEL, there is a great system performance tuning tool named TUNED, comes with different profiles.

For installing tuned;

yum install tuned -y

starting the service permanently;

service tuned start
chkconfig tuned on

service ktune start
chkconfig ktune on

status of running profile;

tuned-adm active


Handling Leap Year Problem

I built a time counter which counts time from a specific date. But on 2012, I recognized that something goes wrong. It showed our anniversary one day earlier. After googling it, I read leap years have one additional day and, I had to change place all my code with the code supports leap years. The main coding idea for handling this problem is something like this;

var currYear =;

if ( (currYear % 4 == 0 && currYear % 100 != 0 ) || currYear % 400 == 0 ) {
this.numOfDays = 366;