Happy new year – 2024!

Posted: January 1, 2024 in Uncategorized

Happy new Year to all my long time readers! God Bless!

Here is a docker cheatsheet and quick reference. Want to contribute? Leave a comment down below.

Install docker (one liner):

curl -sSL https://get.docker.com/ | sh

Install docker: (Alternative)

curl -sSL get.docker.com -o get-docker.sh
sh get-docker.sh

Make sure you add your current user to group docker and verify if it is added succesfully.

sudo usermod -aG docker anoop
id anoop

Search for docker images:

docker search ubuntu
docker search mysql

Download a docker image:

docker pull ubuntu

[This will pull the ubuntu image from the docker repo]

Download specific version of an image:

docker pull ubuntu:14.04

Note: By default containers will be having ephimeral storage. Which means if its shutdown, all the data in it would be lost.

Start a container and go inside the container:

anoop@h0n3yp0t ~ $ docker run -ti ubuntu:12.10 /bin/bash
root@668a52b2c701:/#

-t => attach a terminal to get console
-I => interactive
668a52b2c701 => unique ID

[Note: When you run a container you would get a container ID. You would need these to interact or mess with the container.]

To exit out of container without stopping it:
Press CTRL+P+Q

To view running containers:

anoop@h0n3yp0t ~ $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
668a52b2c701 ubuntu:12.10 “/bin/bash” 4 minutes ago Up 4 minutes keen_heyrovsky

-Docker generates random name to container if a custom name is not specific.

Here 668a52b2c701 -> Container ID

keen_heyrovsky – > Random container name generated for this docker container.

To attach to a container:

docker attach keen_heyrovsky OR docker attach 668a52b2c701

[Here we can give the container name or the container name]

To view all running and non-running containers:

anoop@h0n3yp0t~ $ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
668a52b2c701 ubuntu:12.10 “/bin/bash” 7 minutes ago Exited (0) 16 seconds ago keen_heyrovsky

Start a stopped container:

docker start 668a52b2c701
668a52b2c701

View running process of a docker container:

docker top 668a52b2c701
or
docker top keen_heyrovsky

Stop a container:

docker stop 668a52b2c701

Get details about container location:

-Docker containers are stored in /var/lib/docker/containers

[Note: login as root to check the folders]

If Ubuntu 12.04 is not present locally and we need to download the image & start it:

docker run -ti ubuntu:12.04 /bin/bash

Start container in detached mode:

docker run -d -ti ubuntu:12.04 /bin/bash

Add custom name for docker container:

docker run -d -ti –name=anoop ubuntu:12.04 /bin/bash

[Do not give flags after /bin/sh. –name=anoop is given before /bin/bash]

Create docker container with persistent storage:

docker -ti -v /data –name=storage ubuntu:12.04 /bin/bash

-This will create /data inside the container.

-Once you are in the container, we can change to /data and create a file.

cd /data
touch test-file

-We can also see this file under folders under /var/lib/docker/volumes/ in local host pc. The folder would be displayed with an underscore “_data”

cd /var/lib/docker/volumes/
find . | grep test-file

-Add custom local directory for persistent storage to docker container:

In local PC, make a folder /docker-disks/

mkdir /docker-disks/ubuntu1

-Then map this location to folder when creating a docker container.

docker run -ti -v /docker-disks/ubuntu1:/data –name=d1 ubuntu:12.04 /bin/bash

Inside the container, run

cd /data
touch custom-file

-Exit out of the container and in your local PC, go to /docker-disks/ubuntu1/ and list the contents and we will see the file created in the container here:

cd /docker-disks/ubunt1/
ls
custom

Create docker image with an open port:

docker run -d -p 3306 -ti mysql /bin/bash

-Lets check if port 3306 is open in docker.

anoop@h0n3yp0t ~ $ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
26225f771013 mysql “docker-entrypoint.s…” 4 seconds ago Up 3 seconds 0.0.0.0:32769->3306/tcp practical_raman

In local PC, we can check the NAT tables:

