Search Engine Optimization | Internet Marketing | Webmastering Blog

How To Use DD to Wipe Hard Drive

Helpful to know which device is which fdisk -l Will write zeros to sda dd if=/dev/zero of=/dev/sda bs=1M Write random numbers to sda dd if=/dev/urandom of=/dev/sda bs=1M Wipe the MBR dd if=/dev/zero of=/dev/sda bs=446 count=1 or just add the partition number to sda to wipe certain partitions Creates an ISO disk image from a CD-ROM; in some cases the created...

fail2ban.actions.action: ERROR iptables -D

fail2ban.actions.action: ERROR iptables -D INPUT -p tcp -m multiport –dports http,https -j fail2ban-apache-xxxxxxxxxxxxxxxxxxx iptables -F fail2ban-apache-xxxxxxxxxxxxxxxxxxx iptables -X fail2ban-apache-xxxxxxxxxxxxxxxxxxx returned 200 iptables only allows rules of up to 30 characters Shorten the name of the conf file solves the error

How To Solve Swappiness (Apache) Problem

Swappiness is a Linux kernel parameter that controls the relative weight given to swapping out runtime memory, as opposed to dropping pages from the system page cache. Swappiness can be set to values between 0 and 100 inclusive. A low value causes the kernel to avoid swapping, a higher value causes the kernel to try to use swap space. The...

Install PHP for WordPress

There is not much to installing PHP except when you need more power. Sometimes WordPress needs more. sudo apt-get install php5 php-pear php5-mysql php5-cli php5-gd php5-curl curl sudo vi /etc/php5/apache2/php.ini max_execution_time = 300 max_input_time = 60 memory_limit = 256M post_max_size = 64M upload_max_filesize = 64M

Setup a LAMP Server on Debian or Ubuntu

This setup is for Virtual Host server – not a dedicated server with a single domain SSH to your server ssh root@IP Update Debian/Ubuntu apt-get update && apt-get upgrade –show-upgraded -y Create User How To Create a User in Linux Setup SSH for Remote Access With GPG Keys – No Password How To Setup SSH for Remote Access IMPORANT –...

Install Apache on Debian and Ubuntu

Install Apache sudo apt-get install apache2 sudo vi /etc/apache2/sites-available/default change AllowOverride None > AllowOverride All in line 11 Enable Apache rewrite and restart Achtung! Don’t forget or things will not work and you’ll waste hours trying to find out why sudo a2enmod rewrite Restart Apache sudo service apache2 restart If no error, its working Optional: The following “example” is used...

Solve Sourcelist Problems with Resolv.conf OpenDNS

Add OpenDNS Nameservers to resolv.conf This has solved problems seemingly unique to some service provides sudo vi /etc/resolv.conf Replace existing IPv4 addresses with openDNS nameservers or just add them above the existing IPs in your resolv.conf 208.67.222.220 208.67.220.222 Same for IPv6 addresses 2620:0:ccc::2 2620:0:ccd::2 also add to end – as last line options rotate Restart Networking sudo service networking restart...

Block All Traffic to Your New Remote Server

I block all traffic to a new server while I setup users and environment using Netfilter AKA iptables. Nothing else gets in or out of the box but me. This requires 2 scripts actually. One to close the machine to all other IPs but mine, and one to “unblock”. You need to unblock while installing other software, re. LAMP, when...

Setup SSH for Accessing Remote Server Without Password

On the Remote Server Logged in As User or as root but in users home sudo mkdir ~/.ssh sudo chmod 700 ~/.ssh && chmod 600 ~/.ssh/* On you local (desktop) assuming you have already created your GPG Keys cat ~/.ssh/id_rsa.pub | ssh root@example.com 'cat – >> ~/.ssh/authorized_keys'

Apache2 Invalid method in request \x16\x03\x01

Apache2 reports an error “Invalid method in request \x16\x03\x01” Check that the IP address is correct in line #8 of /etc/apache2/sites-available/www.example.com <VirtualHost *:80> ServerAdmin webmaster@seleads.com ServerName www.example.com ServerAlias example.com Redirect 301 http://example.com http://www.example.com/ DocumentRoot /var/www/www.example.com/ </VirtualHost> <VirtualHost 199.199.199.199:443> SSLEngine on ServerName example.com SSLCACertificateFile /etc/apache2/ssl/PrimaryRootCA.crt SSLCertificateChainFile /etc/apache2/ssl/Thawte_DV_SSL_CA_Bundle.crt SSLCertificateFile /etc/apache2/ssl/example.crt SSLCertificateKeyFile /etc/apache2/ssl/private/example.key DocumentRoot /var/www/www.example.com/ </VirtualHost>

Top Network Monitor Tools

Install iftop sudo apt-get install iftop sudo iftop -n Install iptraf sudo apt-get install iptraf sudo iptraf Install Netdiag sudo apt-get install netdiag sudo netwatch -e eth0 -nt Install Nload sudo apt-get install nload Nload Install NetHogs sudo yum install nethogs -y sudo nethogs Install Bmon sudo apt-get install bmon bmon Install TCPTrack sudo apt-get install tcptrack

Disable Bluetooth Debian

sudo vi /etc/bluetooth/main.conf change to: InitiallyPowered = false But that is not enough sudo apt-get install rfkill sudo vi /etc/rc.local add line: rfkill block bluetooth That should do it. If not sudo vi /etc/modprobe.d/blacklist.conf add lines: blacklist bluetooth blacklist btusb if not sudo vi /etc/init/bluetooth.override add line: manual

Tunnel MySQL Over SSH

Assuming On a “remote.com” server that we will connect to from our LocalMachine 1) MySQL database named “database” 2) MySQL database is running on remote server “remote.com” 3) MySQL is running and listening on (standard) localhost:port “127.0.0.1:3306” 4) MySQL username “mysql_user_name” 5) MySQL password “mysql_password” 6) SSH must be listening on port 9999 7) SSH AllowUsers “ssh_user_name” 8) SSH password...

Start Reverse Tunnel on boot using autossh for Debian 7

As usual, most of the how-to guides out there are too brief (I’m guilty) or apply to other distros: This works on Linux Debian 7 all-around, and this is a complete how to. It works. You just have to follow a very long thread. No A.D.D. here! We will create a Persistent Reverse SSH Tunnel between 2 machines using autossh....