The Daily WTF


Toothpaste for Dinner

Ars Tech

Google News


linux voice



MAGPIE php feed reader

40 Linux Server Hardening Security Tips [2017 edition]nixCraft Updated Tutorials/Posts

Securing your Linux server is important to protect your data, intellectual property, and time, from the hands of crackers (hackers). The system administrator is responsible for security Linux box. In this first part of a Linux server security series, I will provide 40 hardening tips for default installation of Linux system.

Linux/Unix desktop fun: Bastet Tetris(r) clone with block-choosing AI for consolenixCraft

Xkcd - hell

Do you love the puzzle and Linux/Unix-like system? Command line? Try ncurses based Tetris clone which is harder than every other Tetris out there. From the project home page:

Have you ever thought Tetris(R) was evil because it wouldn't send you that straight "I" brick you needed in order to clear four rows at the same time? Well Tetris(R) probably isn't evil, but Bastet certainly is. >:-) Bastet stands for "bastard tetris", and is a simple ncurses-based Tetris(R) clone for Linux. Unlike normal Tetris(R), however, Bastet does not choose your next brick at random. Instead, Bastet uses a special algorithm designed to choose the worst brick possible. As you can imagine, playing Bastet can be a very frustrating experience!

How To Setup a Firewall with UFW on an Ubuntu and Debian LinuxnixCraft Updated Tutorials/Posts

Learn how to use UFW to secure your server and apply common firewall rules /commands on a Ubuntu/Debian Linux server.

Linux: Iptables List and Show All NAT IPTables Rules CommandnixCraft Updated Tutorials/Posts

I am using /sbin/iptables -L -v -n | more command. However, I am unable to list NAT rules. How do I use the iptables command to view or list NAT rules stored in NAT tables? How do I see all the rules in NAT tables under CentOS / RHEL / Debian / Ubuntu Linux based server?

How to change or configure OpenBSD package install mirrornixCraft

openbsd commandI am trying to install nginx server on OpenBSD but keep getting an error that read as follows when I run the pkg_add command:

https://mirror.leaseweb.com/pub/OpenBSD/6.1/packages/amd64/quirks-2.304.tgz" title="quirks-2.304.tgz: ftp: Error retrieving file: 404 Not Found signify: gzheader truncated https://mirror.leaseweb.com/pub/OpenBSD/6.1/packages/amd64/nginx-1.10.2p2.tgz" title="nginx-1.10.2p2.tgz: ftp: Error retrieving file: 404 Not Found signify: gzheader truncated

How do I change or configure OpenBSD package install mirror for the pkg_add command?

How to install vnstat console-based network traffic monitor on FreeBSDnixCraft Updated Tutorials/Posts

How do I install vnStat under FreeBSD version 8/9/10/11 operating system to keep track of my network traffic? (Not a fan of FreeBSD? try vnstat on a Debian/Ubuntu/Fedora Linux or CentOS/RHEL version 6.x/7.x.)

How to add a new static route on RHEL/CentOS 4.x/5.x/6.x/7.x LinuxnixCraft Updated Tutorials/Posts

Explains how to configure static routing under Red Hat / RHEL / CentOS Linux version 4.x/5.x/6.x/7.x.

How To Mount a Remote Directory With SSHFS on a LinuxnixCraft Updated Tutorials/Posts

Learn how to use SSHFS to mount remote directories on Linux server/desktop.

How to move/migrate LXD VM to another host on LinuxnixCraft

How do I migrate LXD VMs/containers between two Linux nodes powered by Ubuntu Linux?

How to test PHP 7 and WordPress MySQL/MariaDB Database connectivity using a PHP scriptnixCraft

I wanted to test if my PHP 7 and MySQL/MariaDB for WordPress are working. If not I wanted to see some error on screen or for my monitoring system. How to write a script for a quick PHP MySQL DB connection test for WordPress or any other database and send an email or text when site is down?

Where does MySQL/MariaDB stored the data in my harddisk on Linux/Unix?nixCraft Updated Tutorials/Posts

I am a new MySQL user on Unix-like systen. Where are my mysql/mariadb database and table files are stored in a UNIX or Linux operating systems? Where does MySQL stored the data in my harddisk? How do I find out the location?

Linux / UNIX: Bash Script Sleep or Delay a Specified Amount of TimenixCraft Updated Tutorials/Posts

How do I pause for 5 seconds or 2 minutes in my bash shell script on a Linux or Unix-like systems? How do I pause my shell script for five second before continuing (timeout)?

How to shutdown / reboot the remote Linux server from the CLInixCraft

