Cisco CCNP Security · SCOR + SNCF · SCOR 1.0 Security Concepts · 2.0 Network Security

Security foundations: threats, firewalls and how stateful inspection works

Start from zero: what we protect (CIA), what attacks look like, how firewalls evolved from packet filters to NGFWs, and why a stateful firewall lets replies back in but blocks strangers.

71 min read13 chapters1 labs15 quiz8 scenarios15 interview Q&A

This first module is free: read the lesson and take the quiz. Create a free account to run up to 3 hands-on labs.

Log inStart free
Jump to chapter (13)
01

The big picture: threats meet the firewall

What you will learn in this module. In Start here you met the defender mindset and the security stack at a high level. Now we go one level deeper, into the first two SCOR 350-701 domains: 1.0 Security Concepts (the threats and vulnerabilities you must recognise in on-premises, hybrid and cloud environments) and the basics of 2.0 Network Security (how a firewall actually decides what to allow). By the end you will be able to explain how firewalls evolved from packet filters to NGFWs, describe exactly what a stateful firewall keeps in its connection table for TCP, UDP and ICMP, explain why FTP, DNS and SIP need inspection engines, place interfaces into zones and security levels, choose between routed and transparent mode, read a PAT translation, tell IDS from IPS, place firewalls at the perimeter, DMZ, internal segments and data center, compare ASA with Threat Defense, explain why logging matters, and troubleshoot a firewall with show conn, show xlate and show logging.

Prerequisites. IPv4 addressing and subnetting, the TCP three-way handshake, what a port number is, and basic Cisco CLI (enable, show commands). If the words SYN, ACK and "port 443" make sense to you, you are ready.

An analogy: the security desk of an office tower

Picture a tall office tower. Employees on the inside can walk out to the street whenever they like. When an employee orders lunch, the security desk writes in a register: "Ravi, floor 12, expecting a delivery from Pizza Palace". When the delivery rider arrives and says "for Ravi, floor 12", the guard checks the register, finds the matching line, and lets him up. A stranger who walks in and says "I want to go to floor 12" finds no line in the register and is turned away. When the delivery is done, the guard strikes the line out.

That register is the connection table of a stateful firewall. The guard does not need a rule that says "let pizza riders in"; he lets in only the people who are answers to a request someone inside made. A modern next-generation firewall is a guard who also opens the box and checks that it really is pizza, not something dangerous with a pizza label.

PC1 .10 ADMIN .50 SW-IN ASA1NK-ASA inside 100 ISP outside 0 INET 8.8.8.8 PARTNER .10 WEB 10.0.2.10 dmz 50 inside 10.0.1.0/24outside 203.0.113.0/29

The lab you will use in this module: inside users, a DMZ web server and a simulated internet (INET at 8.8.8.8 and PARTNER at 198.51.100.10), all separated by the ASA NK-ASA.

Where the threats come from today

Ten years ago most company data lived in one building behind one firewall. Today it lives in three places at once:

  • On-premises: your own offices and data centers. Classic threats: malware on a laptop, phishing emails, an attacker on the LAN doing man-in-the-middle, DoS against your internet edge.
  • Cloud: workloads and SaaS applications run by a provider. Classic threats: stolen cloud credentials, insecure APIs, misconfigured storage buckets, data breaches, DDoS against public services.
  • Hybrid: both joined by VPNs and direct links. The link itself becomes a path an attacker can use to move from a weak cloud workload into the data center, or the other way round.

A firewall is not the only control, but it is the one that decides who may talk to whom. Every other control in this track (IPS, Secure Endpoint, Secure Access, ISE) either sits in the firewall, sits beside it, or feeds it information.

The road map of this module

ChaptersTopicSCOR link
2–3Threats and vulnerabilities, at defender level1.1, 1.2
4–6Firewall evolution and stateful inspection for TCP, UDP, ICMP and applications2.0
7–8Zones, security levels, routed vs transparent mode, NAT basics2.0
9–10IDS vs IPS; firewall placement designs (perimeter, DMZ, internal segmentation, data center)2.0
11ASA and Threat Defense at a high level, and why logging matters2.0
12–13Troubleshooting the lab, then the exam checklistall

The modules that follow go deeper into each tool: the ASA CLI and ACLs, NAT in detail, Threat Defense with Management Center, IPS policies and VPNs. Here you build the mental model that makes all of them easy.

Worked example: one web visit through the lab. PC1 (10.0.1.10) opens the web page on 8.8.8.8, TCP port 80. The ASA sees the SYN arrive on inside (security level 100) heading to outside (level 0). High to low is allowed by default, so it builds a connection, translates the source to its outside address 203.0.113.2 with PAT, and forwards the SYN. The reply returns to 203.0.113.2, matches the connection and the translation, and is sent back to 10.0.1.10. Later PARTNER (198.51.100.10) tries TCP port 80 on 203.0.113.2 with no matching connection: the ASA drops it and logs %ASA-2-106001.

Common beginner mistake. Thinking "we have a firewall, so we are secure". A firewall that allows TCP 443 to everywhere will happily carry malware, stolen data and command-and-control traffic inside that port. The firewall is one layer of defence in depth, not the whole answer.

Exam trap. SCOR separates on-premises threats (viruses, trojans, rootkits, DoS/DDoS, phishing, MITM, SQL injection, XSS, malware) from cloud threats (data breaches, insecure APIs, DoS/DDoS, compromised credentials). Read the question for the environment it names before picking an answer.

The firewall that was "wide open"

A mid-size company replaced a router ACL with an ASA. The migration engineer copied the old rule set, including "permit tcp any any" inbound on the internet interface, which had been added years earlier because replies were being dropped. Within a week an external scan found an internal RDP server reachable from the internet. The review showed the old rule existed only because the router was stateless. On the ASA the rule was unnecessary: the connection table already allowed replies. Removing it closed the hole with zero impact on users.

Lesson: understand what state gives you before you copy rules from a stateless device.

"In one minute, what does a stateful firewall do that a router ACL does not?"

Strong answer: it tracks each connection in a connection table (addresses, ports, protocol, interfaces, TCP state, NAT), so return traffic is allowed automatically and anything unsolicited from the outside is dropped. A plain ACL judges every packet alone, so you must open the return direction by hand, which usually ends up far too open. Mention that you verify it on an ASA with show conn.

Key takeaways

  • This module covers SCOR 1.1 and 1.2 threats and vulnerabilities plus the firewall basics of domain 2.0.
  • Threats now target on-premises, cloud and the hybrid links between them.
  • A stateful firewall is a guard with a register: replies to inside requests pass, strangers do not.
  • The lab: PC1 and ADMIN inside, WEB in the DMZ, INET 8.8.8.8 and PARTNER outside, ASA NK-ASA in the middle.
  • A firewall is one layer of defence in depth, never the whole defence.
02

Common threats: on-premises, hybrid and cloud

A doctor cannot treat an illness she cannot name. A security engineer is the same: before you pick a control, you must recognise the attack from its symptoms. This chapter covers every threat in SCOR blueprint item 1.1 at the level a defender needs: what happens, why it works, what you would see, and what stops it.

First, the vocabulary

Asset
Anything of value: data, a server, a service, a reputation.
Vulnerability
A weakness in software, configuration or process (chapter 3).
Threat
Someone or something that could use the weakness: a criminal group, an insider, a piece of malware.
Exploit
The method or code that actually uses the vulnerability.
Risk
Likelihood multiplied by impact. You reduce risk; you rarely remove it.
Indicator of compromise (IOC)
Evidence that an attack happened: a bad file hash, a malicious domain, an odd login.

Malicious software (malware)

TypeHow it spreads or behavesDefender clue
VirusAttaches to a legitimate file and runs when a user opens it. Needs a human action to spread.Modified executables or documents, endpoint alerts
WormSpreads by itself across the network through a vulnerable service, no user action needed.Sudden scanning of one port across many hosts
TrojanPretends to be useful software (a free tool, a fake update) and hides a malicious payload.New unknown process calling out to the internet
RootkitHides itself deep in the operating system (kernel, boot loader) so normal tools cannot see it; keeps privileged access.Tampered system files, integrity or boot check failures
RansomwareEncrypts files and demands payment; modern groups also steal data first.Mass file renames, ransom notes, backup deletion attempts
Spyware / keyloggerRecords activity and credentials.Unexpected outbound uploads

Almost all modern malware "phones home" to a command-and-control (C2) server. That is great news for network defenders: the firewall, DNS security and IPS can see and block that call even when the endpoint missed the infection.

Social engineering: phishing and its cousins

Phishing is a message that tricks a person into clicking a link, opening an attachment or typing a password on a fake page. Spear phishing targets one person with researched details; whaling targets executives; vishing uses voice calls and smishing uses SMS. It works because it attacks people, not software. Defences: email security with link and attachment analysis, DNS-layer blocking of new or malicious domains, multi-factor authentication so a stolen password alone is useless, and user training.

Denial of service: DoS and DDoS

A DoS attack makes a service unavailable. A DDoS does it from thousands of sources at once, usually a botnet of infected devices. Three families:

  • Volumetric: fill the internet link with traffic (often reflected and amplified through open DNS or NTP servers).
  • Protocol / state exhaustion: fill the connection table of a server or firewall, for example a SYN flood that opens half-open TCP sessions and never completes them.
  • Application layer: expensive requests (searches, logins) that look legitimate but exhaust the application.

A firewall protects itself and the servers behind it against state exhaustion with embryonic connection limits and TCP intercept or SYN cookies. Volumetric attacks bigger than your link must be scrubbed upstream by the ISP or a cloud DDoS service; no box at your edge can fix a full pipe.

Man-in-the-middle (on-path) attacks

The attacker places himself between two parties and reads or changes traffic. On a LAN this is usually ARP spoofing or a rogue DHCP server; on Wi-Fi a fake access point. Symptom: two IP addresses resolving to the same MAC, certificate warnings in browsers. Defences: encryption with certificate validation (TLS, IPsec), Dynamic ARP Inspection and DHCP snooping on switches (module sec-infra), 802.1X.

Web application attacks: SQL injection and XSS

