Skip to content

Networking Fu – Mastering the Art of Connection

In the ancient scrolls of Linux, there exists a powerful discipline known as Networking Fu. If you wish to traverse the web like a ghost, troubleshoot like a hacker, and command the internet like a sorcerer, you must first learn the fundamental networking commands.

Checking Your Own Identity

Before hacking into the matrix, let’s find out who we are:

What's My IP?

bash
ip a

or the classic:

bash
ifconfig  # (Install it first: sudo apt install net-tools)

Output:

bash
inet 192.168.1.42

This is your local IP address.

Want to know your public IP?

bash
curl ifconfig.me

Now you know how hackers find their own footprints. 🕵️

Checking Your Connection to the Outside World

Can You Reach the Internet?

bash
ping google.com

This command sends small packets to check if Google is responding. If you see replies, your internet is working.

Need a faster test?

bash
curl -Is https://google.com | head -1

It should return:

bash
HTTP/2 301

which means Google is alive! 🎉

Finding Out Where the Network Breaks

Tracing the Path to a Website

Ever wondered how your request reaches Google? Use:

bash
traceroute google.com

or

bash
mtr google.com  # (More advanced. Install it with: sudo apt install mtr)

You’ll see a list of all network hops between you and Google. If it stops somewhere, that’s where the problem is!

Finding Open Ports – The Gateways to a System

Who’s Listening?

bash
netstat -tulnp  # Shows all open ports

or

bash
ss -tulnp  # (Better alternative)

Output:

bash
Proto  Local Address     Foreign Address  State   PID/Program
tcp    0.0.0.0:22        0.0.0.0:*        LISTEN  1234/sshd
tcp    0.0.0.0:80        0.0.0.0:*        LISTEN  5678/nginx

This means your server is running SSH (port 22) and a web server (port 80). If a port is open, someone can connect to it. 🕵️

Want to scan another machine’s open ports?

bash
nmap -sS target-ip

(Install with: sudo apt install nmap)

Controlling the Network – Becoming the Master

Disconnect a Rogue User (Wi-Fi Prank)

Want to disconnect a device from your network? First, find its MAC address:

bash
arp -a

Then, send de-authentication packets (evil laugh 😈):

bash
aireplay-ng -0 1 -a ROUTER_MAC -c TARGET_MAC wlan0

(Use responsibly! You don’t want the Wi-Fi police after you. 🚔)

BONUS: Fake Your IP

Want to change your MAC address and go incognito mode?

bash
sudo ifconfig wlan0 down
sudo macchanger -r wlan0
sudo ifconfig wlan0 up

(Install with: sudo apt install macchanger)

🏆 Your Training Task

1️⃣ Find your local IP address.

2️⃣ Find your public IP.

3️⃣ Use traceroute to see how your request travels.

4️⃣ List all open ports on your system.

5️⃣ Scan your own machine with nmap 127.0.0.1.

6️⃣ Bonus: Change your MAC address and test if your network still works.

Next lesson: Shell Scripting – Automate Everything Like a Cyber Samurai! 🎭

Built by noobs, for noobs, with love 💻❤️