iptables -L -t nat
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
DOCKER all — anywhere anywhere ADDRTYPE match dst-type LOCAL

Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
DOCKER all — anywhere !127.0.0.0/8 ADDRTYPE match dst-type LOCAL

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all — 172.17.0.0/16 anywhere
MASQUERADE tcp — 172.17.0.2 172.17.0.2 tcp dpt:mysql

Chain DOCKER (2 references)
target prot opt source destination
RETURN all — anywhere anywhere
DNAT tcp — anywhere anywhere tcp dpt:32769 to:172.17.0.2:3306

-Here the local port: 32769 will be forwarded to port: 3306 (mysql) with IP 172.17.0.2 (container IP for mysql IP)

-To port forward host PC port 32769 to docker mysql’s IP: 3306 we do the following:

docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
26225f771013 mysql “docker-entrypoint.s…” 2 hours ago Up 2 hours 0.0.0.0:32769->3306/tcp practical_raman

Host PC IP: 192.168.102.128
container IP:
nmap 192.168.102.128

Starting Nmap 7.01 ( https://nmap.org ) at 2018-03-15 15:27 IST
Nmap scan report for 192.168.102.128
Host is up (0.000086s latency).
Not shown: 994 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
80/tcp open http
139/tcp open netbios-ssn
445/tcp open microsoft-ds
3128/tcp open squid-http

-From the nmap outputs, we can see that mysql is not open

-Here, we first stop the docker application.

docker stop practical_raman

-Then map a local port to mysql port on docker:

docker run -d -p 3306:3306 -ti mysql /bin/bash

Run docker by specifying dns:

docker run –dns 10.192.3.10 -it –name ubuntu-old -p 801:801 ubuntu:12.04 /bin/bash

(The above is useful if you running docker inside a VM where the host’s resolv.conf has 127.0.0.1 set the resolver).

Stop and remove all containers:

docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)

I will be updating this post with more cheats in the future. Do subscribe to my blog to get latest updates. If you have any cheats or tricks, do leave a comment down below. I will update this post with the same and will give you the credits. 🙂

 

References: DuckAcademy

Happy new year – 2018!

Posted: January 1, 2018 in personal
Tags: ,

Happy new year to all my readers.

new year

I sincerely wish you all the very best from the bottom of my heart. God Bless you.

Regards,
ΞXΤЯ3МΞ

Here are my top game picks from the E3 2017 event.

Beyond Good And Evil 2:

The trailer begins in the city of Ganesha, named after the Hindu God. Check the in game screenshot below. Looks amazing!

Game-screenshot

Check out the game trailer from the video below.

The best part of the game is that can literally fly from one planet to another. Holy Sh*t!! Loving the whole Interstellar vibe here. 🙂

Anthem:

-The gameplay is unreal and its a huge open world game.
-You can fly with your exo-suit and even fly underwater.
-The in game flight mechanics look fluid.

Click the video link below to watch the official gameplay video. [Watch in Full HD.]

Here is a screenshot from the game:

anthem-screenshot

Which game are you waiting for and which one was your favorite? Let me know what you think in the comments section down below.

Regards,
ΞXΤЯ3МΞ

Source: Verge
Image Credits: Gamespot

Happy New Year to all my readers

Posted: January 1, 2017 in personal

Happy new year to all my readers!!

Be positive this year and get rid of any negativity in your life. Here are some meaningful quotes that got me thinking and would follow. I am sure it will get you thinking too.

No matter what happens, be positive. There will always good and bad people around you. All you need to do is look carefully.

real-friends

This one is my favorite quotes. (Credits to whoever made this.)

de91505298f12b98a8412f0ad931c208

 

67f400e153f4b9f655c9cd61bcc96ef3-1

Hope you all have a great year ahead! Cheers!! 🙂

Netflix recently launched its service in India which is a very good initiative but here is my 2 cents about why it will not be successful with the current state of the Internet in India.