SQL injection happens when an application builds a database query by gluing user input into it. Specially crafted input changes the meaning of the query, so the attacker can read or change data he should never see. Defence: parameterised queries (prepared statements), input validation, least-privilege database accounts, and a WAF or IPS signatures in front. Cross-site scripting (XSS) happens when an application puts user input into a web page without encoding it, so script supplied by the attacker runs in other users' browsers and can steal their session. Defence: output encoding, input validation, Content Security Policy, and WAF rules.

On-premises virus, worm, trojanrootkit, ransomwarephishing, MITMSQLi, XSS, DoS Hybrid linkslateral movement path Cloud data breachesinsecure APIsstolen credentialsDoS / DDoS

SCOR 1.1 groups threats by environment. The hybrid link joins them, so a weakness on one side becomes a path to the other.

Cloud-specific threats

In the cloud the provider secures the building and hypervisor, but you secure your identities, data and configuration (the shared responsibility model). The big four: compromised credentials (an access key leaked in a code repository), insecure APIs (no authentication, no rate limit, too much data returned), data breaches (usually caused by a misconfigured storage bucket or over-permissive role) and DoS/DDoS against public endpoints, which can also create a huge bill.

Worked example: reading the symptoms. The firewall log shows host 10.0.1.23 making a DNS query for a random-looking domain every 60 seconds, followed by a small HTTPS connection to 203.0.113.77. No user is logged in. That regular, small, automatic pattern is a C2 beacon, a strong sign of a trojan. The response: isolate the host, block the domain and IP, and hunt for the same indicators on other hosts.

Common mistake. Treating every slow website as a DDoS. Check your own link utilisation, the firewall connection count (show conn count) and the source spread first. A single misbehaving backup job can look like an attack.

Exam trap. Worm vs virus: a worm self-propagates without user action; a virus needs a host file and a user. A rootkit's defining trait is hiding and keeping privileged access, not encrypting data. XSS runs in the victim's browser; SQL injection runs against the database.

The invoice that was not an invoice

An accounts clerk opened an "overdue invoice" attachment. Nothing visible happened. Two hours later the NGFW's Security Intelligence feed blocked DNS lookups from her laptop to a known C2 domain and raised an alert. The SOC isolated the laptop, found a trojan dropped by a macro, and used the same file hash to confirm no other machine had run it. Email filtering was then tuned to quarantine macro-enabled attachments from outside senders.

Lesson: layered controls work: the phishing got through, but the network caught the call home.

"Explain the difference between a virus, a worm and a trojan."

A virus infects a host file and spreads when a user runs it. A worm spreads on its own through a network vulnerability. A trojan disguises itself as legitimate software and carries a hidden payload. Add the defender angle: all three usually contact a C2 server, so DNS security, NGFW reputation feeds and endpoint protection together give you several chances to catch them.

Key takeaways

  • Know the vocabulary: asset, vulnerability, threat, exploit, risk, IOC.
  • Malware types differ in how they spread (virus, worm, trojan) and what they do (rootkit hides, ransomware encrypts).
  • DoS/DDoS families: volumetric, state exhaustion, application layer; big floods need upstream scrubbing.
  • MITM, SQL injection and XSS each have a specific defence: encryption plus DAI, parameterised queries, output encoding.
  • Cloud threats centre on identities, APIs and misconfiguration.
03

Common vulnerabilities, at defender level

A threat needs a way in. That way in is a vulnerability: a door left unlocked, a window with a broken latch. SCOR blueprint item 1.2 asks you to compare the most common ones. You do not need to write attacks; you need to recognise the weakness, know why it is dangerous, spot its traces in logs, and name the fix.

The one idea behind most of them: trusting input

Almost every application vulnerability comes from one mistake: the program treats data from an untrusted source as if it were instructions. A form field, a URL, an API parameter, a file upload, even a header, all come from outside the trust boundary. When the program passes that data to a database, a shell, a file system or a web page without checking it, the attacker's data becomes the attacker's command.

Untrusted input trust boundary Validateand encode Database: SQLi OS shell: cmd inj. Files: traversal Web page: XSS skip the check= injection

Each "sink" (database, shell, file system, browser) has its own injection flaw when input is not validated and encoded.

The vulnerabilities you must compare

VulnerabilityWhat goes wrongDefender clueFix
Software bugsCoding errors that let input reach places it should not; published as CVEsVendor advisory, IPS signature hitsPatch management, virtual patching with IPS
Weak or hard-coded passwordsDefault or embedded credentials, often identical on every unit of a productLogins from unusual sources, brute-force patternsChange defaults, vaults, MFA, lockout
Missing encryptionData sent or stored in clear text, or protected by weak ciphers and old protocolsTelnet, FTP, HTTP basic auth, SSLv3/TLS 1.0 seen in trafficTLS 1.2/1.3, SSH, SNMPv3, encrypted storage
OS command injectionThe application passes input into a system shell commandWeb logs with shell separators and system command names in parametersNever call a shell with input; use safe APIs and allow-lists
Buffer overflowA program writes more data into memory than the buffer holds, overwriting nearby memory and possibly control dataCrashes, very long abnormal fields, IPS signaturesBounds checking, memory-safe languages, ASLR and DEP, patching
Path traversalFile names from input escape the intended folder using parent-directory sequencesRequests containing repeated dot-dot-slash patterns, often URL-encodedCanonicalise paths, allow-list file names, run with least privilege
XSSInput echoed into a page without encoding runs as script in other users' browsersScript tags or event handlers inside parametersOutput encoding, CSP, WAF
CSRFA malicious page makes a logged-in victim's browser send a request the victim never intended (for example change email)State-changing requests with a foreign Referer or OriginAnti-CSRF tokens, SameSite cookies, re-authentication

Buffer overflow, explained with a glass of water

Pour 500 ml into a 300 ml glass and the rest spills onto the table. In memory, the "table" might hold the address the program returns to when the function finishes. If an attacker controls what spills, he may redirect the program. That is why buffer overflows are so serious: they can turn a crash into remote code execution. Modern operating systems add ASLR (random memory layout) and DEP/NX (data areas cannot execute) to make this far harder, but the root fix is correct bounds checking and patching.

XSS versus CSRF: the classic confusion

Both involve a victim's browser and a website. The difference is who is trusted. In XSS the victim's browser trusts the website, and the attacker abuses that by getting his script served by the site. In CSRF the website trusts the victim's browser (it carries a valid session cookie), and the attacker abuses that by making the browser send a forged request to the site. XSS steals or acts inside the page; CSRF only fires a request.

Worked example: triaging a web log. The DMZ web server 10.0.2.10 logs 400 requests in two minutes from 198.51.100.44. Parameters contain repeated parent-directory sequences followed by the names of system configuration files. That is a path traversal probe. Response: confirm the application returns 404 or 403 (not file contents), add an IPS or WAF rule, block the source for a while, and verify the web service runs as an unprivileged account so even a successful traversal reads very little.

Where the network team fits

You will not fix application code, but you control three things that shrink the damage: exposure (only publish what must be public, and only from a DMZ), detection (IPS signatures and WAF rules catch known patterns and give "virtual patching" until the vendor fix arrives) and encryption (disable Telnet, HTTP management, SNMPv1/v2c, weak TLS on every device you own). OWASP Top 10 and CVSS scoring are covered in depth in the next module, sec-concepts.

Common mistake. Believing a WAF or IPS replaces fixing the bug. Signatures catch known patterns; a slightly different encoding can slip past. Virtual patching buys time; it is not the cure.

Exam trap. "Missing encryption" includes weak ciphers and old protocol versions, not only plain text. And CSRF does not steal data by itself: it makes the victim perform an action. If an option says "attacker's script runs in the victim's browser", that is XSS.

The camera with a password nobody could change

A facilities team installed IP cameras in a warehouse. A security audit found the cameras reachable from the corporate user VLAN and using a hard-coded service password published in an online forum. The vendor had no fix yet. The network team moved the cameras into their own segment, allowed only the video recorder to reach them through the firewall, and blocked everything else. When the firmware fix arrived months later, the exposure had already been near zero.

Lesson: when you cannot fix the vulnerability, reduce who can reach it.

"What is the difference between XSS and CSRF?"

XSS injects script that runs in the victim's browser in the context of the vulnerable site, abusing the user's trust in the site; the fix is output encoding and CSP. CSRF tricks an authenticated browser into sending a state-changing request, abusing the site's trust in the browser's cookies; the fix is anti-CSRF tokens and SameSite cookies. A strong candidate also says both are mitigated partly by a WAF, but fixed in the application.

Key takeaways

  • Most application flaws come from treating untrusted input as instructions.
  • Injection flaws differ by sink: database (SQLi), shell (command injection), file system (path traversal), browser (XSS).
  • Buffer overflows can lead to code execution; ASLR, DEP and patching are the defences.
  • Missing encryption includes weak ciphers and outdated protocols.
  • Network teams reduce exposure, add detection and virtual patching, and enforce encryption.
04

Firewall evolution: packet filter to NGFW

Think of how building security grew up. First there was a fence with a gate that checked only the number plate of each car. Then came a guard with a visitor register. Then a reception desk that escorted visitors personally. Today there is a full security team with ID badges, bag scanners and cameras. Firewalls followed exactly the same path. Each generation fixed a weakness of the one before it, and every generation is still in use somewhere.

Generation 1: the stateless packet filter

A packet filter judges each packet on its own, using only header fields: source and destination IP, protocol, and source and destination port. A router ACL is the everyday example. It is fast and cheap, but it has no memory. When PC1 sends a request to a web server, the reply comes back from source port 80 to a random high port on PC1. The filter has no idea this reply belongs to a request, so you must write a rule for the return direction too, and that rule is always wide.

! Stateless router ACL on the internet interface (inbound)
ip access-list extended INET-IN
 permit tcp any 10.0.1.0 0.0.0.255 established
 deny   ip any any log
interface GigabitEthernet0/0
 ip access-group INET-IN in

The established keyword helps a little: it permits TCP packets that have the ACK or RST bit set, which true session-opening SYNs do not. But it only looks at flag bits, not at a real session, so a crafted packet with ACK set still passes, and it does nothing at all for UDP or ICMP. Older IOS add-ons such as reflexive ACLs and CBAC tried to add state to routers; the modern IOS answer is the zone-based firewall.

Generation 2: the stateful firewall

