Posts

Showing posts from July, 2022

Install Docker Desktop on Ubuntu 22.04 LTS

Install Docker Desktop on Ubuntu Prerequisites For non-Gnome Desktop environments, gnome terminal must be installed:      $ sudo apt install gnome-terminal Set up the repository 1. Update the apt package index and install packages to allow apt to use a repository over HTTPS: $ sudo apt-get update $ sudo apt-get install ca-certificates curl gnupg lsb-release 2. Add Docker’s official GPG key: $ sudo mkdir -p /etc/apt/keyrings $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg 3. Use the following command to set up the repository: $ echo \    "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null...

Solution for Screen Sharing not working on Ubuntu 22.04

Recently, I upgraded my system OS from ubuntu 20.04 LTS to 22.04 LTS which I have been waiting for a long-time. It seems all goes well until I faced issues while sharing my screen over MEET or ZOOM meetings. I searched for solutions and found most of the solutions on Stackoverflow suggesting to disable the Wayland display feature and working with X11 which was used in earlier versions of Ubuntu OS. But disabling the Wayland UI scheme is not the correct solution,  because will slow down the system because the Wayland display feature is very fast in performance as compared to Xorg X11. Moreover, the Wayland display feature is more secure than Xorg X11 while providing access to the system. Actually, it is not a problem with Ubuntu OS itself. It is problem with the browser hasn't developed a feature compatible with Wayland security protocols. If anyone is facing problems with screen sharing because of OS upgraded to ubuntu 22.04, Here is the solution (without disabling the Wayla...

Laravel Middleware - Block IPs using Middleware class

When talking about securing the Laravel application, we might also want to restrict IP address to access our application, especially when we have Laravel setup as a Backend server providing data through APIs or web services. As of today, you might find no. of Laravel package providing IP address restriction functionality but I found it does not make any sense to install a package when it is achieved through only One class.  Yes! we can just do this with a simple middleware class.  Let me explain to you little details on how we can achieve it using the Middleware class. First, let's create a middleware class using the Laravel artisan command: php artisan make:middleware RestrictIPAddress It will create a new class in your Laravel project under the ` app/Http/Middleware ` directory. It will have a default empty method handle(), where you have to write your logic. Logic is simple, you just have to get the IP address from where the request is coming. here is the method...