How to create your perfect server with ubuntu xenial

apt-get update && apt-get -y upgrade
apt-get install -y unzip
cd /tmp
wget --no-check-certificate -O installer.tgz ""
tar zxvf installer.tgz
cd *ispconfig*

add index.php in default file of nginx at location : /etc/nginx/sites-available/default
enable phpmyadmin and squirrelmail by uncommenting in ispconfig.vhost location : /etc/nginx/sites-available/ispconfig.vhost

For Mysql backup
mysqldump -u root -p DB > DB.sql
For Mysql Restore
mysql -uUSER -pPASSWORD DB < DB.sql

To view service logs
sudo journalctl -f

To list journal entries for the nginx service:
sudo journalctl --unit nginx

To list journal entries for the nginx service starting from a given time:
sudo journalctl --unit nginx --since  "2016-10-30 18:17:16"

Base64 talk encrypted

Hi all, why most of computer engineers choose Linux as their preferred os. Friends we get lot of advantages here like we can talk encrypted

For encryption
$ echo -n hi | base64
output: aGk=
For decryption
echo -n aGk= | base64 -d
output: hi

Not only this you can also encrypt image with the following command
$ echo -n $(cat image.jpg) | base64 > inputfile
To decrypt use
$ echo -n $(cat inputfile) | base64 -d




Download youtube linux terminal

Want to download youtube video in linux. Enter these three commands to Download youtube linux terminal . you can also perform these commands if you are are getting error in downloading with youtube videos with youtube-dl installed with apt-get install youtube-dl but remove it first by command apt-get remove –purge youtube-dl. You can download pachage here

  • curl -L -o /usr/local/bin/youtube-dl
  • chmod a+rx /usr/local/bin/youtube-dl
  • ln -s /usr/local/bin/youtube-dl /usr/bin/

All news at one place,

All news at one place, Why did I do this. I known you guys also don’t have time to scroll through all the news papers like me, but we love to read them. We have got no other option except to skip or scroll fast. And when people talk about it we just do not know what happened at the end of the story. But Being a engineer I can not stay deprived of it. So its my call to make it easier to read and all at one place.

Currently I combined three news paper those are my favorite one. But you can tell me if you want your favorite news paper or channel.

Also I wanted to go a step furthur, I kept this news engine to send emails with 3 hours frequency. It is built with elastic search (search engine type database), python, postfix ( to send mail with queue), some php at front end. It can store billions of news. you can search and go to so deep history starting from yesterday.. 🙂 hehe as it is so new. I hope u guys will like this. Here is the link Enjoy.

Credits:Zainab Bhatia Nirav Patel, Abhijeet Deshani
These guys really helped me a lot in this. Thank you so much from me & my social media friends

Hi, the below command do really have magical effect to bring ur local port on internet,

Support you are on nat (nat like you have, and you dont have public ip, but you want to show your friend your webserver, or you want him to ssh your system remotely so you need to forward your port with router that may or may not have public ip.

But if you have a remote server with public, like i do have this server, you can use that to do this task from remote. And that is very easy you can find many tutorials on internet for reverse ssh tunnel.

here are those very  easy steps you need to perform-

  1. set “GatewayPorts yes” without quotes in sshd_config file of ssh, available at /etc/ssh/sshd_config in ubuntu os
  2. use this command “ssh -g -R 8080:localhost:80 [email protected] -p 22” without quotes and you will see shows what your lcoal web server has got

Enjoy I had to do a lot of research to get this successful in my case and now found that this something like path to heaven for me. it takes all the traffic encrypted with ssh protocol hehehe.

and use ssh -f -N -R 9108:localhost:80 [email protected] -p 2222 if you dont want ssh to open everytime


fail2ban do not send mails after installation so you need to do these changes in jail.conf-

File is available at /etc/fail2ban/jail.conf

  1. change action = %(action_)s to
    action = %(action_mw)s
  2. change destemail = youremail

and dont forget to take backup first


htpasswd /etc/squid/passwd user1
chmod o+r /etc/squid/passwd
dpkg -L squid3 | grep ncsa_auth
vi /etc/squid/squid.conf
Append (or modify) following configration directive:
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off

Also find out your ACL section and append/modify
acl ncsa_users proxy_auth REQUIRED
http_access allow ncsa_users
Save and close the file.