Networksecurity

20 min read3,941 words

Network Security

Network Security is the practice of protecting computer networks, devices, services, applications, and data from unauthorized access, misuse, attacks, modification, disruption, and destruction.

Exam definition

Network security is the set of technologies, policies, controls, and practices used to protect network infrastructure, communication, devices, and data from unauthorized access and cyber threats.

A simple view:

NETWORK SECURITY │ ┌───────────────┼────────────────┐ ↓ ↓ ↓ Protect Data Protect Devices Protect Services │ │ │ Encryption Firewall Access Control TLS/HTTPS IDS/IPS Authentication VPN Updates Monitoring

1. Why Network Security Is Important

Modern organizations depend heavily on networks.

For example:

Users │ ├── Computers ├── Smartphones ├── Servers ├── IoT devices └── Cloud services │ ↓ Network │ ↓ Internet

If the network is poorly protected, attackers may attempt to:

  • Steal information
  • Capture credentials
  • Access unauthorized systems
  • Spread malware
  • Disrupt services
  • Modify data
  • Abuse network resources
  • Attack internal systems

2. Main Goals of Network Security

The most important security model is the:

CIA Triad

CIA TRIAD │ ┌────────┼────────┐ ↓ ↓ ↓ Confidentiality Integrity Availability

3. Confidentiality

Confidentiality means:

Only authorized people or systems should be able to access information.

Example:

User │ │ HTTPS ↓ Server

The communication is encrypted so unauthorized network observers cannot normally read the application data.

Technologies that help:

  • Encryption
  • HTTPS/TLS
  • VPN
  • Access control
  • Authentication

4. Integrity

Integrity means:

Data should not be improperly modified or corrupted.

Example:

Original Data ↓ Network ↓ Server

The receiver should be able to detect unauthorized modification where the protocol provides integrity protection.

Technologies include:

  • Cryptographic hashes
  • Digital signatures
  • TLS
  • File integrity monitoring

5. Availability

Availability means:

Authorized users should be able to access systems and services when needed.

Example:

User ↓ Web Server ↓ Service Available

Threats include:

  • DDoS attacks
  • Hardware failure
  • Network failure
  • Power failure
  • Malware
  • Misconfiguration

Protection may include:

  • Redundancy
  • Backups
  • Load balancing
  • DDoS protection
  • Failover systems
  • Monitoring

6. AAA Security Model

Another important concept is:

AAA │ ├── Authentication ├── Authorization └── Accounting

Authentication

Authentication answers:

Who are you?

Examples:

Username + Password MFA Biometrics Security key Certificate

Authorization

Authorization answers:

What are you allowed to do?

Example:

Admin ├── Read ├── Write ├── Delete └── Configure Normal User ├── Read └── Limited Write

Accounting

Accounting means tracking activity.

For example:

User logged in ↓ Accessed server ↓ Downloaded file ↓ Logged out

Logs can help with:

  • Auditing
  • Troubleshooting
  • Incident investigation
  • Compliance

7. Common Network Security Threats

A network can face many different threats.

Network Threats │ ├── Malware ├── Phishing ├── Password attacks ├── Eavesdropping ├── Spoofing ├── DoS/DDoS ├── Man-in-the-Middle ├── Session attacks ├── Unauthorized access ├── DNS attacks └── Misconfiguration

8. Malware

Malware = Malicious Software

Examples:

  • Virus
  • Worm
  • Trojan
  • Ransomware
  • Spyware
  • Botnet malware

A worm is particularly relevant to networks because it can automatically spread between vulnerable systems.

Example:

Infected PC │ ├────→ PC 2 │ ├────→ PC 3 │ └────→ Server

9. Phishing

Phishing attempts to trick users into revealing information or performing an unsafe action.

Example:

Fake Login Page ↓ User enters credentials ↓ Attacker receives them

Network security is not only about firewalls.

Humans are also an important part of security.

Security awareness and email filtering can reduce phishing risk.


10. Password Attacks

Attackers may attempt to obtain or guess passwords.

Common techniques include:

  • Password guessing
  • Credential stuffing
  • Password spraying
  • Brute-force attacks

Brute force

Trying many possible passwords:

password1 password2 password3 ...

