Posts

Load balancing with Pound

Pound is a reverse-proxy load balancing server. It accepts requests from HTTP/HTTPS clients and distributes them to one or more Web servers. The HTTPS requests are decrypted and passed to the back-ends as plain HTTP. If more than one back-end server is defined, Pound chooses one of them randomly, based on defined priorities. By default, Pound keeps track of associations between clients and back-end servers (sessions). Pound can be installed in CentOS with the following command: # yum install epel-release -y # yum install Pound -y Pound can be then configured by editing the file /etc/pound.cfg In case you are using ubuntu, you can install with the following command: # apt-get install pound Then edit the configuration file /etc/pound/pound.cfg You can find an example use of Load Balancing with Pound here. The example uses two NGINX server as backend and uses CentOS with Pound for the reverse-proxy load balancing. The very basic configuration used is as: Daemon 0...

How to install VirtualBox6 in CentOS 8

Image
VirtualBox is a free and open-source hosted hypervisor developed by Oracle Corporation. It runs on Linux, Windows, Mac, and Solaris hosts supporting a large number of guest operating systems. You will find several blog posts about the installation of VirtualBox in the older version of CentOS. Since, CentOS 8 came around two months ago in September 2019, in this post, I will be showing the steps to install VirtualBox 6 in CentOS 8. First of all let’s install the header and development tools: $ sudo yum install -y kernel-devel kernel-headers gcc make perl Now download and import oracle’s public key, this will be used for gpgcheck which verifies the authenticity of the package: $ sudo wget https://www.virtualbox.org/download/oracle_vbox.asc $ sudo rpm --import oracle_vbox.asc VirtualBox is not available in the main repo of CentOS, therefore we need to add the repo that provides VirtualBox. To download virtual box repo run the following command: $ sudo wget http://d...

Schedule your tasks with 'at' utility

Image
Photo by JESHOOTS.COM on Unsplash In this post, I am going to share you about a utility in Linux for scheduling your scripts. I will be showing how you can use a very simple and easy utility called ‘at’. First of all, if its not already install you can install it by running: # yum install at -y Now that at is installed. You can start the atd daemon: # yum start atd We are all set we can now schedule tasks. For our case we will use an example script ‘example.sh’ which will broadcast a message to the wall: echo “Script is running” | wall We will schedule the script to run now: # at -f example.sh now We can run at a specific time as: # at -f example.sh 10:30 We can view the scheduled tasks by running atq command: # atq To remove a task from the at queue, you can run ‘at -d task_number’. For example to remove task with id 4 we would run : # at -d 4 By default the queue name of tasks added with ‘at’ command is a. You can set a new queue n...

Using RaisedButton in Flutter apps

Image
RaisedButton is a Material design widget. In this post, I am going to show almost all the use cases you might need to know about RaisedButton. A simple usage of RaisedButton would be: RaisedButton( child: Text("Enabled Button"), onPressed: (){}, ), For a disabled button: RaisedButton( child: Text("Disabled Button"), onPressed: null, ), Now to add colors the raised button: RaisedButton( color: Colors. blue , child: Text("Button with colors", style: TextStyle(color: Colors. white ),), onPressed: (){}, ), Button with round corners: RaisedButton( child: Text("Round corner button"), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(30) ), onPressed: (){}, ), Button with custom height and width: ButtonTheme( height: 60, minWidth: 200, child: RaisedButton( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(30) ), child: Text("Button ...

Learn to use ss — utility to investigate sockets

Image
In this post, I will be discussing about a utility you will often use. The utility is ‘ss’. According to the man page of ss: ss is used to dump socket statistics. It allows showing information similar to netstat. It can display more TCP and state informations than other tools. Here, we will go through some of the basic usages of ‘ss’ command, which are as follows: $ ss Bare ‘ss’ command lists the TCP established connections. It shows ton of information. Now let’s list all listening sockets using -l option $ ss -l We have now filtered the listing connections only. We can filter TCP and UDP protocols using -t and -u options respectively. For example, to list all the listening sockets using TCP we use: $ ss -tl In the above command you see the service names like domain, ipp and http, if you want to see the port numbers in use, you can use -n option. The example below will show a list of all listening TCP connections with numeric value for the services: $ ss -tln For ...

Things one should know about Ransomware

Image
Photo by Michael Geiger on  Unsplash Ransomware is a type of malicious software designed to deny access to a computer system or data until a ransom is paid. They are usually spread through phishing emails, infected websites and malvertising (malicious advertising). One must not forget that though they ransom notice says file will be recovered after the ransom is paid, but it is not guaranteed. The first ransomware appeared  Types of Ransomware: a. Scareware Scareware are the simplest type of ransomware. They are the delusive. They show pop up message telling that malware was detected and asks for ransomware to delete it. If you don’t pay, it keeps on bombarding the message. However these ransomware do no damage to your data. The worst it can go is stop you from running any other program because of the continuous pop ups.  b.Screen Lockers Screen Lockers are the next type of ransomware which displays a screening blocking you to use the system. The lock s...

How to use Arachni for web vulnerability scanner

Image
Disclaimer: This is for educational purpose only. Use it responsibly. There are various tools available for web vulnerability scanning. Here in this post, I am going to show how to use Arachni for web vulnerability scanning. This tool is available for Linux, Mac and Windows as a command line interface and web interface. Here, I will guide you the installation in Linux and Mac. And show command line interface for usage. Download in Linux $ wget https://github.com/Arachni/arachni/releases/download/v1.5.1/arachni-1.5.1-0.5.12-linux-x86_64.tar.gz Download in Mac $ wget https://github.com/Arachni/arachni/releases/download/v1.5.1/arachni-1.5.1-0.5.12-darwin-x86_64.tar.gz You can download by clicking the above links through your browser too. You can use a gui based extractor to extract the files. I will show you the command to use for extraction $ tar xvf arachni-1.5.1–0.5.12-linux-x86_64.tar.gz Now you have extracted the archive file. You can add the extracted directory ...