LHMP- Linux Haiwatha Mysql PHP simplistic new breed!!

hiawathaStep 1 – Setup repository for pre-compiled Hiawatha Debian binaries

The first thing you’ll need to do is to setup the repository for Hiawatha Webserver. You may also compile it on your own if you wish, but for this tutorial we’ll be using the pre-compiled binaries.

First, get and install the repository’s public key:

apt-key adv --recv-keys --keyserver keys.gnupg.net 79AF54A9

Open up and edit sources.list with:

nano /etc/apt/sources.list

Add the following to sources.list:

deb http://mirror.tuxhelp.org/debian/ squeeze main

Save the changes that you have made, then exit. Continue reading “LHMP- Linux Haiwatha Mysql PHP simplistic new breed!!” »


Postfix using Gmail as a Mail Relay with Debian 7


Before starting this tutorial, you should have:

  • Debian 7 installed
  • Your fully qualified domain name (FQDN)
  • All updates installed :
apt-get update

A valid username and password for the SMTP mail provider, such as Mandrill, or SendGrid
Make sure the libsasl2-modules package is installed and up to date:

apt-get install libsasl2-modules

Continue reading “Postfix using Gmail as a Mail Relay with Debian 7” »


Remove apache, phpmyadmin etc from ubuntu 16.04

You can remove the packages in Ubuntu by executing the commands:

dpkg --purge phpmyadmin
dpkg --purge mysql-server
dpkg --purge apache2.2-common


You have option also to remove the following packages:

sudo apt-get remove apache2*
sudo apt-get remove phpmyadmin 
sudo apt-get remove mysql-server
sudo apt-get remove php5


sudo apt-get --purge apache2*
sudo apt-get --purge phpmyadmin 
sudo apt-get --purge mysql-server
sudo apt-get --purge php5

Create a Sudo User on Debian or Ubuntu

Log in to your server as the root user.

ssh root@server_ip_address

Use the adduser command to add a new user to your system. Be sure to replace username with the user that you want to create.

adduser username

Set and confirm the new user’s password at the prompt. A strong password is highly recommended! Continue reading “Create a Sudo User on Debian or Ubuntu” »


Installing SqlMap in Ubuntu / any Linux distro for SQL Injection

SQLMAP is a automated SQL injection tool which does most of the work for you. If you don’t know what SQL injection is head over here: https://en.wikipedia.org/wiki/SQL_injection

Using SQLMAP, you can “hack” many databases in very short time. In the next post, i will show you how to dump database tables and credentials from a vulnerable database and explore.

Even if the passwords are stored using hashing functions ( https://en.wikipedia.org/wiki/Hash_function ), you can crack these hashes using online tools.

Here is the complete video guide for installation: Continue reading “Installing SqlMap in Ubuntu / any Linux distro for SQL Injection” »


Increase MySQL connections max_connections

If you need to increase MySQL Connections without MySQL restart do like below

mysql> show variables like 'max_connections';
| Variable_name | Value |
| max_connections | 100 |
1 row in set (0.00 sec)

mysql> SET GLOBAL max_connections = 150;
Query OK, 0 rows affected (0.00 sec)

mysql> show variables like 'max_connections';
| Variable_name | Value |
| max_connections | 150 |
1 row in set (0.00 sec)
These settings will change at MySQL Restart.

For permanent changes add below line in my.cnf and restart MySQL

max_connections = 150

Fixing error: ‘Access denied for user ‘debian-sys-maint’@’localhost’ (using password: YES)’

For all you Ubuntu/MySQL developers out there, have you ever seen the following?

neo@thematrix:~$ sudo /etc/init.d/mysql restart
* Stopping MySQL database server mysqld [fail]
* Starting MySQL database server mysqld [ OK ]
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)'

So, what is this “debian-sys-maint” user?  Well, this MySQL user is created for the Ubuntu to be able to start/stop the database and to carry out other maintenance operations.

Sounds well enough, but then why do I keep running into the “access denied” problem for this user?  Well, the issue is that with each update to MySQL, the user’s password in the database is overwritten.  Ubuntu seems to go to the file /etc/mysql/debian.cnf in order to find this user’s password, but obviously the password is out of sync after the update has been applied.

As a result of this behaviour, I’ll run into the “access denied” problem every so often.  Thankfully, the solution to this issue is fairly simple. Continue reading “Fixing error: ‘Access denied for user ‘debian-sys-maint’@’localhost’ (using password: YES)’” »


UDP Load Balancing using PEN

First setup PEN load balancer using this document.

After that, keep digging below 🙂

And that’s it, so now if we run pen we see it now has UDP support.

root@penudp:~/pen-0.18.0# pen
pen [-C addr:port] [-X] [-b sec] [-S N] [-c N] [-e host[:port]]
[-t sec] [-x N] [-w dir] [-HPWadfhrs]
[-o option]
[-E certfile] [-K keyfile]
[-G cacertfile] [-A cacertdir]
[-Z] [-R] [-L protocol]
[host:]port h1[:p1[:maxc1[:hard1[:weight1[:prio1]]]]] [h2[:p2[:maxc2[:hard2[:weight2[:prio2]]]]]] ...
-B host:port abuse server for naughty clients
-C port control port
-T sec tracking time in seconds (0 = forever) [0]
-H add X-Forwarded-For header in http requests
-U use udp protocol support

Now to test this I have just brought up a couple of DNS servers running bind. Continue reading “UDP Load Balancing using PEN” »