Credential stuffing

Using previously leaked username/password combinations against other services.

Password spraying

Trying a small number of common passwords across many accounts rather than many passwords against one account.


11. Eavesdropping

Eavesdropping means unauthorized interception or observation of network communication.

Without encryption:

Client │ │ Username + Password ↓ Network │ ↓ Attacker

Encryption helps:

Client │ │ Encrypted Data ↓ Network │ ↓ Attacker │ └── Cannot normally read the protected content

HTTPS/TLS is an important example.


12. Man-in-the-Middle Attack

A Man-in-the-Middle (MITM) attack occurs when an attacker positions themselves between communicating parties and attempts to intercept or manipulate communication.

Conceptually:

Client │ ↓ Attacker │ ↓ Server

Without proper cryptographic authentication, an attacker may potentially manipulate communication.

TLS helps protect against this when certificate validation is performed correctly.


13. Spoofing

Spoofing means pretending to be another system, device, user, or network identity.

Examples:

IP spoofing MAC spoofing DNS spoofing Email spoofing ARP spoofing

Example:

Real Device ↓ Identity ↓ Attacker attempts to imitate it

Spoofing is a broad category, so the specific defense depends on the protocol involved.


14. DoS and DDoS

DoS

Denial of Service

Attempts to make a service unavailable.

Many requests ↓ Server ↓ Resources exhausted ↓ Service unavailable

DDoS

Distributed Denial of Service

Traffic originates from many systems.

PC ─────┐ PC ─────┤ PC ─────┤ PC ─────┤ ↓ Target

DDoS protection can involve:

  • Rate limiting
  • Traffic filtering
  • CDN services
  • Load balancing
  • Upstream mitigation
  • Anycast infrastructure

15. Firewall

A firewall controls network traffic according to security rules.

Example:

Internet │ ↓ ┌───────────┐ │ Firewall │ └─────┬─────┘ │ ↓ Internal Network

A firewall can make decisions based on things such as:

  • Source IP
  • Destination IP
  • Port
  • Protocol
  • Connection state
  • Application information, depending on firewall type

16. Example Firewall Rules

Conceptually:

ALLOW TCP 443 ALLOW TCP 80 DENY everything else

This might mean:

Internet │ ├── HTTPS 443 → ALLOW ├── HTTP 80 → ALLOW └── Other → DENY

Actual rules need to consider direction, source/destination, state, and business requirements.


17. Types of Firewalls

Common categories include:

Packet-filtering firewall

Examines packet-level information.

Stateful firewall

Tracks connection state.

Proxy/Application firewall

Acts as an intermediary and can inspect application traffic.

Next-Generation Firewall

Can include:

  • Application identification
  • Deep inspection
  • Intrusion prevention
  • URL filtering
  • Malware detection

18. IDS

IDS = Intrusion Detection System

An IDS detects suspicious activity and generates alerts.

Network Traffic ↓ IDS ↓ Suspicious activity ↓ ALERT

Important:

IDS generally detects and alerts rather than directly blocking traffic.


19. IPS

IPS = Intrusion Prevention System

An IPS can detect suspicious traffic and take action to block or stop it.

Traffic ↓ IPS │ ├── Normal → Allow │ └── Malicious → Block

20. IDS vs IPS

IDSIPS
DetectsDetects + prevents
Usually alertsCan block
Often monitoring/out-of-bandCommonly inline
Lower risk of disrupting trafficBlocking mistakes can affect legitimate traffic

Easy memory:

IDS → Detect IPS → Prevent

21. VPN

VPN = Virtual Private Network

A VPN creates a protected communication tunnel across an untrusted network.

Conceptually:

Laptop │ ╞══════════════════════╡ │ Encrypted Tunnel │ ╞══════════════════════╡ │ VPN Server │ ↓ Private Network / Internet

VPNs can provide confidentiality and integrity depending on the protocol/configuration.


22. Encryption

Encryption converts readable information into protected ciphertext.

Plaintext ↓ Encryption ↓ Ciphertext

Example:

"HELLO" ↓ Encryption ↓ "8fA$91x..."

Only authorized parties with the necessary cryptographic keys can recover the original information.


23. Symmetric Encryption

The same secret key is used for encryption and decryption.

