Skip to main content

Posts

How to setup 2FA On Linux SSH Login

  This is a simple setup guide to enabling Two Factor Authentication (2FA) on Linux SSH login. I this article I wont go deep into setup and issues that I have faced when implementing this. First thing is first Update your system first. I have used Ubuntu 20.04 and it is always up to date. To enable 2FA you need to install google authenticator modules sudo apt install libpam-google-authenticator Configuration for PAM and SSHD Add the the following line to /etc/pam.d/sshd and After adding this line please restart the sshd services.  auth required pam_google_authenticator.so Go to /etc/ssh/sshd_config and check if the following line exist. Default value will be "no" so change it to "yes" to activate.  ChallengeResponseAuthentication yes Configuration for Authenticator In the terminal run google authenticator command It will ask few things to acknowledge by user. Details you can see from the below video. Once this part is done you are ready to use the 2FA in ubuntu. T
Recent posts

How Apple AirTag got hacked.

 

OpenFaaS

Dockerfile and Docker-compose

How to use Dockerfile? This file contains user commands which will be needed to build an image. This is the simplest way that I can explain this. For more information please follow the Dockerfile reference guide The following image shows a sample Dockerfile that I created to build an image with php. I will explain line by line. FROM php:7.4.4-apache - This is where you define what image you will be using to build a custom image COPY site1/ /var/www/html - This is will copy the local path content to remote path (to container) EXPOSE 80 - This is where you define which port should be exposed After creating a Dockerfile now you can build the image.  docker build -t somename #this command is to build an image with the given tag name After creating the image you can run docker images to view if the created image exists. If you want to check if the image is created or not just run this command. docker images, this will show all the images created. As you have seen the image name shows phptu

Docker? what is it?

What is docker? Docker is a set of platform as a service products that uses OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels Difference between docker and virtual Machines How to setup and run your first docker image? First install the docker for your preferred operating system. I have done my setup on ubuntu and that's my preference. Here is official docker website link for supported platforms and how to proceed installation. https://docs.docker.com/engine/install/ In docker you can run any microservices that you like and you can build your own images to run in the docker. Docker hub is a such a place which have thousands of images of microservices that can be run in seconds. By running docker you can run containers for each service you need to run.  For example, if you want to run my

NMAP - What is NMAP and what is it used for?

What is NMAP & use of it? Basically NMAP is a free security scanner and a network mapper mainly used by system administrators, hackers , pentesters and etc.  These are few use cases of NMAP and there are tons of ways to use NMAP. Finding hosts in the network ports used by hosts and its status Finding vulnerabilities Information on versions and OS used Basic NMAP Scan nmap -sP 192.168.1.0/24 Ping multiple host to check if the hosts are alive or not Screen capture of scan TCP scan (full open scan) nmap -sT 192.168.1.9 This is a TCP connect scan. TCP connections are done with a 3 way handshake SYN SYN-ACK ACK This is otherwise called as full open scan Screen capture of scan Wireshark packet capture Stealth Mode Scan (Half open scan) namp -sS 192.168.1.9 This is known as SYN scan / Half open scan / Stealth scan SYN SYN-ACK RST Screen capture of

UNDERSTANDING OVER-THE-AIR (OTA) COMPILE AND FLASH

for full post please visit  https://blog.particle.io/2019/12/12/particle-ota-101/