Author: troy

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. 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...

Php 7.3 How to Upgrade Debian Linux 9

This is not as simple as even the most popular blogs explain. sudo apt update sudo apt -y install software-properties-common dirmngr apt-transport-https lsb-release ca-certificates sudo wget -O /etc/apt/trusted.gpg.d/php.gpg echo “deb $(lsb_release -sc) main” | sudo tee /etc/apt/sources.list.d/php7.3.list sudo apt update sudo apt -y install php7.3 php7.3-cli php7.3-fpm php7.3-json php7.3-pdo php7.3-mysql php7.3-zip php7.3-gd php7.3-mbstring php7.3-curl php7.3-xml php7.3-bcmath php7.3-json sudo...

Responsive iframe WordPress

div class=”iframe-container” iframe src=”” allowfullscreen /iframe /div .iframe-container { overflow: hidden; padding-top: 56.25%; position: relative; } .iframe-container iframe { border: 0; height: 100%; left: 0; position: absolute; top: 0; width: 100%; } /* 4×3 Aspect Ratio */ .iframe-container-4×3 { padding-top: 75%; }

Mysql Isolate One Table to Restore from Backup

In order to restore only one table from a mysql database backup file, you want to isolate the single table to another sql file. Use SED on the shell command line: sed -n -e '/– Table structure for table `onetable`/,/– Table structure/p' backup.sql > onetable.sql You will want to DROP the table from the database. From the mysql command line:...

Systemd ssh Reverse Tunnel on Debian 9 Stretch

I have used rc.local for years to setup an ssh reverse tunnel on boot under Debian up until Stretch. Now like many others I imagine, I’ve had to convert to systemd. I read everything I could about the choice for deprecating rc.local for systemd. I can say that systemd may be powerful, but systemd’s complexity entails a huge learning-curve for...

How To Manage Fail2ban Using Perl Script On Remote Servers and A Control Mysql Database

Earlier I posted how to use a text file created by a script to similarly manage the rogue IPs that Fail2ban bans. The problem with using scripts and crontab is that it is not reporting in real-time. The method here works in real-time because Fail2ban reports directly to the MySQL on the control server. On each remote you’ll want to...

Apache2 Custom 404 Page

Create a html page sudo vi /var/www/missing.html whateveryouwanttosay sudo chown www-data:www-data /var/www/missing.html sudo vi /etc/apache2/conf.d/localized-error-pages Uncomment #ErrorDocument 404 /missing.html sudo service apache2 restart

Harden Apache 2.2

sudo vi /etc/apache2/conf.d/security ServerTokens Prod ServerSignature Off sudo vi /etc/apache2/sites-available/default Directory /var/www/html> Options -Indexes /Directory>

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 (...

LAMP upgrade to mysql 5.6 PHP installation appears to be missing the MySQL extension which is required by WordPress

WordPress Running on Debian 7 LAMP After upgrading to MYSQL 5.6 from 5.5 I encountered several problems, first of which was a completely broken MySQL then Apache2.3 and PHP complained. This ultimately cleaned up the mess: sudo dpkg –purge mysql-client-core-5.6 sudo dpkg –purge mysql-client sudo dpkg –purge mysql-server-core-5.6 sudo dpkg –purge mysql-common sudo dpkg –purge mysql sudo apt-get –purge remove...

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