A stateful firewall remembers every allowed conversation in a connection table (also called a state table or session table). The first packet of a flow is checked against the policy; if it is allowed, an entry is created, and every later packet in either direction is matched against that entry instead of the rule base. Replies pass automatically; unsolicited packets do not. It also checks that TCP packets arrive in a sensible order (a SYN-ACK must follow a SYN), which defeats the crafted-ACK trick above. The Cisco ASA is the classic example. Its limit: it trusts the port number. Anything on TCP 443 looks like "HTTPS", whether it is a banking site, a game, or malware talking to its controller.

Generation 3: the proxy or application gateway

An application proxy terminates the client's connection itself and opens a second, separate connection to the server. Because it speaks the application protocol, it can inspect commands and content in full. That is powerful but slow, and each application needs its own proxy. Explicit web proxies and many cloud security gateways work this way today.

Generation 4: the next-generation firewall (NGFW)

An NGFW keeps stateful inspection and adds context and content:

  • Application visibility and control (AVC): identifies the application (for Cisco, the OpenAppID detectors) whatever the port.
  • User identity: rules by user or group from ISE, Active Directory or a captive portal, not only by IP.
  • Intrusion prevention (IPS): Snort 3 signatures in Cisco Secure Firewall Threat Defense.
  • URL filtering and reputation: category and risk of each site, Security Intelligence feeds from Talos.
  • File and malware inspection: file-type control and cloud malware lookups.
  • TLS decryption: optional, to see inside encrypted traffic.

A web application firewall (WAF) is a specialist: it sits in front of one web application and understands HTTP deeply to stop SQL injection, XSS and similar attacks. It complements, not replaces, the network firewall.

What the device can see L3/L4 headers + session state + app protocol + app, user, threat Packet filter: router ACL Stateful firewall: ASA, IOS zone-based firewall Proxy / application gateway, WAF (web only) NGFW: Secure Firewall Threat Defense more context, more CPU

Each generation sees more, and pays for it with processing power, licensing and tuning.

Worked example: the same packet, four decisions. A laptop sends TCP to 203.0.113.80 port 443. The packet filter sees "TCP to 443" and permits. The stateful firewall sees a new outbound connection from a high-security interface and permits it, then tracks the session. A proxy terminates the TLS session (if configured) and inspects the request. The NGFW identifies the application as a file-sharing service, sees the user belongs to Finance, finds the destination in a "newly seen domain" feed, and blocks the upload under the data-protection rule.

TypeStrengthWeakness
Packet filterVery fast, on every routerNo state; return traffic must be opened by hand
StatefulReplies automatic, unsolicited traffic droppedBlind to the application inside a port
ProxyFull protocol inspectionSlow, per-application
NGFWPolicy by app, user, content and threatNeeds licences, tuning and more CPU

Common mistake. Assuming an NGFW is "on" just because you bought one. Application control, IPS, URL and malware inspection are policies and licences you must enable and tune. An NGFW with only an allow-any access rule is a stateful firewall with a bigger price tag.

Exam trap. The established keyword does not make an ACL stateful; it only checks the ACK and RST flags. And "which device can allow a social network but block its games on the same port" is always the NGFW, because only it identifies applications.

Port 443 carried more than web pages

An enterprise with a stateful firewall allowed outbound TCP 80 and 443 for everyone. Bandwidth to the internet doubled over a month. The firewall's connection table showed only "TCP 443", which told the team nothing. After migrating to an NGFW with application visibility, the dashboard showed a peer-to-peer file-sharing tool and a remote-access application running over 443. The team blocked both by application, not by port, and bandwidth dropped back.

Lesson: ports describe a doorway, not who is walking through it.

"What makes a firewall next-generation?"

An NGFW is still stateful, but it adds application identification independent of port, user identity, integrated IPS, URL and reputation filtering, file and malware inspection, and optional TLS decryption, with policy that can use all of these together. Name a Cisco example (Secure Firewall Threat Defense managed by Management Center) and one reason it matters: controlling applications that share port 443.

Key takeaways

  • Packet filters judge each packet alone; they have no memory of sessions.
  • established checks flags only and does nothing for UDP or ICMP.
  • Stateful firewalls track sessions in a connection table but trust the port number.
  • Proxies terminate and inspect; WAFs specialise in protecting web applications.
  • NGFWs add application, user, IPS, URL, file and decryption to stateful inspection.
05

How stateful inspection tracks TCP

Go back to the security desk. The register line for a delivery is not just "Ravi". It says who is expected, from which shop, to which floor, when it was written, and whether the rider has arrived yet. A stateful firewall's connection entry is just as detailed, and for TCP it follows the conversation step by step. This chapter opens the register.

What a connection entry contains

The 5-tuple
Protocol, source IP, source port, destination IP, destination port. This uniquely identifies a flow.
Interfaces
Which interface the flow came in on and which it leaves by (for example inside and outside).
NAT information
The real and mapped addresses and ports, linked to the translation table (show xlate).
State and flags
Where the TCP conversation is: waiting for the handshake, up, closing.
Timers and counters
Idle time, uptime, the timeout that applies, and bytes transferred.

The life of a TCP connection through the ASA

  1. SYN arrives on inside (PC1 10.0.1.10 port 51544 to 8.8.8.8 port 80). No entry exists, so this packet takes the slow path: route lookup, access check (security levels or the interface ACL), NAT rule lookup, then inspection policy.
  2. Allowed. The ASA builds a connection and a PAT translation (10.0.1.10/51544 becomes 203.0.113.2/51544). The connection is embryonic: half-open, waiting for the handshake to finish. The ASA also randomises the initial sequence number by default, so hosts with weak ISN generators are protected.
  3. SYN-ACK arrives on outside. It matches the entry. The ASA checks it is a valid reply (right flags, acknowledgment matches the SYN) and forwards it, un-translating the destination back to 10.0.1.10.
  4. ACK from PC1. The handshake is complete; the connection is up. From now on every packet takes the fast path: a hash lookup in the connection table, no rule evaluation.
  5. Data flows. The TCP normaliser checks each segment is inside the expected sequence window and has sane flags. Counters and idle timers update.
  6. Close. FIN from one side makes the connection half-closed; when both FINs are acknowledged the entry is removed. A RST removes it at once. If nothing is seen for the idle timeout (1 hour by default for TCP), it is removed anyway.
PC1ASA conn table8.8.8.8 SYN entry built: embryonic SYN-ACK ACK flags UIO: up FIN / RST entry removed

The first packet builds the entry; everything after it is matched against the table.

Seeing it on the ASA

NK-ASA# show conn
1 in use, 3 most used

TCP outside  8.8.8.8:80 inside  10.0.1.10:51544, idle 0:00:02, bytes 1543, flags UIO

NK-ASA# show conn detail
1 in use, 3 most used
Flags: A - awaiting responder ACK to SYN, a - awaiting initiator ACK to SYN,
       B - TCP probe for server, b - TCP state-bypass or nailed,
       I - initiator data, i - incomplete, O - responder data, U - up, X - inspected by service module

TCP outside: 8.8.8.8/80 inside: 10.0.1.10/51544,
    flags UIO, idle 2s, uptime 4s, timeout 1h0m, bytes 1543

Read the line left to right: the outside end is 8.8.8.8 port 80, the inside end is 10.0.1.10 port 51544. Flags U (up), I (initiator sent data) and O (responder sent data) mean a healthy, two-way session. A connection stuck with "awaiting" flags (A, a) and no I or O means the handshake never finished: the server did not answer or the reply went elsewhere.

The log tells the same story. With logging buffered informational you see a build and a teardown for each connection:

%ASA-6-302013: Built outbound TCP connection 41 for outside:8.8.8.8/80 (8.8.8.8/80) to inside:10.0.1.10/51544 (203.0.113.2/51544)
%ASA-6-302014: Teardown TCP connection 41 for outside:8.8.8.8/80 to inside:10.0.1.10/51544 duration 0:00:01 bytes 1543 TCP FINs

The teardown reason is gold for troubleshooting: TCP FINs is a normal close; TCP Reset-O or Reset-I means the outside or inside host sent a reset; SYN Timeout means the handshake never completed; Conn-timeout means the idle timer expired.

State also protects you

Because the firewall understands TCP, it can defend against abuse of TCP itself. Embryonic connection limits (configured with the Modular Policy Framework using set connection embryonic-conn-max) make the ASA answer SYNs on the server's behalf with TCP intercept during a SYN flood, so the server's table never fills. Packets that do not fit the state (an ACK for a connection that does not exist, a SYN-ACK nobody asked for) are dropped and counted in show asp drop.

Worked example. A server team complains that sessions to 8.8.8.8 "die after lunch". show conn shows the database sync connection idle for 0:59:50, then it vanishes, and the log shows Conn-timeout. The application keeps an idle TCP session open for 90 minutes. Fix options: enable TCP keepalives on the application, or raise the idle timeout for that one flow class with MPF (set connection timeout idle), never globally.

Common mistake. Asymmetric routing. If the SYN leaves through firewall A but the SYN-ACK returns through firewall B, B has no entry and drops the reply. Stateful firewalls need both directions of a flow to pass the same device (or a cluster that shares state).

Exam trap. Only the first packet of a flow is checked against the access policy. Changing an ACL does not affect connections that already exist; you must clear them (clear conn address ...) or wait for them to close.

The half-open storm

A public web server behind an ASA became unreachable every evening. show conn count jumped from 300 to 180,000 in minutes, and show conn was full of entries with awaiting-ACK flags from thousands of internet sources to 10.0.2.10 port 443. It was a SYN flood. The team applied an MPF policy for that server with an embryonic connection limit, so the ASA began intercepting and validating handshakes itself. Legitimate users reconnected, and the ISP was asked to filter the rest upstream.

Lesson: the connection table is both your evidence and your defence.

"Walk me through what a stateful firewall does with a TCP SYN from inside."

Route lookup, policy check, NAT lookup and inspection on the slow path; if allowed, it creates an embryonic connection and translation, randomises the ISN, and forwards. The SYN-ACK is matched to the entry; after the final ACK the connection is up and later packets use the fast path. FIN or RST or the idle timer removes it. Mention the verification: show conn flags UIO, and 302013/302014 syslogs with the teardown reason.

