nixCraft Linux & Unix Sysadmin/DevOps Tutorial Newsletter

10 views
Skip to first unread message

nixCraft

unread,
Aug 12, 2022, 1:54:20 AM8/12/22
to nixc...@googlegroups.com
** Welcome to nixCraft Linux/Unix newsletter for Friday, 12 August 2022. I hope you will enjoy this version of the newsletter.
------------------------------------------------------------

For a long time, some of you received an email the same day I published a tutorial on the nixCraft blog via Google's Feedburner service. However, recently, Google turned off this facility. So I imported the old subscriber's list into my monthly email list. I will try to push the weekly digest instead of monthly.

* DNS settings to avoid email spoofing and phishing for unused domain (https://www.cyberciti.biz/security/dns-settings-to-avoid-email-spoofing-and-phishing-for-unused-domain/)
In this tutorial, I will explain how to configure DNS settings that tell receiving email servers this domain is not configured for emailing purposes and the attacker maliciously sending email on my behalf.

* How to protect Linux against rogue USB devices using USBGuard (https://www.cyberciti.biz/security/how-to-protect-linux-against-rogue-usb-devices-using-usbguard/)
You deployed a perfect firewall and other network security policies preventing unauthorized access to the user’s desktop computer over a network. However, you still need to block USB device access. We can configure a Linux desktop security policy to protect your computer against rogue USB devices (a.k.a. BadUSB) by implementing essential allow and blocklisting capabilities based on device attributes. For instance, I can define what kind of USB devices are authorized and how a USB device interacts with the Linux system. For example, I can define policy allowing Yubikey with serial number “XYZ” and USB LTE modem with serial # “ABC.” Every other USB device access is denied by default.

* A cautionary tale about locking Linux & FreeBSD user accounts (https://www.cyberciti.biz/networking/a-cautionary-tale-about-locking-linux-freebsd-user-accounts/)
Things are not always what they seem, and I learnt my lesson with ssh server configs hard way.

* How to install MySQL server on Ubuntu 22.04 LTS Linux (https://www.cyberciti.biz/faq/installing-mysql-server-on-ubuntu-22-04-lts-linux/)
MySQL version 8.0 is a free and open-source database system used by most web applications and sites on the Internet. Typically MySQL is part of the LAMP (Linux, Apache, MySQL, Perl/Python/PHP) stack. MySQL heavily uses popular open-source software such as WordPress, MediaWiki, and others as a database storage engine. Let us see how to install MySQL server version 8.x on Ubuntu 22.04 LTS Linux server, including settings up a new database, users and fine tuning server config.

* How to convert JSON to CSV using Linux / Unix shell (https://www.cyberciti.biz/faq/how-to-convert-json-to-csv-using-linux-unix-shell/)
Today I will talk about a common problem faced by many Linux or Unix sysadmins and developers. Typically modern apps and security devices heavily depend upon APIs and lists that feed data in JSON format. For example, a list of spamming or VPN CIDRs or a good list of verified bots' IP CIDRs is in JSON format. If they accept JSON format, you can take this list and upload it to your router or WAF. Unfortunately, not all devices accept JSON format. Hence, we can take JSON format and convert it to CSV format per our needs.

* Ubuntu 22.04 LTS Set Up OpenVPN Server In 5 Minutes (https://www.cyberciti.biz/faq/ubuntu-22-04-lts-set-up-openvpn-server-in-5-minutes/)
I am a new Ubuntu Linux 22.04 LTS server user. How do I set up an OpenVPN Server on Ubuntu Linux version 22.04 server to shield my browsing activity from bad guys on public Wi-Fi, set protective parameter vpn for developers and more?

* How to backup & restore a list of installed FreeBSD packages (https://www.cyberciti.biz/faq/how-to-backup-restore-a-list-of-installed-freebsd-packages/)
Today, I will share one helpful tip that allows FreeBSD developers and sysadmin to make a backup list of installed all FreeBSD packages and then restore it. Hence, this is useful for disaster recovery (DR) or simply rebuilding a new server. It will save you time.

* How to Set Up WireGuard VPN on Amazon Linux 2 (https://www.cyberciti.biz/faq/install-set-up-wireguard-on-amazon-linux-2/)
WireGuard is an open-source, free, modern, and fast VPN with state-of-the-art cryptography. It is like OpenSSH in simplicity and uses private and public keys. Hence, it is more straightforward as compared to IPSec and OpenVPN. Initially released for the Linux kernel, it works with other operating systems. This page explains how to install and set up WireGuard VPN on Amazon Linux EC2 or Lightsail server.

* How to fix "bash: add-apt-repository: command not found" error on Ubuntu/Debian Linux (https://www.cyberciti.biz/faq/bash-add-apt-repository-command-not-found-on-ubuntu-debian-linux/)
Let us see how to fix the "bash: add-apt-repository: command not found" error on an Ubuntu/Debian Linux system when you run the add-apt-repository command.

* How do you add comments on UFW firewall rule? (https://www.cyberciti.biz/faq/howto-adding-comments-to-ufw-firewall-rule/)
The iptables and ip6tables commands are used to set up a Linux firewall. However, many new Linux sysadmins and users find it challenging to use iptables. Hence, the ufw program is for managing a Linux firewall and aims to provide an easy-to-use interface for the user. This page explains how to add a comment to your ufw firewall rules.

* PHP Warning: Constant ABSPATH already defined in wp-config.php (https://www.cyberciti.biz/faq/php-warning-constant-abspath-already-defined-in-wp-config-php/)
While looking into the nginx PHP error log file fixing unrelated issues, I noticed I was spammed this message in log files.

* How to fix warning setlocale lc_ctype cannot change locale (utf-8) under macOS ssh terminanl (https://www.cyberciti.biz/faq/os-x-terminal-bash-warning-setlocale-lc_ctype-cannot-change-locale/)
You may get this warning on your macOS Unix desktop when try to ssh into remote Linux/Unix server: "warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory".

* Linux Check Disk Space Command To View System Disk Usage (https://www.cyberciti.biz/faq/linux-check-disk-space-command/)
I recently switched from a Windows server to a Linux server operating system and need Linux check disk space command. I am using Ubuntu 16.04/18.04/20.04 and CentOS 7.x/8.x server. How do I find out disk space utilization information using Linux command line option?

* Getting Yesterday's or Tomorrow's Day With Bash Shell Date Command (https://www.cyberciti.biz/tips/linux-unix-get-yesterdays-tomorrows-date.html)
When invoked without arguments, the date command displays the current date and time. Depending on the options specified, the date would set the date and time or print it in a user-defined format. However, how do you get yesterdays with bash shell script? What about tomorrows day? I have seen many sysadmins writing Perl scripts for calculating relative dates such as yesterdays or tomorrows day. You can use the GNU date command or BSD/date command, which is designed to handle relative date calculation

Until next time.
--
Reply all
Reply to author
Forward
0 new messages