Same Key │ ↓ Plaintext → Encryption → Ciphertext │ ↓ Decryption │ ↓ Plaintext

Examples include:

  • AES
  • ChaCha20

Symmetric encryption is generally efficient for protecting large amounts of data.


24. Asymmetric Cryptography

Uses a key pair:

Public Key Private Key

The private key must be protected.

Asymmetric cryptography is used for purposes such as:

  • Authentication
  • Digital signatures
  • Key establishment

Examples:

  • RSA
  • Elliptic-curve cryptography

Modern TLS commonly uses elliptic-curve cryptography for key exchange/signatures, depending on the cipher suite and implementation.


25. Hashing

A hash function converts data into a fixed-length digest.

Input ↓ Hash Function ↓ Hash

Example:

"hello" ↓ SHA-256 ↓ digest

Important:

Hashing is not the same as encryption.

A cryptographic hash is designed to be one-way, while encryption is designed to allow authorized decryption.


26. Digital Signatures

Digital signatures help provide:

  • Authentication
  • Integrity
  • Non-repudiation properties in appropriate contexts

Conceptually:

Message ↓ Hash ↓ Private Key ↓ Digital Signature

The receiver can use the corresponding public key to verify the signature.


27. Access Control

Access control determines:

Who can access what?

Example:

Network │ ├── Admin VLAN │ └── Admin systems │ ├── Employee VLAN │ └── Employee devices │ └── Guest VLAN └── Internet only

This limits unnecessary access between different groups.


28. Network Segmentation

Segmentation divides a network into smaller security zones.

Example:

Firewall │ ┌──────────┼──────────┐ ↓ ↓ ↓ Servers Employees Guests VLAN 10 VLAN 20 VLAN 30

Benefits:

  • Limits attack spread
  • Reduces unnecessary communication
  • Improves control
  • Simplifies monitoring

29. VLAN

VLAN = Virtual Local Area Network

VLANs logically divide a physical switching infrastructure.

Example:

One physical switch │ ├── VLAN 10 → Teachers ├── VLAN 20 → Students └── VLAN 30 → Guests

Traffic between VLANs normally requires Layer 3 routing and can be controlled by firewalls/ACLs.


30. ACL

ACL = Access Control List

An ACL contains rules controlling traffic or access.

Example:

Source Destination Port Action ------------------------------------------------- 10.0.10.0/24 Server 443 ALLOW Guest Internal Any DENY

ACLs can exist on:

  • Routers
  • Firewalls
  • Switches
  • Cloud platforms
  • Applications

31. Network Authentication

Authentication verifies identity.

Examples:

Username + Password MFA Certificates 802.1X RADIUS TACACS+

For enterprise networks, authentication systems can centrally control access to network resources.


32. Multi-Factor Authentication

MFA uses multiple authentication factors.

Typical categories:

Something you know ↓ Password/PIN Something you have ↓ Security key/phone Something you are ↓ Biometrics

Example:

Password + Authenticator code ↓ Access granted

MFA significantly reduces the impact of many password-compromise scenarios.


33. Network Security and Wi-Fi

Wireless networks need special protection.

Modern Wi-Fi security commonly uses:

WPA2 WPA3

Avoid relying on outdated or weak mechanisms such as:

WEP

A secure wireless setup should use strong authentication and encryption appropriate for the environment.


34. Secure Wi-Fi Architecture

Internet │ Router │ ┌───────┴───────┐ ↓ ↓ AP Firewall │ ┌────┼─────┐ ↓ ↓ ↓ Laptop Phone IoT

IoT devices can be placed in a separate network/VLAN when practical.


35. Network Monitoring

Security requires visibility.

Monitoring can include:

Network Traffic ↓ Logs ↓ Monitoring System ↓ Alerts

Things to monitor:

  • Failed logins
  • Unusual traffic
  • New devices
  • Open services
  • DNS activity
  • Firewall events
  • Authentication events
  • System changes

36. SIEM

SIEM = Security Information and Event Management

A SIEM collects and analyzes security-related logs.

Example:

Firewall ───────┐ Server ─────────┤ Router ─────────┤ Authentication ─┤ IDS/IPS ────────┤ ↓ SIEM ↓ Correlation ↓ Alert