I am a new Linux sysadmin. How do I remotely shutdown or reboot the server from the CLI?

OpenSSL drops TLS 1.0/1.1 support for Debian Unstable and what does it mean for Debian sid users?nixCraft

From the announcement mailing list:
I've just uploaded a version of OpenSSL to unstable that disables the TLS 1.0 and 1.1 protocol. This currently leaves TLS 1.2 as the only supported SSL/TLS protocol version. This will likely break certain things that for whatever reason still don't support TLS 1.2. I strongly suggest that if it's not supported that you add support for it, or get the other side to add support for it. OpenSSL made a release 5 years ago that supported TLS 1.2. The current support of the server side seems to be around 90%. I hope that by the time Buster releases the support for TLS 1.2 will be high enough that I don't need to enable them again.

curl Command Resume Broken DownloadnixCraft Updated Tutorials/Posts

I know wget can resume a failed download. I am on a Mac OS X/macOS and do now want to install wget command. How can I resume a failed download using curl command on Linux or Unix-like systems?

The Novice Guide To Buying A Linux LaptopnixCraft Updated Tutorials/Posts

All major laptop (notebook) hardware is supported by Linux. The important things to take into account when looking to buy a Linux powered laptop are as follows to avoid any hardware compatibility problems. Selecting correct specification is important. In this first part, I will cover what to look out for when buying a Linux powered laptop.

How To Use awk In Bash ScriptingnixCraft Updated Tutorials/Posts

Awk is an excellent tool for building UNIX/Linux shell scripts. AWK is a programming language that is designed for processing text-based data, either in files or data streams, or using shell pipes. This pages shows how to use awk in your bash shell scripts.

exa a modern replacement for ls written in rust for Linux/UnixnixCraft

ls is a command to show files in Linux and Unix-like operating systems. A ls command first appeared in a version of AT&T UNIX as well as in Multics. BSD and GNU Coreutils package provides the ls command with minor syntax changes. There is now third alternative named exa. It is a modern replacement for ls.

How to install and setup Nginx on Debian Linux 9nixCraft

How do I install and configure Nginx web server on a Debian Linux 9 server running on the cloud?

Test If Linux Server SCSI / SATA Hard Disk Going BadnixCraft Updated Tutorials/Posts

I/O errors in /var/log/messages indicates that something is wrong with the hard disk and it may be failing. You can check hard disk for errors using smartctl command, which is control and monitor utility for SMART disks under Linux / UNIX like operating systems.

Linux: How to load a kernel module automatically at boot timenixCraft Updated Tutorials/Posts

How do I Load a Linux kernel module automatically at boot time so that my hardware automatically recognized during system boot sequence?

5 Awesome Open Source Groupware Software SuitenixCraft

Groupware (also known as "Collaborative software") is nothing but an app that helps users in everyday tasks such as calendar/scheduling, address books, email, forums, mailing lists, IM, wiki and more. The use of collaborative software in the work space creates a collaborative working environment. You can synchronize and share your files and photos easily using your hardware while maintaining privacy and security. Here is a list of 5 of them that you must know.

How to install PHP 7 fpm on Alpine LinuxnixCraft

I am a new user of Alpine Linux. How do I install PHP 7.x along with Nginx web server on Alpine Linux?

Understanding /etc/group FilenixCraft Updated Tutorials/Posts

Can you explain me the format of /etc/group user group file under Linux / UNIX-like operating systems?

Understanding /etc/shadow filenixCraft Updated Tutorials/Posts

Can you explain me the format of /etc/group user group file under Linux / UNIX-like operating systems?

Understanding /etc/passwd File FormatnixCraft Updated Tutorials/Posts

Can you explain /etc/passwd file format for Linux and Unix-like operating systems?

How to generate RSS 2.0 feed quickly using PythonnixCraft

I wanted to generate RSS 2.0 feeds in Python. Nothing fancy but for certain tasks I needed it something that is quick and just works out of the box. I found rfeed - a library to generate RSS 2.0 feeds in Python. It is in my opinion straightforward to use.

How To Find a Directory On Linux Based SystemnixCraft Updated Tutorials/Posts

I just switched from MS-Windows server admin to Debian Linux server admin role. I need to find a directory called project.images. How can I find a directory on Linux?

Linux / Unix: Sort ls Command Output By Last Modified Date and TimenixCraft Updated Tutorials/Posts

How do I sort the output of ls command by last modified date?

Top 25 Nginx Web Server Best Security PracticesnixCraft Updated Tutorials/Posts

Best Nginx web server hardening and security practice for Linux/Unix sysadmins and developers.