This article’s primary focus is not about Netflix but simply about the issues and challenges that needs to be fixed such as the ridiculously small #FUP limit and post FUP speeds in broadband connections provided in India. To shed some little light, India is the second largest population in the world and has about 352 million internet users (as on June 30th 2015 as per IAMAI) .

If you live in India, you must have already guessed the major challenge for any video streaming services in India by now. And yes, its going to be due to the very small FUP limits,  slow connection speeds after FUP set by ISPs in India. There are many other factors included too such as the inflated broadband prices, bad contention ratios, and major reliability issues.

Lets first take a look at the plans offered by Netflix in India (along with the price converted in USD):

[ Note: Conversation Rate calculated on 10/1/2016 : 1 USD=  66.89 Indian Rupees ]

Netflix launched in India is expensive and has only about 7% of whats actually provided in the US.

Netflix also provided some light on the data usage while streaming. I have created a tabulated format of the same below:

Minimum Internet Connection Requirement for Netflix:

According to the official documentation published by Netflix, the minimum Internet connection requirements is 0.5Mbps and recommended is >1.5Mbps.

Recommended Internet Connection Requirement for Netflix:

Stream Quality Recommended
SD 3.0 Mbps
HD 5 Mbps
Ultra HD 25 Mbps

 

So, What is FUP?:

Imagine you have a Ferrari and you bought it because you love high speed racing. But, in the race track, there is a rule that says: “Hey! You can race upto 200 Miles/hour for 5 kilometers but after that you can drive it at a maximum speed of about 10 Miles/hour.” In this context, the 5 kilometers value will be considered as the FUP limit.

As ridiculous as it sounds, that’s exactly how ISPs set FUPs(Fair Usage Policy) in India. Whereas, in other nations such as US, UK, North Korea etc most ISPs dont have FUP or atleast have some Terabytes of data as FUP.

For example, a Verizon Fios user was contacted by his ISP as he virtually reached their FUP of a truly unlimited plan after downloading about 77 TeraBytes of data in a single month!!! Hope ISPs in India provide similar FUPs.

Despite being the country with maximum number of users connected to the Internet in the world,  its difficult to believe that  ISPs in India have such a terrible FUP limit (starting from 2GB-8GB in home internet connection and about 150GB in high end optic fiber connections). Obliviously, if you need truly unlimited with no FUP with optic fiber connection, thats going to cost a ton off money in India.

Whats the effect of FUP in Netflix:

Once, you reach the FUP, your viewing experience in Netflix is hampered. Ofcourse there are workarounds such as reducing the quality of the video but that kills the whole experience. You also will need to wait for a longer period of time for the video stream to buffer so that you can actually see it. This not only is a waste of time and hampers the whole experience. Say, if are watching Netflix in UltraHD and you reached your FUP and after that its at  512Kbps or 1 Mbps, you will need to wait a very very long time (anywhere from 5minutes to 15 minutes) for the stream to even start.

An example of FUP in broadband connections:

When you purchase a broadband connection from your ISP of 16Mbps with an FUP of 20GB and post FUP 512Kbps, it means that you can browse online and download at a speed of 16Mbps upto 20GB and after that your ISP will reduce the speed to 512Kbps in this case.

Lets first take a look at  some of the broadband connections in India along with their FUP limits:

  1. BSNL (Indian Government Owned ISP):

4mbps to 24mbps  

[To see detailed description of above broadband plan click this link]

Above, you can see here that a 4Mbps combo connection has a FUP of 8GB and then the speed is reduced to 512Kbps and you pay about Rs. 999/month excluding taxes (thats about $14.93/per month).

So, say if you have the above broadband connection, you can exhaust your FUP in exactly “4 hours 46 minutes and 19 seconds” (considering a theoretical efficiency of 100%).

So with respect to Netflix, if you opt for streaming 4K video, you will exhaust your FUP very soon.

Now, that too expensive for that tiny data cap. Similarly, the next better option which is 4Mbps upto 20GB, post that its 512kbps and you pay Rs. 1275/month ($19.06/month).

