Back to Learning Tools

Networking & Remote Access

Termux से SSH, FTP, VNC, और रिमोट एक्सेस सीखें

1. Network Types

Different types of Networks

🌐 LAN (Local Area Network)

Home या Office में limited area के लिए

$ Example: Home WiFi (192.168.1.x)

🌍 WAN (Wide Area Network)

Large geographical area में connect करता है

$ Example: Internet connection

🏙️ MAN (Metropolitan Area Network)

City-wide network

$ Example: City-wide cable network

📱 PAN (Personal Area Network)

Personal devices के बीच

$ Example: Bluetooth, NFC

2. Network Components

Networking Hardware और Devices

🔄 Router

Different networks के बीच data forward करता है

🔌 Switch

LAN में devices को connect करता है

🔗 Hub

Multiple devices को single connection पर connect करता है

🌉 Bridge

दो network segments को connect करता है

🚪 Gateway

Network को external world से connect करता है

🛡️ Firewall

Network traffic को filter और block करता है

3. IP Addresses

IP Addressing System

🔢 IPv4 (Internet Protocol version 4)

32-bit address, example: 192.168.1.1

$ Range: 0.0.0.0 to 255.255.255.255

🔢 IPv6 (Internet Protocol version 6)

128-bit address, example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334

$ More addresses available than IPv4

🔒 Private IP Addresses

192.168.0.0 to 192.168.255.255
10.0.0.0 to 10.255.255.255
172.16.0.0 to 172.31.255.255

🌐 Public IP Addresses

Internet पर directly accessible addresses

$ Example: 8.8.8.8 (Google DNS)

4. Network Protocols

Communication Protocols

🌊 TCP/IP

Transmission Control Protocol/Internet Protocol

$ Reliable, connection-oriented

⚡ UDP

User Datagram Protocol

$ Fast, connectionless (gaming, streaming)

🌐 HTTP/HTTPS

Web browsing protocol

$ Port 80 (HTTP), 443 (HTTPS)

📁 FTP

File Transfer Protocol

$ Port 20, 21

🔐 SSH

Secure Shell for remote access

$ Port 22, encrypted connection

🖥️ RDP

Remote Desktop Protocol

$ Port 3389 (Windows)

5. OSI Model (7 Layers)

Open Systems Interconnection Model

7

Application Layer

User applications (HTTP, FTP, SMTP, SSH)

6

Presentation Layer

Data translation, encryption (SSL/TLS)

5

Session Layer

Session management (NetBIOS, RPC)

4

Transport Layer

End-to-end communication (TCP, UDP)

3

Network Layer

Routing and logical addressing (IP, ICMP)

2

Data Link Layer

Physical addressing (MAC, Ethernet, Switching)

1

Physical Layer

Physical transmission (Cables, WiFi, Signals)

6. Network Security

Protecting Your Network

🛡️ Firewall

Network traffic को monitor और block करता है

$ ufw enable (Ubuntu/Linux firewall)

🔒 VPN (Virtual Private Network)

Encrypted, private connection

$ OpenVPN, WireGuard, NordVPN, etc.

🔐 Encryption

Data को secure code में convert करना

$ AES, RSA, SSL/TLS protocols

👁️ IDS (Intrusion Detection System)

Unauthorized access detect करता है

$ Snort, Suricata

7. Network Attacks (Educational Purpose Only)

Common Attack Types - सिर्फ सीखने के लिए!

⚠️ IMPORTANT: ये attacks सिर्फ अपने system या authorized testing पर ही करें। बिना permission किसी और system पर test करना illegal है!

💥 DDoS (Distributed Denial of Service)

Multiple systems से attack करके service को down करना

$ Mitigation: Firewall, rate limiting, CDN

🎣 Phishing

Fake websites/emails से sensitive info steal करना

$ Mitigation: Email filters, user awareness, 2FA

👥 MITM (Man-in-the-Middle)

दो parties के बीच में घुसकर communication intercept करना

$ Mitigation: End-to-end encryption, HTTPS

💉 SQL Injection

Database में malicious SQL commands inject करना

$ Mitigation: Input validation, parameterized queries

🔗 XSS (Cross-Site Scripting)

Websites में malicious JavaScript inject करना

$ Mitigation: Input sanitization, CSP headers

8. Network Tools

Essential Networking Tools in Termux

🗺️ Nmap (Network Mapper)

Network discovery और security auditing

$ pkg install nmap
nmap -sn 192.168.1.0/24 (network discovery)
nmap -sV -p 1-1000 target (version detection)

👁️ Wireshark

Network protocol analyzer - packets capture और analyze करता है

$ pkg install wireshark

🔌 Netcat (nc)

Network utility - read/write network connections

$ pkg install netcat
nc -l 8080 (listen on port 8080)
echo "hello" | nc localhost 8080

9. Remote Access Protocols

Remote System Access Methods

🖥️ RDP (Remote Desktop Protocol)

Windows के लिए GUI remote access

$ Port 3389 - Full desktop control

🔐 SSH (Secure Shell)

Linux/Unix systems के लिए command-line access

$ Port 22 - Encrypted, secure

📺 VNC (Virtual Network Computing)

Cross-platform GUI remote access

$ Port 5900+ - Any OS compatible

📞 Telnet

Unencrypted text-based remote access (NOT secure!)

$ Port 23 - Avoid using, unencrypted

10. SSH Setup in Termux

SSH Server Install और Configure करें

Step 1: Install OpenSSH

$ pkg update && pkg upgrade
$ pkg install openssh

Step 2: Set Password

$ passwd

New password enter करें और confirm करें

Step 3: Start SSH Server

$ sshd# Start SSH server

Step 4: Find Your IP

$ ip addr show wlan0# For WiFi
$ ip addr show wlan0 | grep inet

Step 5: Connect from PC

# Windows PowerShell/CMD:
$ ssh termux@192.168.1.100
# Linux/Mac Terminal:
$ ssh termux@192.168.1.100

11. SSH Key Authentication

Password के बिना SSH Access

Generate SSH Key Pair on PC:

PC$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

Enter दबाएं (default path accept करें)

Copy Public Key to Termux:

PC$ ssh-copy-id termux@192.168.1.100
OR Manual Method:
PC$ cat ~/.ssh/id_rsa.pub
termux$ mkdir ~/.ssh
termux$ echo "YOUR_PUBLIC_KEY" >> ~/.ssh/authorized_keys
termux$ chmod 700 ~/.ssh
termux$ chmod 600 ~/.ssh/authorized_keys

✅ अब password के बिना SSH connect हो जाएगा!

12. SCP for File Transfer

Secure File Copy Protocol

Upload to Termux:

PC$ scp file.txt termux@192.168.1.100:~/
PC$ scp -r folder/ termux@192.168.1.100:~/

Download from Termux:

PC$ scp termux@192.168.1.100:~/file.txt ./
PC$ scp -r termux@192.168.1.100:~/folder/ ./

⚠️ IMPORTANT DISCLAIMER

ये content सिर्फ Educational Purpose के लिए है।

  • • सिर्फ अपने system या permission वाली practice पर use करें
  • • बिना permission किसी system को test/crack करना illegal है
  • • Cyber Crime के लिए सख्त सज़ा है
  • • सिर्फ Learning और Security Improvement में use करें
  • • Local Laws का पालन करें