Block Ads at network level - Pi hole as local DNS

Pi hole is a network wide ad blocker. It works by setting itself up as a DNS (Domain Name System). The article walkthrough on installing pi hole on a Raspberry Pi however it can be installed on any computer or run as a Docker container. Note: Pi hole cannot block all ads e.g. It cannot block youtube ads as the ads are served from the same domain as the content. Further reading: what is dns and tools to query dns records ...

January 3, 2025 · 4 min

Use ssh keys to login to remote servers

The ssh-keygen is used to generate ssh keys and is mostly used for authenticating to gitlab, github, bitbucket at work. However we can use ssh keys to remote into a server without using passwords. Generate a new pair of ssh keys ssh-keygen is used to generate a new pair of keys In the below command -b is the bit length. Most application we use 2048 or 4096 -f specifies the file to store the generated key in ssh-keygen -b 4096 -f ~/.ssh/remoteserver Entering a passphrase is optional and can be entered for additional security. ...

January 2, 2025 · 2 min

Git yourself out of trouble. Using git to undo mistake via command line

Git has some amazing capabilities to help undo mistakes. Below are 8 common git mistakes and steps to fix them via command line. 1. Undo everything We made some changes but are not happy and want a clean working copy git command git restore . We are working on uncommitted changes. Running git restore will have all changes removed. 2. Get an older copy of a file (or) get a deleted file back We made a change to a file but now we want to restore it back to the previously committed version. git command ...

December 31, 2024 · 3 min

What is DNS and tools to query DNS records

In setting up this website i had to update a few DNS entry in my hosting platform. Below is a small write up of what is dns, what types of records exist and how to validate them using linux commands such as dig and nslookup What is DNS DNS - Domain Name System which is used to translate domain name (e.g. www.google.com) to its IP (Internet Protocol) address which computers can understand. ...

December 28, 2024 · 4 min

Managing multiple SSH keys

Need for multiple SSH keys Working on various projects often requires access to different systems and environments. For secure authentication, we need to maintain multiple SSH keys. This is crucial for: Enhanced security: Each key is associated with a specific user or device, limiting access only to authorized individuals. Flexibility: Different keys work with different protocols and services. Efficiency: Automated scripts can easily use different keys for authentication. Collaboration: Team members can have different SSH keys, enabling secure access to shared resources. Below is a 5 step guide in setting up and maintaining the SSH keys ...

December 27, 2024 · 3 min