Key takeaways

  • A connection entry holds the 5-tuple, interfaces, NAT, TCP state, timers and byte counts.
  • Only the first packet is checked against policy; the rest use the fast path.
  • Flags UIO mean a healthy two-way TCP session; awaiting flags mean the handshake did not finish.
  • Teardown reasons (TCP FINs, Reset-I/O, SYN Timeout, Conn-timeout) explain why a session ended.
  • State enables TCP defences: ISN randomisation, normalisation and TCP intercept.
06

UDP, ICMP, timeouts and inspection engines

TCP is a polite guest: it knocks (SYN), waits to be let in (SYN-ACK), and says goodbye (FIN). UDP just walks in and out with no greeting at all, ICMP is a courier who delivers notes about other conversations, and some applications, like FTP and voice calls, arrange a second meeting in a different room during the first one. A stateful firewall must handle all of them. This chapter shows how.

UDP: pseudo-state

UDP has no handshake and no close. The firewall still creates a connection entry when the first allowed packet passes, keyed on the same 5-tuple. A reply with the source and destination swapped matches the entry and is allowed back. Because there is no FIN, the only way the entry ends is the idle timeout: 2 minutes by default on the ASA. This "remember it until it goes quiet" approach is called pseudo-state or a UDP pseudo-connection.

ICMP: off by default on the ASA

ICMP echo (ping) is a request and a reply, so it can be tracked by identifier and sequence number. But the ASA does not track ICMP statefully by default. The echo request from inside leaves (high to low security), yet the echo reply from outside has no matching entry and is dropped. Two fixes exist; the correct one is to enable ICMP inspection, which is what the lab configuration does:

! Add ICMP to the default inspection class
policy-map global_policy
 class inspection_default
  inspect icmp
  inspect icmp error

inspect icmp creates a short-lived entry per echo so exactly one reply returns. inspect icmp error goes further: it lets ICMP error messages (TTL exceeded, unreachable) back in only when they refer to a real connection, and translates the addresses embedded inside them, which makes traceroute work through NAT. The lazy alternative, an outside ACL that permits all echo-replies, opens a hole for everyone.

Worked example: the ping that "fails" but the web works. PC1 can open the page on 8.8.8.8 but ping fails. The log shows %ASA-3-106014: Deny inbound icmp src outside:8.8.8.8 dst outside:203.0.113.2 (type 0, code 0). The echo reply is arriving and being denied because nothing tracks it. After adding inspect icmp, show conn briefly shows an ICMP entry and ping succeeds.

Timeouts: how long the register remembers

NK-ASA# show running-config timeout
timeout xlate 3:00:00
timeout pat-xlate 0:00:30
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 sctp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00

TCP idle 1 hour, half-closed 10 minutes, UDP 2 minutes, ICMP 2 seconds, PAT translations 30 seconds after their last connection closes. Change them per traffic class with MPF when one application needs it; changing them globally makes the table grow for everyone.

Why some applications need inspection engines

Some protocols break the simple one-connection model. They use a control channel to negotiate a secondary channel on ports that nobody could predict, and some write IP addresses inside the payload, which NAT would otherwise leave wrong. An inspection engine (Cisco also calls it application inspection; on routers, an application layer gateway or ALG) reads the control channel, opens a precise temporary pinhole for the secondary channel, and fixes embedded addresses.

Client ASAinspect ftpreads PORT/PASV FTP server control TCP 21 data: pinhole Pinhole = one exact address and port, only for this session, closed after use

The engine reads the port negotiated on the control channel and opens only that one data connection.

ProtocolThe problemWhat inspection does
FTP (TCP 21)Active mode: the server connects back to a port the client announced in a PORT command. Passive mode: the client connects to a port the server announced in a 227 PASV reply. Both carry an IP address inside the text.Reads PORT/PASV, opens a pinhole for exactly that data connection, rewrites the embedded IP when NAT is used, and can block dangerous commands.
DNS (UDP 53)Replies could be spoofed or oversized; UDP entries would linger for 2 minutes.Matches the reply ID to the query, allows only one reply per query (DNS Guard) then tears the entry down, enforces message length, and can rewrite A records for NAT.
SIP (UDP/TCP 5060)The call setup carries an SDP body listing the IPs and RTP media ports for voice and video.Reads SDP, opens pinholes for the media streams, fixes addresses for NAT. It cannot see inside SIP over TLS (5061) without decryption.

The Modular Policy Framework, briefly

On the ASA, inspection lives in the Modular Policy Framework (MPF): a class-map selects traffic, a policy-map says what to do with it (inspect, set connection limits and timeouts), and a service-policy applies it globally or to one interface. The factory configuration already has class-map inspection_default (matching default-inspection-traffic), a policy-map global_policy with common engines such as dns, ftp, sip, esmtp and tftp, and service-policy global_policy global. ICMP is not in the default list.

NK-ASA# show service-policy
Global policy:
  Service-policy: global_policy
    Class-map: inspection_default
      Inspect: icmp, packet 8, lock fail 0, drop 0, reset-drop 0

Common mistake. Opening a wide range of high ports "for FTP data" or "for voice media" in an ACL. That is what inspection exists to avoid. Enable the engine and let it open pinholes per session.

Exam trap. Inspection engines cannot read encrypted control channels (FTPS, SIP over TLS) unless the firewall decrypts them. And the ASA's default ICMP behaviour is not stateful: expect a question where ping replies are dropped until inspect icmp is added.

Calls with one-way audio

After a firewall migration, IP phones at a branch could ring and connect calls, but callers heard silence in one direction. The SIP signalling passed (it was permitted on 5060), but show service-policy showed no SIP inspection on the new device, so the RTP media ports announced in SDP were never opened and NAT left private addresses inside the SDP. Enabling inspect sip in global_policy fixed audio on the next call.

Lesson: "signalling works, media fails" points straight at application inspection.

"Why does FTP need special handling on a firewall?"

FTP uses a control channel on TCP 21 and a separate data channel whose port is negotiated inside the control channel (PORT for active, PASV for passive), and it embeds IP addresses in that text. A plain stateful firewall cannot predict the data port and NAT would break the embedded address. FTP inspection reads the negotiation, opens a one-off pinhole and rewrites addresses. Mention that the same idea applies to SIP media and that encryption blinds the engine.

Key takeaways

  • UDP uses pseudo-state: entries built on the first packet and removed by the idle timeout (2 minutes).
  • ASA ICMP is not stateful by default; inspect icmp (and inspect icmp error) fixes replies and traceroute.
  • Default timeouts: TCP 1 h, half-closed 10 min, UDP 2 min, ICMP 2 s, PAT xlate 30 s.
  • Inspection engines follow control channels, open pinholes and fix embedded addresses (FTP, DNS, SIP).
  • MPF = class-map, policy-map, service-policy; global_policy is on by default.
07

Zones, security levels and routed vs transparent mode

An airport has areas of different trust: the public hall, the checked-in departure area, and the airside where only crew go. Moving from the public hall into departures needs a security check; moving the other way is easy. Firewalls divide a network in exactly the same way, into zones of different trust, and apply rules at the borders between them.

The classic three zones

  • Inside: users and internal servers. Highest trust.
  • Outside: the internet. No trust.
  • DMZ (demilitarised zone): servers that the internet must reach, such as a public web server. Medium trust. If a DMZ server is compromised, the attacker is still separated from the inside by the firewall policy.

Real designs add more: a management zone, a partner zone, a guest zone, a zone per application tier. The principle stays the same: group things of the same trust, and control every path between groups.

ASA security levels

The ASA expresses trust as a security level from 0 (least trusted) to 100 (most trusted) on each interface. When you name an interface inside, the ASA sets level 100 automatically; any other name gets 0 until you change it. The default rules, with no ACL applied, are simple:

Traffic directionDefault behaviour
Higher level to lower level (inside 100 to outside 0)Allowed, and replies return through the connection table
Lower level to higher level (outside 0 to dmz 50)Denied unless an ACL permits it
Same level to same levelDenied unless same-security-traffic permit inter-interface
In and out of the same interface (hairpin)Denied unless same-security-traffic permit intra-interface

Once you apply an ACL to an interface with access-group, the ACL replaces the security-level behaviour for traffic entering that interface, including an implicit deny at the end. Security levels are a starting point, not a policy.

! The lab ASA interfaces
interface GigabitEthernet0/0
 nameif outside
 security-level 0
 ip address 203.0.113.2 255.255.255.248
interface GigabitEthernet0/1
 nameif inside
 security-level 100
 ip address 10.0.1.1 255.255.255.0
interface GigabitEthernet0/2
 nameif dmz
 security-level 50
 ip address 10.0.2.1 255.255.255.0
NK-ASA# show nameif
Interface                Name                     Security
GigabitEthernet0/0       outside                    0
GigabitEthernet0/1       inside                   100
GigabitEthernet0/2       dmz                       50

Zones on other Cisco firewalls

The IOS zone-based firewall on routers uses named zones with no numbers: traffic between interfaces in the same zone is allowed, traffic between different zones is denied until you create a zone-pair with a policy that inspects, passes or drops it, and the router itself is the special self zone. Secure Firewall Threat Defense uses security zones as objects inside access control rules; there are no security levels, and every allowed path is an explicit rule. The idea is the same everywhere; only the syntax changes.

Routed mode 10.0.1.0/24 ASA hop 203.0.113.0/29 two subnets, ASA is the gateway NAT, routing, VPN, DHCP Transparent mode hosts ASAbump router one subnet on both sides bridge group + BVI for management Both modes: stateful inspection, ACLs, inspection engines transparent adds no IP hop, so hosts and routers need no changes

Routed mode is a Layer 3 hop; transparent mode is a stateful Layer 2 "bump in the wire".

Deployment modes: routed vs transparent

In routed mode (the default) the ASA is a Layer 3 hop. Each interface has an IP address in a different subnet, hosts use the ASA (or a router behind it) as their gateway, and the ASA can do NAT, static and dynamic routing, DHCP and VPN termination. The lab ASA is in routed mode.

In transparent mode the ASA is a Layer 2 firewall, a bump in the wire. Its interfaces are placed in a bridge group and have no IP addresses; a BVI (bridge virtual interface) holds one management address in the same subnet. Hosts keep their existing gateway. It still does stateful inspection, ACLs and application inspection. You choose it when you must insert a firewall into an existing network without re-addressing anything.