Say, if you are on this connection : 4Mbps upto 20GB, post 512Kbps, and you will exhaust your FUP within “10 hours 51 minutes and 2 seconds”(considering a theoretical efficiency of 100%).

BSNL Fiber Optic Plans:

bsnl Fiber plans

[Note: To see complete internet plan show above click this link ]

Above is the fiber optic plans provided by the government owned broadband provider. Its funny to see 100Mbps with an FUP of 200GB and after that its 2Mbps, for Rs. 16999/month excluding taxes (i.e. $ 254.13 per month).

So, If you watch Netflix in UltraHD in for about 2-3 hours a day, you will reach the FUP in about 9-10 days and is trottled to 2Mbps in a fiber optic connection which is not even funny.

BSNL Broadband connections upto 2 Mbps :

upto 2mbps

2. Private Broadband Providers with FUP

Users who have subscribed through private broadband providers such as ACT Broadband, You Broadband, Airtel etc may have better connection speeds and slightly better FUP .

Here is a screenshot of the tariff plans of the which supposedly is one of fastest broadband providers in India (ACT Fibernet Bangalore):

act fibernet plans

The above plans have good speeds upto FUP, but really slow speed after FUP. The ACT Swift plans trrottles your speed to a 256Kbps which cannot even be classified as broadband connection. Now, that does not even meet the minimum broadband requirement for Netflix.

Also, according to multiple reports, many users face massive downtime issues with ACT and with bad technical support. [ if you do a quick Google/Youtube search about ACT broadband downtime and bad technical support you will find many interesting reports. Good Luck! 🙂 ]

3G and 4G Connections:

With 4G being launched this year by major telecom operators such as the launch of Reliance Jio which offers about 10GB of data  for Rs. 700 (excluding taxes) but data top-up would cost more.

The FUP in 3G connections which from 1GB – 6GB and after FUP, speeds are throttled to about 10kbps which is not usable. This clearly is a sign of how ISPs are making huge profits by throttling speeds and selling overpriced plans. With vast majority of users using mobile internet in India, this needs a serious improvement.

Some Broadband plans without FUP:

There are few broadband plans worth mentioning such as the ones provided by Railwire (government owned), TATA, Reliance, MTNL, Hathway etc which do not have a FUP limit. But the problem here is the price/speed ratio is not that great. The connection speed ranges from 1Mbps – 4Mbps  which is average but I am not sure if they do any sort of traffic shaping depending on traffic nor about their reliability as I personally have not used them.

I am not going to go in detail to all the plans available, as there are tons of  broadband plans divided into different regions. Also, if you live in a metro city, the FUP limit is more that non-metro regions so changes the whole equation if you want Netflix.

Netflix + Net Neutrality Rumors:

For those unaware about what net-neutrality and why its important, you can watch a short video by popular youtuber “TotalBiscuit, The Cynical Brit” below:

As many of you all already know, Net Neutrality is a hot topic right now in India with majority of Indians supporting net neutrality. There are several rumors that suggest Netflix may be partnering up with certain ISPs so that data used in Netflix will not affect your transfer cap which goes against net neutrality. And if that happens, the Internet is doomed and we all are in a lot of trouble.

You can read more about net neutrality here and about “Net Neutrality in India” here.

Conculsion:

According to FCC in 2015, the a broadband connection is classified with download speeds of 25 Mbps and upload speeds of 4 Mbps. I believe that its high time TRAI to increase the minimum broadband speed to a standard of atleast 8Mbps-16Mbps download and 1Mbps upload with no FUP. Its time to stop greedy ISPs ripping people off. If FUP must be implemented, a standard must be set to a minimum of atleast 300GB for the inflated price we pay for the internet.

Now with Netflix being launched in India, there will be healthy competition which will in turn bring down prices of Cable TV.

Looking at the other side, India’s internet ranking dropped to 131 out of 189 countries in 2014 from 125 the year before and since Netflix relies on the Internet to deliver content, this can be a problem.

