Category: Linux

Debian 10 Disable Tracker

This works. There are a lot of examples out there that don’t work. I found that an additional edit (bottom) made all the difference. These are the typical changes you’ll find online. https://gist.github.com/vancluever/d34b41eb77e6d077887c But here is the change that made all the difference for me. Edit all the tracker files and change X-GNOME-Autostart-enabled to False. re. sudo vi /etc/xdg/autostart/tracker-miner-apps.desktop X-GNOME-Autostart-enabled=false

nftables Beginner Examples

The first things you need to do and the commands that you need. Save and Translate your iptables rule into nftables rules when migrating from iptables to nftables are: Save iptables rules to text file iptables-save -c > iptables-saved-backup.txt Translate iptables rules to nftables text file iptables-restore-translate -f iptables-saved-backup.txt > ruleset.nft Active nftables rules nft -f ruleset.nft NOTE You should...

How To Create A Blank Root For Apache Virtual Host?

If you don’t want Apache to serve the first Virtual Host when you get a request for the server IP. (because that is what is supposed to happen). If someone or somebot is attempting to see what is at the ip address, you can serve a blank page instead as follows: vi /etc/apache2/sites-available/000-default.conf Insert this VirtualHost at the top of...

Setup LAMP Server Debian 9 Apache 2.4 MarianDB Php 7

Prerequisite is a fresh remote server with Debian 9 Stretch installed and booted From remote terminal Block all traffic iptable -F iptables -P INPUT DROP iptables -P OUTPUT DROP iptables -P FORWARD DROP Create a User sudo useradd -d /home/username -m username Set the User’s Password sudo passwd username Add the User to the Admin Group sudo adduser username adm...

Fail2ban ERROR /bin/sh iptables No such file or directory

In Fail2ban version 0.9 running on Debian 9 server fail2ban.action [17325]: ERROR -n -L INPUT | grep -q ‘f2b- [ \t]’ — stderr: b’/bin/sh: iptables: No such file or directory\n’ [edit] /etc/fail2ban/action.d/iptables-common.conf [change] iptables = iptables [to] /sbin/iptables = iptables

How to Force HTTPS using Apache

Edit .htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule>

How To Set Up Password Authentication in Apache2

sudo apt-get install apache2-utils ( FIRST USER only ( -c ) option to create file, or you will wipe all your existing logins !!! ) sudo htpasswd -c /etc/apache2/.htpasswd username1only sudo htpasswd /etc/apache2/.htpasswd username2etc Conventional setup sudo vi /etc/apache2/sites-enabled/000-default.conf ( In which case you must specify the Directory to be protected ) <Directory “/var/www/www.example.com/administrator”> AuthType Basic AuthName “Restricted Content” AuthUserFile...

Fail2ban Mysql Database to Manage Persistent Bans

Step 1 Create Database and Tables in MySQL Add a “source” field for the server name if you want to use a remote database setup (and add it to the UNIQUE KEY).The UNIQUE KEY prevents duplicates of course. But this means you can refresh the perl script without handling duplicates there which would complicate things considerably. CREATE TABLE iptable (...

Disable IPV6 on Debian 10

Three (3) steps to completely eliminate IPV6 on your system. Step 3 applies only if you are using SSH in daemon mode (on a server). The following should work for all Debian. Step 1 Step 2 Step 3

Stop the Kernel Logging ipv6

To disable IPv6 on all interfaces system wide sudo vi /etc/sysctl.conf add this line net.ipv6.conf.all.disable_ipv6 = 1 Or To disable IPv6 on an interface only net.ipv6.conf.lo.disable_ipv6 = 1 net.ipv6.conf.eth0.disable_ipv6 = 1 sudo sysctl -p /etc/sysctl.conf or reboot

DD Used Space Only Image File Using Gzip Solved

The problem is how to create an img of a disk (or storage of any kind) while not saving the entire unused space – shrink empty disk space with dd. Like many similar problems, I found many posts about how to save the img of a disk and remove empty partitions. Most are obsolete or did not work as specified, which...

Disable RC4 and SSL3

sudo vi /etc/apache2/mods-available/ssl.conf SSLHonorCipherOrder on SSLCipherSuite “EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA !RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS” SSLProtocol All -SSLv2 -SSLv3 SSLCompression Off

How To Configure exim4 on Debian 9

This setup is for a wordpress server that mail-out submissions on the website and assumes that 1) Outbound only. All mail is sent-out via SMTP. You don't want mail retained on the server. 2) there is more than one recipient, re. one for WordPress form submissions and a webmaster (or root). 3) and you are using Google as your SMTP....

Padre Still Crashes on Debian Linux

The linked post was written in 2012 explaining what I think most users of Padre encounter, and therefore I won’t repeat anything already nicely documented there except to quote “And please do not feed me a junk line about it works on my Linux distribution, I do not care. Pretend I am a normal end user for a moment. If...