! Transparent mode (changing mode erases the running configuration)
firewall transparent
interface GigabitEthernet0/0
 nameif outside
 bridge-group 1
 security-level 0
interface GigabitEthernet0/1
 nameif inside
 bridge-group 1
 security-level 100
interface BVI1
 ip address 10.0.1.2 255.255.255.0
! Non-IP traffic such as BPDUs needs an EtherType ACL
access-list L2-ALLOW ethertype permit bpdu

Transparent-mode facts to remember: ARP passes (and can be inspected); non-IP traffic is dropped unless an EtherType ACL permits it; routing protocol packets can pass through if permitted, but the ASA does not take part in them. Threat Defense has the same routed and transparent modes plus IPS-only interface modes (inline sets and passive), covered in the sec-fw-deploy module.

Worked example. A hospital needs a firewall between its lab-equipment VLAN (10.20.5.0/24, gateway 10.20.5.1 on the core switch) and the core. Re-addressing 60 medical devices is not allowed. A transparent firewall is cabled between the access switch and the core, both interfaces in bridge-group 1, BVI 10.20.5.250. The devices keep gateway 10.20.5.1, and now every flow passes stateful inspection.

Common mistake. Running firewall transparent on a live box. Changing the firewall mode clears the configuration. Back up first, and plan the change in a window.

Exam trap. Two interfaces with the same security level cannot pass traffic by default, even if both are "trusted". And in transparent mode the BVI address is for management only; it is not the hosts' gateway.

The new DMZ that could not talk to the old DMZ

An engineer added a second DMZ interface, dmz2, and gave it security level 50 to match dmz. Application servers in dmz2 could not reach the database in dmz, although the ACLs looked right. Syslog showed the traffic denied because both interfaces had the same level. The team chose to set dmz2 to level 40 and permit only the database port with an ACL, rather than enabling same-security traffic for everything.

Lesson: equal security levels mean "no traffic" until you decide otherwise.

"When would you deploy a firewall in transparent mode?"

When you need to insert stateful inspection into an existing segment without re-addressing hosts or changing gateways: the firewall bridges two VLAN segments of the same subnet, with a BVI for management. It still enforces ACLs and inspection. Mention the trade-offs: no dynamic routing participation, EtherType ACLs for non-IP traffic, and that changing modes wipes the configuration.

Key takeaways

  • Zones group assets of equal trust; control every path between zones. Inside, outside, DMZ is the classic set.
  • ASA security levels: high to low allowed, low to high needs an ACL, equal levels blocked by default.
  • An applied ACL replaces the security-level default for that interface.
  • Routed mode is an L3 hop with NAT, routing and VPN; transparent is an L2 bump with a bridge group and BVI.
  • Changing firewall mode clears the configuration.
08

NAT basics for firewalls

A company has one reception phone number. When an employee calls a supplier, the supplier sees the reception number, not the employee's desk extension. When the supplier calls back, the receptionist remembers who made the call and transfers it. Network Address Translation (NAT) does the same for IP addresses, and on the internet edge the firewall is almost always the "receptionist". You met NAT in CCNA on routers; here we look at it through the firewall's eyes.

The words the ASA uses

Real address
The address the host actually has (PC1 is 10.0.1.10).
Mapped address
The address it is translated to (203.0.113.2).
Translation (xlate)
A table entry linking real and mapped, shown with show xlate. Each connection in show conn points to one.
Dynamic PAT
Many real hosts share one mapped IP, told apart by port (also called NAT overload).
Dynamic NAT
Real hosts borrow addresses from a pool of mapped IPs, one-to-one while in use.
Static NAT
A permanent one-to-one mapping, needed for servers the internet must reach.
Identity NAT
Translating an address to itself, used to exempt traffic (for example site-to-site VPN) from other NAT rules.

How the lab translates

! Object (auto) NAT: inside and DMZ hide behind the outside interface
object network INSIDE-NET
 subnet 10.0.1.0 255.255.255.0
 nat (inside,outside) dynamic interface
object network DMZ-NET
 subnet 10.0.2.0 255.255.255.0
 nat (dmz,outside) dynamic interface

dynamic interface means PAT to whatever address the outside interface has (203.0.113.2). When PC1 opens a connection, the ASA keeps the source port if it is free, or picks another, and records the mapping:

NK-ASA# show xlate
1 in use, 2 most used
Flags: D - DNS, e - extended, I - identity, i - dynamic, r - portmap,
       s - static, T - twice, N - net-to-net
TCP PAT from inside:10.0.1.10/51544 to outside:203.0.113.2/51544 flags ri idle 0:00:04 timeout 0:00:30

The flags r (portmap, meaning PAT) and i (dynamic) tell you what kind of translation it is. The 30-second timeout starts after the last connection using it closes.

10.0.1.10 : 51544 10.0.1.50 : 51544 10.0.2.10 : 40022 NK-ASAxlate table 203.0.113.2 : 51544 203.0.113.2 : 12001 203.0.113.2 : 40022 Same source port in use? The ASA picks a different mapped port.

Dynamic PAT: many real hosts share the outside address, told apart by the mapped port.

Publishing a server: static NAT plus an ACL

PAT alone only works for connections that start inside. To let the internet reach the DMZ web server, you need a permanent mapping and a rule, because outside (0) to dmz (50) is low to high:

! Static NAT for the web server
object network WEB-SRV
 host 10.0.2.10
 nat (dmz,outside) static 203.0.113.3
! The ACL permits the REAL address, not the mapped one
access-list OUTSIDE-IN extended permit tcp any host 10.0.2.10 eq www
access-group OUTSIDE-IN in interface outside

That comment is the single most tested ASA NAT fact: since ASA 8.3, interface ACLs use the real (untranslated) IP address. The ASA un-translates the destination first, then checks the ACL. Writing the public 203.0.113.3 in the ACL is a classic migration bug; the module sec-asa-acl calls it "the real-IP rule".

Object NAT and twice NAT (a preview)

The ASA has two ways to write NAT. Object NAT (auto NAT) sits inside a network object and translates only the source, as above. Twice NAT (manual NAT) is a separate rule that can match and translate both source and destination, used for policy NAT and VPN exemptions. They are evaluated in order: section 1 (manual rules), section 2 (object rules, statics before dynamics), section 3 (manual rules marked after-auto). Details and practice come in the sec-asa-nat module.

NAT is not a security control

PAT has a side effect that people mistake for security: an unsolicited packet from the internet to 203.0.113.2 has no translation to follow, so it goes nowhere. But the protection actually comes from the stateful policy, not from NAT. IPv6 networks usually use no NAT at all and are just as protected by a stateful firewall. Hiding addresses slows reconnaissance a little; it does not replace access control.

Worked example. PARTNER (198.51.100.10) runs curl 203.0.113.2. There is no static NAT for 203.0.113.2 port 80, no existing connection, and outside (0) to anything higher is denied. The ASA logs %ASA-2-106001: Inbound TCP connection denied from 198.51.100.10/40001 to 203.0.113.2/80 flags SYN on interface outside. If you later add the WEB-SRV static and ACL above, PARTNER can reach 203.0.113.3, and show xlate shows a line with flag s (static).

Common mistake. Forgetting the NAT for a new internal subnet. Users in 10.0.3.0/24 can reach the DMZ but not the internet: their traffic leaves with a private source and replies never return. show xlate shows no entries for them; add the subnet to an object NAT rule.

Exam trap. On ASA 8.3 and later, ACLs reference the real IP, never the mapped IP. And "NAT provides security" is a wrong answer; the stateful firewall provides the security.

Everyone lost the internet at 9:05

At 9:05 on a Monday, users reported random websites failing. show xlate count was at tens of thousands and syslog showed PAT port allocation failures for the interface address. A new backup agent was opening thousands of short connections per minute to a cloud service, exhausting ports on the single outside address. The team moved backup traffic to its own PAT pool of additional public addresses from the ISP block and rate-limited the agent.

Lesson: PAT has a finite port budget per mapped address; big flows need their own addresses.

"On an ASA, why can't you write the public IP of a server in the outside ACL?"

Since 8.3 the ASA un-translates the destination before the ACL check, so the ACL must reference the real (private) address and the service port. The static NAT publishes the server; the ACL, using the real IP, allows the traffic. Add that packet-tracer shows the UN-NAT phase before the ACCESS-LIST phase, which proves it.

Key takeaways

  • Real vs mapped addresses; show xlate shows translations, show conn the sessions using them.
  • Dynamic PAT lets many hosts share one address; static NAT publishes servers.
  • Publishing a server needs static NAT plus an ACL, because outside to DMZ is low to high.
  • ASA 8.3+ ACLs always use the real IP address.
  • NAT is not security; the stateful policy is.
09

IDS vs IPS: passive and inline, signature and anomaly

A shop can protect itself in two ways. It can install CCTV cameras that record everything and alert the manager when something looks wrong; the camera cannot stop a thief, but it tells you what happened. Or it can put a guard at the door who checks bags and physically stops anyone carrying stolen goods. The camera is an IDS; the guard is an IPS. Both look inside traffic for attacks, which a stateful firewall alone does not do.

IDS: intrusion detection, passive

An intrusion detection system receives a copy of the traffic, from a switch SPAN port (port mirroring) or a network TAP. It analyses the copy and raises alerts. Because it is out of the path:

  • It adds no latency and cannot break traffic if it fails or is overloaded.
  • It cannot stop the packet that triggered the alert; by the time it alerts, that packet has already arrived. Some IDS can send TCP resets or ask a firewall to block the source afterwards, but the first packets get through.
  • SPAN can drop copies under load, so an IDS may miss things.

IPS: intrusion prevention, inline

An intrusion prevention system sits inline: every packet passes through it. When traffic matches a malicious pattern, it can drop the packet, reset the connection, or block the source for a while, before the attack reaches the target. The costs: it adds some latency, it must be sized for full throughput, and a false positive blocks real business traffic. If the IPS engine fails, the design must choose fail-open (traffic keeps flowing uninspected, favouring availability) or fail-closed (traffic stops, favouring security); hardware bypass interfaces implement fail-open physically.

IDS (passive) Internet Switch Servers IDS SPAN copy alerts only, no latency IPS (inline) Internet IPS Servers every packet passes through can drop, reset, block adds latency, fail-open or fail-closed

Same detection engine, different position. Position decides whether it can prevent or only detect.