Its unlikely that the vast majority of the people will make the shift to Netflix mainly due to:

  • The bad state of India’s Internet standards (very small FUP, reliability, low connection speed).
  • Only 7% of Netflix content in the US available in India and yet you need to pay more than it costs in the US. [ Full Comparison of Netflix USA vs Netflix India available here.]
  • Niche crowd having high end connection may opt for a VPN service to connect to Netflix USA to get access to all content.
  • Many users would stick with downloading from torrents than use Netflix.

This article took a good amount of time and research to write and I hope you guys enjoyed it. Do let me know what your impressions about Netflix being launched in India.

Do you think the current Internet standards in India needs improvement? What do you think should be the minimum broadband speed in India? Do leave a comment in the comments section below. 🙂

Regards,
ΞXΤЯ3МΞ

Sources:
Verizon Fios FUP Report
FCC 2015 Broadband Definition

References:
UN Broadband Penetration Ranking
ACT Fibernet Plans

When you type an incorrect command in the CISCO IOS terminal/Cisco Packet Tracer you may come across such an issue as show below:

Sample Translating domain server (255.255.255.255) output

To resolve this, use command “no ip domain-lookup” as shown below:

Router>enable

Router#configure terminal

Router(config)#no ip domain-lookup

Router(config)#exit

Finally, if you need to save the changes permanently, you can use the “write” command as shown below:

Router#write

Hope this helps! Feel feel to leave a comment if you have any queries or want to reach out to me. You can also Follow/Subscribe to my blog to get future blog posts! Happy Networking! 🙂

[ Source: Cisco ]

Regards,
ΞXΤЯΞМΞ

google crash

To crash Google chrome, simply open Google Chrome and type the below URL and hit “Enter”:

http://a/%%30%30

This bug was originally reported by “Andris Atteka” in his blog post. He mentions that chrome simply crashes when you add a NULL char in the URL string.

It is also seen that hovering above that link may crash the Google Chrome Browser.

Source: Andris Atteka
Reference: IBN Live

Test it yourself. Feel free to leave a comment below.

Regards,
ΞXΤЯΞМΞ

EA Games has just released a teaser trailer for the all new reboot for Need For Speed series. You can find the video below, check it out & do leave a comment on what you think about it in the comment section below.

Source: EA Games

Happy Gaming! 🙂

Regards
ΞXΤЯ3МΞ

Build my new PC. Here is my baby!! 😀Pc update

I would like you to know that I have been planing to build a PC for a while now and this is my dream build. I have spend countless hours reading, researching, comparing benchmarks about a lot of computer components. I did learn a lot about building computers and it was definitely worth it. Next time you or your friend wants to buy a PC, I would definitely encourage you to build your own PC putting together the parts you want rather than purchasing a branded PC or a store build PC.

Component List:

Processor INTEL Core i7-4790K 4th Generation 4.0GHz
Motherboard ASUS MAXIMUS VII RANGER Motherboard
RAM 8GB(2x4GB) GSKILL RIPJAWS DDR3 1600Mhz CL9
CPU cooler Corsair H90 Liquid Cooler
GPU Stock Intel HD 4600
Power Supply Seasonic X-650 Fully Modular Gold PSU
Primary Storage Samsung 120GB 840 EVO SSD
Secondary Storage 1 TB WD Caviar Black 7200rpm
Case NZXT S340 Cabinet
Mouse Dragon War G9 Thor Gaming Mouse

Boot Time: 3 seconds!!!

Processor: Intel Devil’s Canyon 4rth Generation i7-4790K I needed the best CPU in terms of performance. I choose the i7-4790K as it is an unlocked CPU and supports Hardware assisted Virtualization, (VT-x, VT -d and EPT). This is very useful for me as I do a lot of testing and virtualization. This CPU has 4 cores with 8 threads. The Stock speed is 4.0Ghz and 4.6Ghz Turbo which is very fast. Another reason I did go for this processor is I will also be doing some image, video editing (for my under construction Youtube Channel).