This helps security teams identify suspicious patterns across multiple systems.


37. Logging

Logs are extremely important.

Example:

2026-10-04 20:10 User: admin Source: 192.168.1.20 Action: Login Result: Failed

Repeated failures may indicate:

Password attack

Logs are also useful for troubleshooting normal network problems.


38. Patch Management

Network devices and servers can contain vulnerabilities.

Security requires keeping software updated.

Vulnerability ↓ Security Patch ↓ Update System ↓ Reduced Exposure

Examples:

  • Router firmware
  • Firewall software
  • Server operating systems
  • Network services
  • Applications
  • IoT firmware

39. Vulnerability Management

A typical vulnerability-management process is:

Discover ↓ Identify ↓ Assess ↓ Prioritize ↓ Remediate ↓ Verify ↓ Monitor

For example:

Unknown server ↓ Service discovery ↓ Outdated software ↓ Risk assessment ↓ Patch ↓ Verify

Only perform scanning/testing against systems you own or are explicitly authorized to assess.


40. Network Scanning

Security teams can scan authorized networks to discover:

  • Hosts
  • Open ports
  • Services
  • Versions
  • Network topology

For example, on an authorized lab:

nmap -sV 192.168.1.10

For a local subnet you are authorized to assess:

nmap -sn 192.168.1.0/24

The goal in defensive security is to understand and reduce unnecessary exposure.


41. Secure Network Design

A secure network can use multiple layers.

Internet │ Firewall │ ┌──────┴──────┐ │ │ DMZ Internal │ │ Servers Users │ Segmentation │ Devices

This is called:

Defense in depth


42. DMZ

DMZ = Demilitarized Zone

A DMZ is a network segment used to isolate services that need controlled exposure to external networks.

Example:

Internet │ ↓ Firewall │ ↓ DMZ ├── Web Server └── Public API │ ↓ Internal Firewall │ ↓ Internal Network ├── Database ├── Employees └── Internal Services

A public web server should not automatically have unrestricted access to internal systems.


43. Zero Trust

A modern security principle is:

Never trust automatically; continuously verify.

Traditional thinking:

Inside network ↓ Trusted

Zero Trust:

User/device ↓ Verify identity ↓ Check device/context ↓ Authorize access ↓ Allow only required resources

Zero Trust does not simply mean "block everything."

It means access should be based on verified identity, device/context, policy, and least privilege rather than network location alone.


44. Principle of Least Privilege

Give users/devices only the permissions they need.

Example:

Student ↓ Internet access ↓ No server administration

Instead of:

Student ↓ Full network access

Least privilege reduces the damage caused by compromised accounts or devices.


45. Network Security for IoT

IoT devices can create additional security risks.

Example:

ESP32 DHT11 RFID Camera Smart Door

A good architecture is:

Internet │ Firewall │ ┌────────┴────────┐ ↓ ↓ Main Network IoT VLAN │ │ Computers ESP32/Devices

Useful practices:

  • Change default passwords
  • Update firmware
  • Use encrypted communication
  • Restrict unnecessary services
  • Segment IoT devices
  • Monitor network behavior
  • Avoid exposing devices directly to the Internet unless necessary

46. HTTPS in Network Security

HTTPS protects web communication.

Browser │ │ HTTPS ↓ Internet │ ↓ Web Server

TLS provides:

Confidentiality Integrity Authentication

This is why login pages, payment systems, APIs, and other sensitive web applications should use HTTPS.


47. DNS Security

DNS is also a security concern.

Threats include:

DNS Spoofing DNS Cache Poisoning DNS Hijacking DNS Tunneling Malicious Domains

Defensive technologies include:

DNSSEC Secure DNS resolvers DNS filtering DNS monitoring DoT DoH

48. ARP Security

ARP is used in IPv4 local networks to map IP addresses to MAC addresses.

Because traditional ARP does not authenticate responses cryptographically, attackers on the same local network may attempt ARP spoofing/poisoning.

Conceptually:

Victim │ │ "Who has 192.168.1.1?" ↓ Attacker │ │ Fake ARP response ↓ Victim

