Kubernetes, Google Cloud

Debugging in Google Container Engine nodes

Google Kubernetes Engine nodes do not have a package manager to install debug tools. You need to use `toolbox` for that
Mansoor A
Mansoor A
1 min read
Google Cloud, HomePage

How to mount a Google Cloud Bucket in Linux

Easily mount a Google Cloud Storage bucket in a Linux file system using gcsfuse and use it as if a local disk attached
Mansoor A
Mansoor A
2 min read
HomePage

Enable SSH in Raspberry Pi without a monitor

If you are trying to setup your Raspberry Pi ( Running Raspbian ) without a monitor, you might be in for a surprise. Well, the new Raspbian versions do not have SSH enabled by default, and for good reason. Most people who setup a RaspberryPi do not even change the default password and they connect it to the internet. And these RaspberryPis become part of a botnet in no time. Anyways, let's see how to enable SSH. Enable SSH in Raspbian 1. Prepare the SD card with Raspbian 2. Connect
Mansoor A
Mansoor A
1 min read

Using cron in Docker containers ( Kubernetes )

When it comes to Docker containers, even a simple task can be pretty confusing, like the cron jobs. I know it was confusing for me at least. And I had to spent a lot of time scratching my head because my cron job just won't start. Backstory Before we dive into how to setup the cron daemon to work with Docker containers, let's look into a problem I ran into AFTER setting up the cron in Docker, in Kubernetes running on Google Container Engine. This will be particulary helpful to those who managed
Mansoor A
Mansoor A
3 min read

Could not push Docker images to Google Container Registry

Today I updated the Docker daemon on my Mac ( Running macOS Sierra ) and after that, I just could not push any images to Google Container Registry. It fails with the following message ➜ gcloud docker -- push asia.gcr.io/my-project/my-image ERROR: Docker CLI operation failed: Error response from daemon: login attempt to https://appengine.gcr.io/v2/ failed with status: 404 Not Found ERROR: (gcloud.docker) Docker login failed. Luckily, the fix was simple enough. Click on the Docker icon >> Pr
Mansoor A
Mansoor A
1 min read
HomePage

Installing WordPress in Docker using Nginx and Php-Fpm 7

It is evident that you don't need an introduction to Docker, WordPress or Nginx. So there is no point whatsoever in blabbering about each of these technologies, let's just jump right into the matter. In this article, we will be looking into how you can setup a WordPress site in a Docker container that will be using Nginx along with php7-fpm. What's included in this Dockerfile? The Docker image you create using the following Dockerfile will have the following * Ubuntu 16.04 * Nginx (latest a
Mansoor A
Mansoor A
1 min read

Logging in Golang using logrus

If you just started out with Golang, you'd find it a bit difficult to handle logging with the default pacakge log Don't get me wrong, it's powerful and all, but for a beginner, you have to do a lot of stuff manually. For example, it doesn't have log levels like Info, Warning, Debug, Error by default. You have to add them manually. If you come from a language like Python (like me), you would find it a bit different. Anyway, logrus to the rescue. Logrus [https://github.com/sirupsen/logrus] is a
Mansoor A
Mansoor A
2 min read

Fixing the weird iptables error

I am gonna make it short and simple. This issue is something I have seen on so many Debian 7 servers. The Problem It goes like this. You're trying to list your iptables rules and you're seeing weird stuff. [email protected]~# iptables -L WARNING: Could not open 'kernel/net/netfilter/x_tables.ko': No such file or directory FATAL: Could not open 'kernel/net/ipv4/netfilter/ip_tables.ko': No such file or directory iptables v1.4.2: can't initialize iptables table filter': iptables who? (do you need to in
Mansoor A
Mansoor A
1 min read

Linux Reboot System call and Linus' Birthday

Today (28-Dec) is Linus Torvald, Linux creator's birthday and I wanted to share with you an easter egg hidden in the Linux reboot() system call. From man page of reboot SYNOPSIS: -------- #include <unistd.h> #include <linux/reboot.h> int reboot(int magic, int magic2, int cmd, void *arg); DESCRIPTION: ------------ The reboot() call reboots the system, or enables/disables the reboot keystroke (abbreviated CAD, since the default is Ctrl-Alt-Delete; it can be changed using loadkeys(1)). This syst
Mansoor A
Mansoor A
1 min read
HomePage, Ops

Pritunl - Easiest way to setup OpenVPN

Setting up OpenVPN on your own server can be real pain in the a**. I know a lot of you would agree with me there. Today, I'll show you guys how to setup OpenVPN and manage users without any hiccups. I don't think this can get any easier. Enter Pritunl. You install a few packages and you're done. You have a fully functional VPN server with a web interface where you can manage your users, servers, organizations etc. What is Pritunl? Pritunl is a distributed enterprise vpn server built using the O
Mansoor A
Mansoor A
3 min read

[Kali Linux] Fixing Wpscan due to broken dependencies

Let's keep it short and simple. You have a problem with Wpscan on your Kali Linux machine and you need to fix this thing and get to work. So, yeah. This is how the problem looks like. When you try to run wpscan, it says "cannot load such file -- nokogiri/nokogiri". It basically means that a ruby gem that is required by wpscan is not installed. This probably happened after an update. [email protected]:~# wpscan --help [ERROR] cannot load such file -- nokogiri/nokogiri Anyway, the fix is quite simple.
Mansoor A
Mansoor A
1 min read
HomePage, Ops

[SSHUTTLE] SSH tunneling made simple

Why SSH Tunnel? Consider the situation you are in a network you don't trust, like a coffee house. You never know who is snooping around the network for any kind of information they can collect. Or you are in a corporate network where the service you need is disabled in the network level, like spotify, or even steam. To make it worse, you do not have access to a VPN either. What do you do? Well, if you have an SSH account in a remote server, that could serve you well in this situation What is an
Mansoor A
Mansoor A
2 min read