🐧 Linux
(32 posts)
Practical Linux administration guides covering system configuration, networking, troubleshooting, and automation.
📅 2019-06-21
✍️ Bart Schelstraete
In SLES you can search & install specific CVE patches using the commands below. List the patch for a specific CVE#: # zypper lp --cve=CVE# Get information about the patch: # zypper info -t patch…
Read more →
📅 2019-02-16
✍️ Bart Schelstraete
If you do a df , and you compare those values with du , it is possible that the values don't match. There are multiple reasons why this can happen, and one of those reasons is that files were…
Read more →
📅 2017-11-20
✍️ Bart Schelstraete
You can use the following shell commands to redirect a port to another port. PORT_FROM=443 PORT_TO=443 DEST=10.33.35.110 iptables -t nat -A PREROUTING -p tcp --dport $PORT_FROM -j DNAT --to…
Read more →
📅 2017-11-14
✍️ Bart Schelstraete
Using the "stress" application, you can simulate high memory usage on your system. You may use the following command line: stress --vm-bytes $(awk '/MemFree/{printf "%d\n", $2 * 0.9;}' <…
Read more →
📅 2017-08-16
✍️ Bart Schelstraete
#!/bin/sh set -o pipefail PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin #--------------------------------------------------- # (1) set up all the mysqldump variables…
Read more →
📅 2017-08-09
✍️ Bart Schelstraete
With ffmpeg you can also decrease the size (aka quality) of an mp4 file on the Linux command line. You can use the following example, which will generate a +/- 5MB file: ffmpeg -i original.mp4 -fs 5M…
Read more →
📅 2017-08-09
✍️ Bart Schelstraete
You can optimize JPEG images on the Linux command line (= reduce the size to load images faster). In order to achieve that, you can make use of the 'jpegoptim' application. On Ubuntu/Debian systems:…
Read more →
📅 2017-08-07
✍️ Bart Schelstraete
Create a file 'allowed-hosts' in the 'work_dir' (which can be found in the denyhosts.conf file), located at /var/lib/denyhosts on Ubuntu, containing the IP addresses. See the example below: cat <>…
Read more →
📅 2017-08-07
✍️ Bart Schelstraete
Find IP Address to Unblock Log in to your server via SSH and type in the following command: iptables -L -n Look for the IP address you want to unblock / unban. Now we must find the jail name this IP…
Read more →
📅 2017-08-07
✍️ Bart Schelstraete
First, edit the config file: vi /etc/fail2ban/jail.conf Then, check the line: ignoreip = Now add all the IPs you want. Each IP or IP range must be placed here separated by a space. Ex: 192.168.0.1…
Read more →