How attacks are detected

MethodHow it worksGood atWeak at
Signature-basedMatches known patterns (bytes, protocol fields, sequences) described in rulesKnown attacks, very accurate, few false positives when tunedNew (zero-day) attacks with no signature yet
Anomaly / behaviour-basedLearns a baseline of normal traffic and alerts on deviationsUnknown attacks, unusual volumes, new behaviourMore false positives; the baseline must be clean
Policy-basedAlerts when traffic breaks a defined policy (Telnet on a server VLAN)ComplianceOnly as good as the policy
Reputation-basedBlocks known-bad IPs, domains and URLs from threat intelligenceCheap, fast, catches C2New infrastructure not yet listed

In Cisco Secure Firewall Threat Defense, the IPS engine is Snort 3, fed with rules from Talos. Reputation blocking is Security Intelligence. You will build these policies in the sec-ftd-ips module.

True, false, positive, negative

True positive
An attack happened and the IPS alerted. Good.
False positive
Normal traffic triggered an alert (or a block). Wastes analyst time; inline, it breaks applications.
True negative
Normal traffic, no alert. Good.
False negative
An attack happened and nothing alerted. The most dangerous outcome.

Tuning is the ongoing work of reducing false positives (disable rules that do not apply to your systems, add precise exceptions) without creating false negatives.

Worked example: reading an inline event. The web server in the DMZ is protected by an inline IPS policy:

Intrusion event (nk-sim)
Priority     1
Message      SERVER-WEB directory traversal attempt
Source       198.51.100.44:53112  zone outside
Destination  10.0.2.10:80         zone dmz
Inline result  Dropped

This is the path traversal probe from chapter 3. Because the IPS is inline, the request never reached 10.0.2.10. Had the same sensor been on a SPAN port, the event would say "would have dropped" and the request would have arrived.

Common mistake. Deploying a brand-new IPS policy straight into blocking mode on a production link. Start in detection (or "inline tap"/monitor) mode, watch the events for a few days, tune the false positives, then switch to prevention.

Exam trap. An IDS on a SPAN port cannot drop the triggering packet. "Zero-day" plus "which detection method" points to anomaly-based. And an IPS cannot inspect encrypted payloads unless the traffic is decrypted first.

The payroll outage caused by security

On payday, the payroll web application stopped accepting logins. The server was healthy and the firewall showed allowed connections, yet every login POST reset. The IPS events showed a newly enabled SQL injection rule matching a login field that legitimately contained special characters. The team added a narrow exception for that one rule, that one destination and that one URL path, kept the rule active for everything else, and logins recovered in minutes.

Lesson: an inline IPS is part of the application path; tune it with the same care as a firewall rule.

"What is the difference between an IDS and an IPS, and when would you choose each?"

An IDS is passive: it gets a copy via SPAN or TAP, alerts, adds no latency, and cannot stop the first packets. An IPS is inline: it can drop and reset in real time, but adds latency and risk from false positives and needs a fail-open or fail-closed decision. Choose IDS for visibility where availability is critical or during tuning; choose IPS where you must stop attacks, such as in front of internet-facing servers. Mention detection methods: signature for known threats, anomaly for unknown.

Key takeaways

  • IDS = passive copy (SPAN/TAP), alerts only; IPS = inline, can drop, reset and block.
  • IPS adds latency and needs a fail-open or fail-closed decision.
  • Signature finds known attacks; anomaly finds unknown ones with more false positives; reputation blocks known-bad sources.
  • False negatives are the most dangerous; false positives break applications when inline.
  • Start in detection mode, tune, then prevent. Cisco's engine is Snort 3 in Threat Defense.
10

Firewall placement designs: perimeter, DMZ, internal and data center

Think of an airport. There is a fence and a check-in gate at the edge (the perimeter). There is a public arrivals hall that anyone may enter but that leads nowhere important (the DMZ). Inside, security gates separate the terminals, the staff areas and the baggage hall (internal segmentation). And the cargo vault has its own guards, built for heavy traffic (the data center). A firewall is only as useful as where you put it. This chapter is about placement: which design fits which problem.

Two directions of traffic

North-south traffic crosses the boundary of your network: users to the internet, customers to your website. East-west traffic stays inside: a laptop to a file server, a web server to a database. The classic perimeter firewall sees only north-south traffic. Attackers who get in (chapter 2: phishing, a vulnerable web server) move east-west, host to host. This is lateral movement, and the internal and data center designs below exist to stop it.

Internet Edge firewall DMZ: web, mail Campus core Users, cameras Internal FW Data center north-south east-west

One edge firewall with a DMZ leg handles north-south traffic; an internal firewall guards the data center from east-west traffic.

Design 1: the perimeter (internet edge)

The simplest design: one firewall between inside and outside. Users browse out, nothing comes in unless it is a reply (chapter 5). This is what every small office has, and it is where most people start. In production you deploy the edge as a high-availability pair (active/standby with stateful failover, covered in sec-asa-ha), because the edge firewall is a single point of failure for the whole company.

Design 2: the DMZ, or screened subnet

A DMZ (demilitarised zone), also called a screened subnet, holds the servers the internet must reach: the public website, the mail gateway, a reverse proxy, the VPN portal. Two ways to build it:

DesignHowTrade-off
Three-leggedOne firewall with three interfaces: outside, inside, dmzCheap and simple; one device (or one HA pair) to manage, but one policy mistake exposes both zones
Back-to-backAn outer firewall in front of the DMZ, an inner firewall between the DMZ and the insideTrue defence in depth, often two different vendors; more cost and two policies to keep aligned

Our lab ASA, NK-ASA, is a three-legged design: outside 203.0.113.2 (level 0), inside 10.0.1.0/24 (level 100) and dmz 10.0.2.0/24 (level 50) with the web server WEB at 10.0.2.10. The golden rules: the internet may reach only the published DMZ service; the DMZ may not start connections to the inside; the inside may manage the DMZ.

NK-ASA# show nameif
Interface                Name                     Security
GigabitEthernet0/0       outside                    0
GigabitEthernet0/1       inside                   100
GigabitEthernet0/2       dmz                       50

Design 3: internal segmentation

An internal segmentation firewall sits between groups of internal systems: users and servers, the payment (PCI) network and everything else, the camera and building-control (OT) network and the office. Macro-segmentation uses VLANs, firewall zones and VRFs so every path between groups crosses a policy point. A single ASA trunk can carry many segments:

! Servers and cameras as separate firewall interfaces on one trunk
interface GigabitEthernet0/3.20
 vlan 20
 nameif servers
 security-level 70
 ip address 10.0.20.1 255.255.255.0
interface GigabitEthernet0/3.30
 vlan 30
 nameif cameras
 security-level 20
 ip address 10.0.30.1 255.255.255.0

Micro-segmentation goes further: policy per workload or application tier, by tag or group instead of IP address. Cisco examples: TrustSec Security Group Tags (assigned by ISE, enforced with SGACLs), ACI endpoint groups with contracts, Secure Workload host-based policy, and in the cloud, security groups per instance. It is a building block of zero trust, which sec-concepts covers.

Design 4: the data center and cloud

Data center firewalls see huge east-west volumes: server to server, app to database, backup streams. Design priorities change: throughput, low latency and scale. Common patterns:

  • Clustering several firewalls into one logical device for throughput (preview of sec-asa-ha).
  • Transparent mode (chapter 7) to insert a firewall between the server VLAN and its gateway without re-addressing.
  • Service insertion in a fabric (for example an ACI service graph) so only selected flows are redirected through the firewall.
  • Virtual firewalls (ASA Virtual, Threat Defense Virtual) in private and public clouds, plus the cloud's native security groups, for hybrid designs where the same policy follows the workload.

Worked example: choosing a placement. A 300-person company has: a public website, 250 users, a PCI payment server, 40 IP cameras, and a small server room. Design: an edge HA pair with a three-legged DMZ for the website; users, cameras and servers as separate firewall interfaces (cameras at a low level, no access to users); the PCI server in its own segment reachable only from the checkout application on TCP 8443; logging from every boundary. Result: the website breach, the camera breach or the phished laptop each stays in its own compartment, and the PCI audit covers one small segment instead of the whole network.

Common mistakes. Putting a public server on the inside network and "protecting" it with NAT. Creating twenty VLANs but routing them all on the core switch with no ACLs, which is addressing, not segmentation. Allowing "dmz to inside any" for convenience, which makes the DMZ pointless.

Exam traps. A perimeter firewall controls north-south; containing ransomware spread or reducing PCI scope expects segmentation (east-west). "Screened subnet" means DMZ. Back-to-back DMZ with different vendors is the defence-in-depth answer; three-legged is the cost-effective answer.

Ransomware that stopped at the door

A logistics firm suffered a ransomware infection through a phished laptop in the sales VLAN. The malware scanned for SMB (TCP 445) on every reachable subnet. Two years earlier the firm had moved its servers behind an internal firewall that allowed only application ports from user VLANs, and used TrustSec tags so user devices could not reach each other's file shares. The infection encrypted one laptop and one sales share; the warehouse systems and ERP database were untouched. The internal firewall's deny logs for TCP 445 told the SOC exactly which host was patient zero.

Lesson: placement turns a company-wide incident into a local one, and the logs at each boundary tell the story.

"Where would you place firewalls in a new office with a public website and a server room?"

Walk the traffic directions. North-south: an HA edge firewall with a DMZ (three-legged, or back-to-back for higher assurance) holding only the public services. East-west: internal segmentation between users, servers, cameras and any PCI systems, with micro-segmentation for critical tiers. Mention logging at every boundary and that the DMZ may never initiate to the inside.

Key takeaways

  • North-south crosses the perimeter; east-west stays inside and carries lateral movement.
  • Perimeter: inside/outside edge, deployed as an HA pair.
  • DMZ (screened subnet): three-legged or back-to-back; the DMZ never initiates to the inside.
  • Internal segmentation: macro with VLANs, zones and VRFs; micro by tag or group (TrustSec, ACI, Secure Workload).
  • Data center and cloud: clustering, transparent insertion, service insertion and virtual firewalls for hybrid designs.
11

ASA and Threat Defense at a high level, and why logging matters