My 10 UNIX Command Line MistakesnixCraft Updated Tutorials/Posts

Here are a few mistakes that I made while working at UNIX/Linux prompt.

How to install Letsencrypt free SSL/TLS for Nginx certificate on Alpine LinuxnixCraft

I already installed and setup regular Nginx based HTTP server on Alpine Linux. How do I configure Nginx web server with letsencrypt free SSL/TLS certificate?

How to add new brick to replicated GlusterFS volume on LinuxnixCraft

I have a three server replicated volume setup (scalable network filesystem for cloud and VMs). I need to add one more server. How do I add a new a new brick to an existing replicated volume on a Debian or Ubuntu/CentOS Linux?

How to test the network speed/throughput between two Linux serversnixCraft

I have setup total four servers in cloud based data center. They run either CentOS or Ubuntu Linux. I need to make sure clustered file system performance is reasonable as my servers shared with other users. How do I check the speed between the two Linux servers using command line options for private LAN/VLAN?

How to install the latest/stable version of Linux kernel on Ubuntu Linux using apt-getnixCraft

I read your tutorial about compiling a stable version of the Linux kernel on a Ubuntu/Debian Linux. I wanted to install the same using apt-get command. How can I install the latest (mainline) Linux kernel on Ubuntu Linux?

Increase your Linux server Internet speed with TCP BBR congestion controlnixCraft

I recently read that TCP BBR has significantly increased throughput and reduced latency for connections on Google's internal backbone networks and google.com and YouTube Web servers throughput by 4 percent on average globally - and by more than 14 percent in some countries. The TCP BBR patch needs to be applied to the Linux kernel. The first public release of BBR was here, in September 2016. The patch is available to any one to download and install. Another option is using Google Cloud Platform (GCP). GCP by default turned on to use a cutting-edge new congestion control algorithm named TCP BBR.

How to mount Glusterfs volumes inside LXC/LXD (Linux containers)nixCraft

How do I install and configure the Gluster Native Client on a Debian or Ubuntu Linux? How do I mount Gluster volumes to access data from LXC/LXD (Linux containers)?

How to install and setup LXC (Linux Container) on Fedora Linux 26nixCraft

How do I install, create and manage LXC (Linux Containers - an operating system-level virtualization) on Fedora Linux version 26 server?

How to upgrade LXD VMs powered by Ubuntu/Debian or CentOS LinuxnixCraft

I run over 10+ LXD VMs powered by CentOS Linux 7 and Debian/Ubuntu Linux. How do I upgrade all VMs automatically or on demand using Ansible tool?

Download of The Day: Fedora Linux 26nixCraft

Fedora 26 with KDEFedora Linux version 26.0 has been released ( jump to download ) after many months of constant development and available for download in various media format. Fedora 26 is a free and open source operating system includes various new features such as GCC 7, Golang 1.8, Python 3.6, DNF 2.0, OpenSSL 1.1.0 and more. Fedora 26 runs on both ARM servers and desktop boards too.

How to fix IPMI KVM JAVA BMCMD5withRSA and is treated as unsigned errornixCraft

Like any good sysadmin, I kept my servers and desktop side up to date and patched all the time. However, recent Java updates have broken my IPMI KVM Java Applets on Dell, IBM, HP, Supermicro and FreeNAS mini servers. You will get an error that read as follows:
Unsigned application requesting unrestricted access to system. The following resource is signed with a weak signature algorithm MD5withRSA and is treated as unsigned.

Why port 80 (HTTP) reported as open by nmap when it is closed?nixCraft