Possible defenses include:

  • Dynamic ARP Inspection
  • DHCP snooping
  • Static ARP entries in special cases
  • Network segmentation
  • Monitoring

49. Secure Protocols

Prefer secure alternatives where appropriate.

Insecure/legacyBetter choice
HTTPHTTPS
TelnetSSH
FTPSFTP / FTPS
HTTP-based plaintext APIsHTTPS APIs
Weak Wi-Fi securityWPA2/WPA3
Unencrypted remote administrationSSH/TLS-based administration

Important:

"Secure" depends on configuration and implementation. Simply choosing a protocol name does not guarantee security.


50. Security Policies

Technical controls alone are not enough.

Organizations also need policies for:

  • Passwords
  • MFA
  • Device access
  • Remote access
  • Software updates
  • Backups
  • Incident response
  • Data handling
  • Network segmentation

Example:

Security │ ├── Technology ├── People └── Policies

51. Backup and Recovery

Security also includes preparing for failures and attacks.

Example:

Important Data ↓ Backup ↓ Offline / Isolated Backup ↓ Recovery Test

Backups are particularly important against ransomware and hardware failures.

A backup that has never been tested may not be reliable when needed.


52. Incident Response

When a security incident occurs:

Detect ↓ Analyze ↓ Contain ↓ Eradicate ↓ Recover ↓ Learn / Improve

Example:

Compromised PC ↓ Detect unusual traffic ↓ Isolate PC ↓ Investigate malware ↓ Remove threat ↓ Restore ↓ Improve defenses

53. Defense in Depth

Never depend on one security mechanism.

Bad design:

Internet ↓ One Firewall ↓ Everything

Better:

Internet ↓ Firewall ↓ IDS/IPS ↓ Network Segmentation ↓ Authentication ↓ Endpoint Security ↓ Logging ↓ Backups

If one control fails, other controls can still reduce the impact.


54. Network Security Architecture Example

For a college:

INTERNET │ ↓ FIREWALL │ ┌──────────────┼──────────────┐ ↓ ↓ ↓ DMZ Staff VLAN Student VLAN │ │ │ Web Server Staff PCs Student PCs │ ↓ Internal Services │ ┌─────┴─────┐ ↓ ↓ Database IoT VLAN │ ESP32 Devices

Security rules can restrict:

Student → Database DENY Student → Internet ALLOW IoT → Database Only required ports Staff → Internal Apps ALLOW Internet → Database DENY Internet → Web Server ALLOW required ports

55. Network Security Layers

Think of security as multiple layers:

Layer 1 Physical Security ↓ Layer 2 Data-Link Security ↓ Layer 3 Network Security ↓ Layer 4 Transport Security ↓ Layer 5+ Application Security ↓ Identity & Access ↓ Monitoring & Response

For example:

Physical ↓ Secure server room Network ↓ Firewall + VLAN Transport/Application ↓ TLS/HTTPS Identity ↓ MFA + least privilege Monitoring ↓ Logs + SIEM

56. Common Network Security Devices

Important devices/technologies include:

Firewall IDS IPS VPN Gateway Proxy Secure Web Gateway Network Access Control Router ACL WAF SIEM

WAF

WAF = Web Application Firewall

A WAF specifically protects web applications and can inspect HTTP/HTTPS requests.

Conceptually:

Internet ↓ WAF ↓ Web Application

It can help detect/block certain malicious web requests.


57. Firewall vs WAF

FirewallWAF
General network traffic controlWeb application protection
IP/port/protocol/state/etc.HTTP/HTTPS/application behavior
Network-level controlsApplication-level controls
Protects networks/servicesProtects web applications

They can work together.


58. Common Network Security Tools

For authorized security and administration:

Wireshark

Packet analysis.

Network Traffic ↓ Wireshark ↓ Packets

Nmap

Network/service discovery.

Host ↓ Nmap ↓ Ports/Services

tcpdump

Command-line packet capture.

sudo tcpdump -i eth0

Netcat

Network connectivity/testing tool.

nc -vz 192.168.1.10 443

Only use scanning/testing against systems you own or have explicit permission to assess.


59. Network Security in Cybersecurity

Network security is one part of cybersecurity.