Picture two security guards. The first is a veteran with a register: he checks every visitor against the rules, writes allowed visitors in the book and lets their replies back in. That is the Cisco ASA. The second guard has the same register, plus an X-ray machine, an ID scanner and a radio to headquarters, where one supervisor writes the rules for every building. That is Cisco Secure Firewall Threat Defense (FTD) managed by Management Center (FMC). Both guards also keep a diary. Without the diary, nobody can prove what happened at the door. That diary is logging, the second half of this chapter.

Cisco ASA: the stateful firewall you will configure first

The Adaptive Security Appliance software is a mature stateful firewall and VPN headend. It runs on Cisco Secure Firewall hardware and as ASA Virtual in private and public clouds. Everything in chapters 5 to 8 is ASA behaviour: the connection table, security levels, nameif, inspection engines in the Modular Policy Framework, and NAT. You manage it with the CLI, with ASDM (a GUI for one device), or centrally with Security Cloud Control. Typical uses today: remote-access and site-to-site VPN headend, pure Layer 3/4 stateful filtering, and multiple context mode (several virtual firewalls in one box).

A simplified ASA packet walk, the one you will prove with packet-tracer in sec-asa-tshoot:

  1. The packet arrives. Is there an existing connection? If yes, fast path: forward it (with its NAT) and skip the policy checks.
  2. If not: route lookup and un-NAT (find the real destination), then the interface ACL or security-level check.
  3. Inspection engines, then NAT, then a new connection entry is created.
  4. Egress interface, next hop, transmit, and a syslog message such as 302013.

Threat Defense: an NGFW with two engines

Threat Defense is Cisco's NGFW image. Inside it are two engines working together:

  • LINA, derived from ASA code: interfaces, routing, NAT, Layer 3/4 access rules, VPN and the connection table. So show conn, show xlate, packet-tracer and capture still work on the FTD CLI.
  • Snort 3: the deep inspection engine for application identification, URL filtering, user identity, Security Intelligence, intrusion prevention and file/malware policy.

There is no configuration mode on the FTD CLI for policy. You build policy in Management Center (on-premises, virtual, or cloud-delivered) or in Device Manager (on-box, one device), then press Deploy. The central object is the access control policy: an ordered list of rules that can match zones, networks, ports, applications, URLs and users, with an intrusion policy and a file policy attached to allow rules.

Cisco ASA stateful L3/L4 + VPN managed: CLI, ASDM policy: ACLs, levels Threat Defense LINA: L3/L4 Snort 3: L7 managed: FMC or FDM, Deploy policy: access control rules Logs: syslog, SIEM

ASA is a stateful firewall; Threat Defense adds the Snort 3 engine for Layer 7 inspection. Both must send logs to a central place.

PointASAThreat Defense
EngineASA software (stateful)LINA (stateful) + Snort 3 (NGFW, IPS)
ManageCLI, ASDM, Security Cloud ControlManagement Center, Device Manager, Security Cloud Control
PolicyInterface ACLs, security levels, MPFAccess control policy with zones, apps, URLs, users
Threat featuresNone built in beyond inspectionIPS, Security Intelligence, file and malware
EventsSyslog, NetFlow (NSEL)Connection, intrusion, file and SI events to FMC, plus syslog

Why logging matters

A firewall that does not log is a guard with no diary. Logs give you five things: troubleshooting (which rule dropped the packet), detection (a burst of denies is a scan), incident response (a timeline of who talked to whom), compliance (standards such as PCI DSS require logging and regular review), and policy tuning (rules that never match can be removed). The segmentation story in chapter 10 was solved by deny logs.

ASA messages have the form %ASA-severity-ID: text. Severity runs from 0 to 7: 0 emergencies, 1 alerts, 2 critical, 3 errors, 4 warnings, 5 notifications, 6 informational, 7 debugging. A lower number is more severe, and choosing a level includes every level below it.

! Sensible ASA logging baseline
logging enable
logging timestamp
logging device-id hostname
logging buffer-size 524288
logging buffered informational
! Send a copy to the central syslog/SIEM server
logging trap informational
logging host inside 10.0.1.200
NK-ASA# show logging
Syslog logging: enabled
    Timestamp logging: enabled
    Buffer logging: level informational, 128 messages logged
    Trap logging: level informational, facility 20, 128 messages logged
        Logging to inside 10.0.1.200
    Device ID: hostname "NK-ASA"

On Threat Defense you choose logging per access rule: at the beginning and/or end of the connection. End-of-connection gives the full picture (bytes, duration, application); a block rule can log only at the beginning, because the connection never gets an end.

Common mistakes. Leaving logging disabled (it is off until logging enable). No timestamps and no NTP, so logs from three devices cannot be lined up. Logging at debugging to the console on a busy firewall, which can overload the CPU. Keeping logs only in the local buffer, which wraps and is lost on reload.

Exam traps. 106001 is severity 2, but 302013 connection builds are severity 6: a trap level of warnings sends the denies and hides every build. FTD policy is changed in FMC or FDM and takes effect only after Deploy. Snort handles Layer 7; LINA handles routing, NAT and Layer 3/4.

The breach nobody could date

A retailer discovered a skimming script on its web server in the DMZ. The investigators asked a simple question: when did the server first talk to the unknown host? The ASA logged only to its local buffer at warnings, so connection builds were never recorded, and the buffer had wrapped long ago. The team rebuilt the timeline from the web server's own logs, weeks later. The fix: logging trap informational to a SIEM, NTP on every device, and FTD connection events logged at end of connection.

Lesson: you cannot investigate what you did not record. Decide logging before the incident, not after.

"What is the difference between ASA and Threat Defense?"

ASA is a stateful Layer 3/4 firewall and VPN headend managed by CLI or ASDM. Threat Defense is the NGFW: an ASA-derived LINA engine for routing, NAT and L3/L4 rules plus Snort 3 for application control, URL filtering, IPS and file/malware inspection, managed by Management Center or Device Manager with a deploy step. Add that both should log centrally, and name one syslog ID.

Key takeaways

  • ASA: stateful firewall and VPN headend; CLI and ASDM; ACLs and security levels.
  • Threat Defense: LINA (L3/L4, NAT, VPN) plus Snort 3 (apps, URL, IPS, files); policy in FMC or FDM, then Deploy.
  • Logs serve troubleshooting, detection, incident response, compliance and tuning.
  • Syslog severity 0 to 7; lower is more severe; a level includes all lower numbers.
  • Always: logging enabled, timestamps, NTP, and a copy to a central SIEM.
12

Troubleshooting workflow: watch a stateful firewall at work

When a parcel goes missing, a good courier company does not guess. It checks the tracking record: was it picked up, which hub scanned it, was it held at customs, and why. A firewall keeps exactly that kind of record for every flow. This chapter gives you a repeatable workflow, then walks through the lab Watch a stateful firewall at work step by step, so you know what every output means before you type it.

The five-question workflow

  1. Define the flow. Source IP, destination IP, protocol, destination port, and the interface it enters. "The internet is down" is not a flow; "PC1 10.0.1.10 to 8.8.8.8 TCP 80, entering inside" is.
  2. Did a connection get built? show conn address 10.0.1.10. An entry with flags UIO means the firewall did its job; look elsewhere. An entry stuck with awaiting flags means the reply is not coming back.
  3. Is it translated correctly? show xlate. No entry for an outbound flow usually means a missing NAT rule.
  4. What did the log say? show logging: 302013/302014 for built and torn down, 106001 or 106023 for denied, 305011 for translations, and the teardown reason.
  5. What would the firewall do, and what did the wire see? packet-tracer simulates a packet through every phase; capture shows real packets on an interface; show asp drop counts why packets were dropped.
1 Define5-tuple + in-if 2 show connbuilt? flags? 3 show xlateNAT right? 4 show loggingbuilt / denied 5 tracer, captureasp drop Each step either proves the firewall innocent or points to the exact phase that failed.

The same five questions work on the ASA, on Threat Defense and on almost any stateful firewall.

Lab walk-through, task 1: generate inside traffic

On PC1 run curl 8.8.8.8 and ping 8.8.8.8. Both succeed. The web request works because inside (100) to outside (0) is high to low. The ping works only because the lab ASA has inspect icmp in global_policy (chapter 6); without it the echo replies would be denied.

Task 2: read the connection and translation tables

On ASA1, type enable (the lab has no enable password; just press Enter), then:

NK-ASA# show conn
2 in use, 3 most used

TCP outside  8.8.8.8:80 inside  10.0.1.10:51544, idle 0:00:05, bytes 1543, flags UIO
ICMP outside  8.8.8.8:0 inside  10.0.1.10:1, idle 0:00:00, bytes 64, flags

NK-ASA# show xlate
2 in use, 3 most used
Flags: D - DNS, e - extended, I - identity, i - dynamic, r - portmap,
       s - static, T - twice, N - net-to-net
TCP PAT from inside:10.0.1.10/51544 to outside:203.0.113.2/51544 flags ri idle 0:00:05 timeout 0:00:30
ICMP PAT from inside:10.0.1.10/1 to outside:203.0.113.2/1 flags ri idle 0:00:00 timeout 0:00:30

The question in the lab is: which address does the internet server see as the source? Read the "to outside:" part of the PAT entry: 203.0.113.2, the ASA's outside interface, because INSIDE-NET uses dynamic interface PAT. Your ports and counters will differ; the pattern will not. If the connections have already closed, run the traffic again and look quickly, because PAT entries expire 30 seconds after their last connection.

Task 3: be the stranger

On PARTNER (198.51.100.10) run curl 203.0.113.2. It fails. Nothing on the inside started this conversation, so there is no connection entry, no static NAT publishes anything on 203.0.113.2 port 80, and outside (0) cannot open connections to a higher level without an ACL.

Task 4: find the evidence

NK-ASA# show logging
Syslog logging: enabled
    Buffer logging: level informational, 9 messages logged
%ASA-6-305011: Built dynamic TCP translation from inside:10.0.1.10/51544 to outside:203.0.113.2/51544
%ASA-6-302013: Built outbound TCP connection 41 for outside:8.8.8.8/80 (8.8.8.8/80) to inside:10.0.1.10/51544 (203.0.113.2/51544)
%ASA-6-302014: Teardown TCP connection 41 for outside:8.8.8.8/80 to inside:10.0.1.10/51544 duration 0:00:01 bytes 1543 TCP FINs
%ASA-2-106001: Inbound TCP connection denied from 198.51.100.10/40001 to 203.0.113.2/80 flags SYN  on interface outside

