Netcat tips and tricks

check if port is up nc -zvw3 [hostname or ip] [port] there will be a success output if the port is open else it will either give no output or say connection refused A more detailed examples nc -vz -w 5 127.0.0.0 21 8000-8101 23 w - timeout in seconds 8000-8101 check the ports from 8000 to 8101 (both inclusive) additionally check the ports 21 and 23

1 min · Yashodhan Ghadge

Pihole install and setup

Installation https://github.com/pi-hole/docker-pi-hole run docker compose script to use my setup please use this is repo https://gitlab.com/codexetreme/pihole_server to clone it do git clone https://gitlab.com/codexetreme/pihole_server pihole installation hiccups On ubuntu the pesky systemd will cause issues, so from the docs of pihole sudo systemctl disable systemd-resolved.service sudo systemctl stop systemd-resolved.service sudo nano /etc/NetworkManager/NetworkManager.conf Add dns=default under [main] so that the file contents look like what is shown below: [main] plugins=ifupdown,keyfile dns=default Visit the web gui goto 0....

1 min · Yashodhan Ghadge

Rsync

Rsync Use it sync between local and remote environments rsync -azP source destination -a option The -a option is a combination flag. It stands for “archive” and syncs recursively and preserves symbolic links, special and device files, modification times, group, owner, and permissions. It is more commonly used than -r and is usually what you want to use. -n, -dry-run Always double-check your arguments before executing an rsync command. Rsync provides a method for doing this by passing the -n or –dry-run options....

1 min · Yashodhan Ghadge