Cybersecurity │ ┌──────────────┼───────────────┐ ↓ ↓ ↓ Network Security Application Endpoint Security Security │ ├── Firewall ├── IDS/IPS ├── VPN ├── Segmentation ├── Monitoring └── Secure protocols

Other areas include:

  • Identity security
  • Cloud security
  • Application security
  • Data security
  • Incident response
  • Security governance

60. Network Security and Penetration Testing

In authorized penetration testing, network security assessment can involve:

Information Gathering ↓ Host Discovery ↓ Port Discovery ↓ Service Identification ↓ Configuration Review ↓ Vulnerability Assessment ↓ Controlled Validation ↓ Reporting ↓ Remediation

The goal should be:

Find security weaknesses so they can be fixed.


61. Common Security Mistakes

Avoid:

Default passwords ↓ Unpatched systems ↓ Unnecessary open ports ↓ Flat network ↓ No MFA ↓ No monitoring ↓ No tested backups

Better:

Strong authentication + Patching + Least privilege + Segmentation + Firewall + Monitoring + Backups

62. Network Security Checklist

Devices

  • Change default credentials
  • Update firmware
  • Disable unnecessary services
  • Restrict administration access

Network

  • Configure firewall
  • Segment sensitive systems
  • Use secure Wi-Fi
  • Restrict unnecessary ports
  • Monitor network traffic

Users

  • Strong passwords
  • MFA
  • Security awareness
  • Least privilege

Applications

  • HTTPS/TLS
  • Secure authentication
  • Input validation
  • Regular updates

Recovery

  • Regular backups
  • Isolated/offline backup where appropriate
  • Recovery testing
  • Incident response plan

63. Network Security — Complete Picture

NETWORK SECURITY │ ┌───────────────────────┼────────────────────────┐ ↓ ↓ ↓ CONFIDENTIALITY INTEGRITY AVAILABILITY │ │ │ Encryption Hashing Redundancy HTTPS/TLS Signatures Backups VPN TLS DDoS defense │ │ │ └───────────────────────┼────────────────────────┘ ↓ ACCESS CONTROL │ Authentication Authorization MFA Least Privilege │ ↓ NETWORK DEFENSE │ ┌───────────────┼────────────────┐ ↓ ↓ ↓ Firewall IDS/IPS Segmentation │ │ │ └───────────────┼────────────────┘ ↓ MONITORING │ Logs / SIEM / Alerts │ ↓ INCIDENT RESPONSE

64. Important Terms to Remember

TermMeaning
CIAConfidentiality, Integrity, Availability
AAAAuthentication, Authorization, Accounting
FirewallControls network traffic
IDSDetects suspicious activity
IPSDetects and can block suspicious activity
VPNProtected network tunnel
TLSCryptographic protocol securing communications
HTTPSHTTP over TLS
VLANLogical network segmentation
ACLAccess Control List
MFAMulti-Factor Authentication
DMZIsolated zone for controlled public-facing services
SIEMSecurity event/log management and analysis
WAFWeb Application Firewall
DNSSECDNS data authentication/integrity
DDoSDistributed Denial of Service
MITMMan-in-the-Middle

65. Final Revision

The most important concepts from this topic are:

Network Security │ ├── CIA Triad │ ├── Confidentiality │ ├── Integrity │ └── Availability │ ├── AAA │ ├── Authentication │ ├── Authorization │ └── Accounting │ ├── Protection │ ├── Firewall │ ├── IDS/IPS │ ├── VPN │ ├── Encryption │ ├── VLAN │ ├── ACL │ └── MFA │ ├── Threats │ ├── Malware │ ├── Phishing │ ├── MITM │ ├── Spoofing │ ├── DNS attacks │ └── DoS/DDoS │ ├── Secure Design │ ├── Segmentation │ ├── DMZ │ ├── Least privilege │ └── Zero Trust │ └── Operations ├── Monitoring ├── Logging ├── Patching ├── Backups └── Incident Response

One-line exam answer

#> Network security is the practice of protecting network infrastructure, devices, communication, services, and data from unauthorized access, attacks, modification, and disruption using technologies such as firewalls, encryption, authentication, access control, segmentation, IDS/IPS, monitoring, and secure network design.

Keep learning. Keep building. Keep growing.

© 2026 Ugenz Academy