The lab asks for the message ID of the drop: 106001 (severity 2, critical). Read it aloud: an inbound TCP SYN from PARTNER to the public address was denied on the outside interface. That single line is stateful inspection proving itself.

Going further: packet-tracer, capture and ASP drops

! Simulate PC1's web flow through every phase
packet-tracer input inside tcp 10.0.1.10 51544 8.8.8.8 80
! Capture real packets on the outside interface
capture CAP-OUT interface outside match tcp host 198.51.100.10 host 203.0.113.2
show capture CAP-OUT
! Count why packets were dropped in the data path
show asp drop
NK-ASA# packet-tracer input inside tcp 10.0.1.10 51544 8.8.8.8 80
...
Result:
input-interface: inside
input-status: up
input-line-status: up
output-interface: outside
Action: allow

packet-tracer lists each phase (route lookup, access list, NAT, inspection, flow creation) and shows exactly which one allows or drops. A capture proves whether a packet actually arrived; no packet in the capture means the problem is upstream, not on the firewall.

Common mistake. Changing rules before collecting evidence. Once you edit the policy and clear connections, the original symptom is gone. Always capture show conn, show xlate and the relevant log lines first.

Exam trap. show conn shows sessions; show xlate shows translations; packet-tracer is a simulation and generates no real traffic; capture shows real packets. Know which tool answers which question.

"The firewall is blocking my ping"

After a firmware upgrade and a configuration restore from an old template, users could browse but not ping external hosts. The engineer defined the flow (10.0.1.10 to 8.8.8.8 ICMP), saw ICMP entries appear and vanish in show conn, and found %ASA-3-106014 Deny inbound icmp for the echo replies. show service-policy showed no ICMP inspection in the restored template. Adding inspect icmp under global_policy fixed it with no ACL change.

Lesson: follow the evidence; the log named the dropped packet and the service policy named the cause.

"A user says a website is unreachable through the ASA. What do you do first?"

Define the exact flow (source, destination, port, ingress interface), then check show conn address for a built connection and its flags, show xlate for the translation, and show logging for build, deny and teardown messages. Use packet-tracer to see which phase would drop it and capture to prove what is on the wire. Say you collect evidence before changing anything.

Key takeaways

  • Always start by defining the exact flow and its ingress interface.
  • show conn (sessions and flags), show xlate (NAT), show logging (built, denied, teardown reason).
  • In the lab, PC1 appears to the internet as 203.0.113.2 through interface PAT.
  • An unsolicited SYN from PARTNER is dropped and logged as %ASA-2-106001.
  • packet-tracer simulates, capture proves, show asp drop counts drop reasons.
13

Summary and exam checklist

You started with a security guard and a register. You now know what the register holds for TCP, UDP and ICMP, how the guard handles tricky visitors like FTP and SIP, how the building is divided into zones, how the reception number (NAT) works, when to use a camera (IDS) or a door guard (IPS), where to place firewalls so one breach does not sink the ship, how the ASA and Threat Defense differ, and why the guard's diary (logging) matters. Use this chapter as your revision sheet before the lab, the exam and the interview.

Know the enemythreats, vulnerabilities Control the pathstate, inspection, zones, NAT Look inside, containIDS/IPS, segmentation Prove it: show conn, show xlate, show logging, packet-tracer, captureevidence before change, every time

The whole module in one picture: understand threats, control paths, inspect and contain, and prove everything with evidence.

Can-do checklist

  • I can describe viruses, worms, trojans, rootkits, ransomware, phishing, DoS/DDoS, MITM, SQL injection and XSS, with one indicator and one defence each.
  • I can name the SCOR cloud threats: data breaches, insecure APIs, compromised credentials, DoS/DDoS.
  • I can compare software bugs, weak or hard-coded passwords, missing encryption, OS command injection, buffer overflow, path traversal, XSS and CSRF.
  • I can explain packet filter vs stateful vs proxy vs NGFW vs WAF.
  • I can walk a TCP connection through a stateful firewall and read show conn flags.
  • I can explain UDP pseudo-state, ASA ICMP behaviour, default timeouts and why FTP, DNS and SIP need inspection.
  • I can apply ASA security-level rules and choose routed or transparent mode.
  • I can read show xlate, explain PAT vs static NAT and the real-IP ACL rule.
  • I can compare IDS and IPS, and signature, anomaly, policy and reputation detection.
  • I can choose a firewall placement: perimeter, three-legged or back-to-back DMZ, internal segmentation and data center, and explain north-south vs east-west.
  • I can compare the ASA with Threat Defense (LINA plus Snort 3, managed by Management Center or Device Manager).
  • I can explain why logging matters, the syslog severities 0–7, and configure a logging baseline.
  • I can complete the lab and find message 106001 in the log.

Mini glossary

Connection table
The stateful firewall's memory of allowed flows (5-tuple, interfaces, NAT, state, timers).
Embryonic connection
A TCP connection whose handshake has not completed.
Pseudo-state
Tracking connectionless UDP by 5-tuple and idle timeout.
Inspection engine / ALG
Reads an application's control channel to open pinholes and fix embedded addresses.
Pinhole
A temporary, exact opening for one secondary connection.
Security level
ASA trust value 0–100 per interface.
BVI
Bridge virtual interface holding the management IP in transparent mode.
Xlate
A NAT translation entry.
False negative
An attack that produced no alert.
Lateral movement
An attacker moving east-west from host to host.
Screened subnet
Another name for a DMZ.
LINA / Snort 3
The two Threat Defense engines: L3/L4, NAT and VPN, and Layer 7 inspection.

Most tested facts

TopicRemember
Stateful vs ACLOnly the first packet is checked against policy; replies match the connection table. established checks flags only.
ASA defaultsHigh to low allowed; low to high needs an ACL; equal levels blocked; inside gets 100 automatically.
ICMP on ASANot stateful by default; add inspect icmp (and inspect icmp error for traceroute).
TimeoutsTCP 1 h, half-closed 10 min, UDP 2 min, ICMP 2 s, xlate 3 h, PAT xlate 30 s.
Transparent modeL2 bump, bridge group + BVI, EtherType ACL for non-IP, mode change erases config.
NATASA 8.3+ ACLs use the real IP; NAT is not security.
IDS vs IPSIDS passive (SPAN/TAP) cannot stop the first packet; IPS inline adds latency, fail-open or fail-closed.
DetectionZero-day points to anomaly-based; signature-based misses the unknown.
XSS vs CSRFXSS: attacker's script runs in the victim's browser. CSRF: forged request from the victim's authenticated browser.
Syslog IDs302013/302014 TCP built/teardown, 305011 dynamic translation, 106001 inbound TCP denied, 106023 denied by ACL, 106014 inbound ICMP denied.
Syslog levels0 emergencies to 7 debugging; lower is more severe; 302013 is level 6, 106001 is level 2.
PlacementPerimeter = north-south; segmentation = east-west; DMZ never initiates to inside; back-to-back DMZ = defence in depth.
ASA vs FTDFTD = LINA + Snort 3, policy in FMC/FDM, changes need Deploy; block rules log only at beginning.

Command cheat-sheet

! Sessions, translations and logs
show conn
show conn detail
show conn count
show xlate
show logging
! Logging baseline
logging enable
logging timestamp
logging buffered informational
logging trap informational
logging host inside 10.0.1.200
! Policy and inspection
show nameif
show service-policy
show running-config timeout
! Deep troubleshooting
packet-tracer input inside tcp 10.0.1.10 51544 8.8.8.8 80
capture CAP-OUT interface outside match tcp host 198.51.100.10 host 203.0.113.2
show capture CAP-OUT
show asp drop
clear conn address 10.0.1.10

Last common mistake. Memorising commands without the model. If you can explain what the connection table holds and when an entry is created, you can predict every output in this module, and in the ASA and Threat Defense modules that follow.

Final exam traps. "NAT hides the network, so it is secure" is wrong. "An IDS blocked the attack" is wrong unless it is inline, which makes it an IPS. "Changing an ACL drops existing sessions" is wrong; existing connections stay until cleared or closed.

The interview that turned into a whiteboard

A candidate for a firewall engineer role was asked, "Why can a user browse the web through our ASA without any inbound rule?" Instead of reciting definitions, she drew PC1, the ASA and a web server, walked the SYN through route lookup, security levels, PAT and connection creation, showed the reply matching the entry, then drew a stranger's SYN being dropped with 106001. The panel moved straight to design questions. She got the offer.

Lesson: the connection-table story, told with real outputs, answers half of all firewall interview questions.

"Summarise how a stateful firewall protects an office network in two minutes."

Structure it: zones and security levels define trust; the first packet of a flow is checked against policy; allowed flows are recorded in the connection table with NAT; replies match automatically and unsolicited inbound traffic is dropped and logged; inspection engines handle protocols with secondary channels; timeouts clean up; an NGFW adds application, user and IPS inspection; segmentation contains what gets through. Close with the verification commands.

Key takeaways

  • Threats and vulnerabilities: recognise, detect, defend (SCOR 1.1 and 1.2).
  • Stateful inspection: connection table for TCP, pseudo-state for UDP, ICMP needs inspection on the ASA.
  • Zones and security levels define trust; routed and transparent modes define placement.
  • NAT translates, the policy protects; IPS inspects inline; placement and segmentation contain; logs prove it.
  • Next: sec-concepts (modern threats, OWASP, CVSS, zero trust), then the ASA hands-on modules.
🎓 For educational purposes only — all devices are simulationsTerms of UsePrivacy Policy© 2026 Network Kings
CONFIG by Network Kings — an educational IT simulation platform for learning purposes only. It is not Cisco IOS, Junos, FortiOS or PAN-OS and contains no Cisco, Juniper, Fortinet or Palo Alto Networks software. Cisco, IOS, CCNA, CCNP, Juniper, JNCIA, JNCIS, JNCIP, Fortinet, FortiGate, FortiOS, NSE, Palo Alto Networks, PAN-OS and PCNSE are trademarks of their respective owners. Network Kings is not affiliated with or endorsed by Cisco Systems, Inc., Juniper Networks, Inc., Fortinet, Inc. or Palo Alto Networks, Inc.