Why are some ports reported as open by nmap? I recently setup a small server which is running Debian 9. The purpose of this machine is to run OpenVPN server on port 443 to bypass censorship. It runs the following services and nothing else:
  1. Squid on private IP belongs to VPN pool (
  2. SSH on private IP belongs to VPN pool (
  3. DNS resolver on private IP belongs to VPN pool (
  4. OpneVPN on public IP port 443 (server_public_ip_address:443)

How To install and setup PostgreSQL 9.6 on Debian Linux 9nixCraft

How do I Install and setup PostgreSQL version 9.6 database system on Debian Linux version 9.x?

How to check and verify md5/sha1/sha256 checksums for Apple MacOS X when I download filesnixCraft

Malware is becoming more and more common for macOS. I wanted to make sure file I downloaded files such as an ISO image or firmware are safe before install on my system. How do I verify md5 or sha1 or sha256 checksums for my Apple MacOS X when I download files from the Internet?

How To Install and Configure an OpenVPN Server on Debian 9 In 5 MinutesnixCraft

I am a new Debian Linux version 9 server user. How do I setup an OpenVPN Server on Debian Linux version 9.x or 8.x server to shield my browsing activity from bad guys on public Wi-Fi, and more?

How to use or specify multiple IP addresses in iptables source or destination on LinuxnixCraft

I need to specific multiple IP address in iptables using Linux script. How do I create a rule that uses multiple source or destination IP addresses ?

How to keep Debian Linux patched with latest security updates automaticallynixCraft

How do I keep my server/cloud computer powered by Debian Linux 9.x or 8.x current with the latest security updates automatically? Is there is a tool to update security patched automatically?

How to write Raspbian Jessie image file to SD cards on Apple macOS / OS XnixCraft

I got a Raspberry PI 3 from my friend. I am a long term macOS user. How do I write Raspbian image file to SD card using macOS?

How to install latest kernel on CentOS Linux 7 using yum commandnixCraft

I am a new CentOS Linux 7 user who runs it on my Laptop. I liked the operating system. Is there is a way to run latest/stable Linux kernel on a CentOS Linux version 7?

How to display countdown timer in bash shell script running on Linux/UnixnixCraft

I want to display a countdown before purging cache from CDN network. Is there an existing command to show a conuntdown from 30..1 as 30,29,28,...1 on Linux or Unix bash shell script?

How to install and use Monit on Ubuntu/Debian Linux server as process supervision toolnixCraft

How do I install and configure monit to restart services such as Nginx/Apache/OpenVPN server when failed on Debian or Ubuntu Linux?

How to add ZIL write and L2ARC read cache SSD devices in FreeNASnixCraft

How do I add the write cache called the ZIL and read cache called L2ARC to my my zroot volume? How do I extend my existing zroot volume with ZIL and L2ARC ssd disks of FreNSA server?

How to find and delete directory recursively on Linux or Unix-like systemnixCraft

I type 'find . -type d -iname foo -delete' command to find the foo directories and delete them. However, I am getting an error message that read as find: cannot delete './hourly.4/data/foo': Directory not empty on Linux server. How do delete directories based on find command output on Linux or Unix-like system?

How to run two or multiple networks instance of Tinc VPN on same boxnixCraft

How do I use Tinc to create a mesh network of two different VPN on the same server? Is it possible to create multiple VPN tunnels between two hosts using tinc VPN software?

How To Patch and Protect Linux Kernel Stack Clash Vulnerability CVE-2017-1000364 [ 19/June/2017 ]nixCraft

A very serious security problem has been found in the Linux kernel called "The Stack Clash." It can be exploited by attackers to corrupt memory and execute arbitrary code. An attacker could leverage this with another vulnerability to execute arbitrary code and gain administrative/root account privileges. How do I fix this problem on Linux?

How to find out if my Ubuntu/Debian Linux server needs a rebootnixCraft

I use ansible-playbook to update my VMs and bare metal servers hosted in a remote data center. How do I tell, whether the Ubuntu Linux server requires a reboot using the command line over ssh based session?

Download of The Day: Debian Linux 9 ( Stretch )nixCraft

Debian GNU/Linux version 9.0 stretch has been released ( jump to download ) after many months of constant development and available for download in various media format. Debian 9.0 is a free operating system includes various new features such as support for mips64el architecture, GNOME 3.22, KDE Plasma 5.8, LXDE, LXQt 0.11, MATE 1.16, Xfce 4.12, Linux kernel 4.9 and more. Debian 9 is dedicated to the project's founder Ian Murdock, who passed away on 28 December 2015. Debian 8.x 64-bit-mate-desktop-screenshot

How to run cron job every minute on Linux/UnixnixCraft

I want to run a cron job that should run a specific shell script /home/jobs/sync.cache.sh every minute. How do I use crontab to execute script every minute on Linux or Unix-like system?

How to redirect non-www to www HTTP / TLS /SSL traffic on NginxnixCraft

I want ALL cyberciti.biz to go to www.cyberciti.biz for SEO and other reasons. I want ALL HTTP traffic to go to HTTPS. How do I redirect all HTTP/HTTPS non-www (e.g. domain name cyberciti.biz) traffic to www (e.g. domain name www.cyberciti.biz) when using Nginx web server?

Ubuntu: /dev/xvda2 should be checked for errorsnixCraft

When I log in to my Ubuntu Linux 16.04 LTS AWS cloud server, I get the message on screen: /dev/xvda2 should be checked for errors. I can not run fsck command on /dev/xvda1 because it is mounted. How do I check my disk for error without corrupting data?