Motherboard: ASUS MAXIMUS VII RANGER Got this motherboard as it has solid performance, VFM and has potential for decent overclocks (upto 4.8Ghz with liquid cooling). I haven’t played around much with overclocking yet, but so far have Oc’ed it to 4.6Ghz using the AI suite with no problems at all. But I must say, the Asus AI Suite is buggy and crashed multiple times.

CPU cooler: Corsair H90 Liquid Cooler The i7-4790K will get hot and wanted to try a liquid cooler for my build and I am happy with it so far. Its is 140mm liquid cooler. I wanted to go for the H100, but later changed my mind to H90 with an additional 140mm fan as some users had temps with the H100 installed in the front of the NZXT S340. Installing the CPU pump was a pain, but luckily Linus had uploaded an H90 Installation video in Youtube which made it a lot easier. (To see the H90 installation guide, you can find it here.) Fan speed: 1500 +/- 10% RPM Fan airflow: 94 CFM Fan static pressure: 1.64mm-H2O The H90 fans are silent under normal operation. I did a stress test using prime95 and AIDA64 and found the fans can be moderately loud when the CPU is under load, but its not that loud. The H90 stock fans are quiet under normal load conditions.

RAM: 8GB(2x4GB) GSKILL RIPJAWS DDR3 1600Mhz CL9 For my build,  I got 8GB (2x4GB )Gskill Dual channel which runs at 1600Mhz with latency 9. Another reason I got this RAM is because it goes with my Black and Red theme. It also comes with a 10 year warranty.

Power SupplySeasonic X-650 Fully Modular Gold PSU Bought the Seasonic X series 650Watt which is fully modular, Gold Certified. I did research a lot on power supplies, and found the X-650 to be the most efficient PSU in its class. The only problem I had with the PSU is that SATA power cable that came with it are angled so if u need to connect an SSD on the SSD tray in cases like NZXT s340, you need to get a straight cable or bend the existing cable but that may damage the SSD SATA power port due to pressure.

Primary StorageSamsung 120GB 840 EVO SSD This is one single component that makes your computer seem extremely fast. For example, if you have an old desktop/laptop lying which needed an upgrade, try swapping out the HDD with an SSD and your computer would seem very fast. This is first time I am actually using an SSD in my build. After installation of Windows 8.1, the boot is just 2-3 seconds! My old laptop used to take so long. [Some Additional Info: The SSD came with the latest firmware EXT0BB6Q which fixed the bugs with slow writes. If you have the same SSD, make sure you have the latest firmware installed. You can find instructions in the Samsung website or even Youtube.]

Secondary Storage1TB WD Caviar Black 7200rpm For storage, I got the 1TB WD Caviar Black which runs at 7200rpm which is fast enough. I got this as it has good performance and got it for a good deal.

Case: NZXT S340 I got the NZXT s340 case simply do the fact it is simple, well engineered, excellent cable mangement and the beautiful transparent side panel. The only con of this case is that the side panel can scratch easily. [Note about S340: This case does not have 5.25 optical bays. I dint need them as I will be using an external DVD writer.]

Mouse: Dragon War G9 Thor Gaming Mouse I bought this mouse a few months before getting this PC setup. It is good for gaming and very responsive in my opinion. It has 8 programmable buttons with 4 on the fly changeable resolutions 800/1600/2400/3200dpi. The mouse has the ergonomic feel to it and also comes with a gaming mouse pad. It also has a gold plated USB connector which the states is for reliability, but I am not sure if there is any actual difference between a regular and a gold type usb connector. Windows 8.1 was able to detect the mouse with no issues and you can change the DPI without installing any additional software. But if you need to change the breathing light or assign macros, you will need to install the additional software that comes with the mouse.

Will be posting pictures and benchmarks soon.

You can post your current/future rig specs below. Feel feel to leave a comment below. Follow/Subscribe my blog to get future updates.

Regards
ΞXΤЯ3МΞ