Reading verdicts & logs

Find why traffic is blocked

Lesson 15 of 20 · 12 min · Module 5: Troubleshooting

"The firewall is blocking it" is a guess until you can name the packet, the rule that decided it, and the reason.

Start this lesson →

Free. No installation: you write and run the code in your browser, and it is checked automatically.

By the end, you’ll be able to…

  • Describe a failing connection as a five-value packet
  • Compare it with the rule meant to allow it
  • Fix the one value that differs without widening the rule

The idea

Troubleshooting a blocked connection is a comparison: the packet that was actually sent, value by value, against the rule that was supposed to allow it. The difference is nearly always one value: a mistyped port, tcp where udp was needed, or the wrong host.

# the user sends:  udp 10.0.1.25 -> 10.0.2.53 port 53
# the rule says:   allow tcp from lan to dns port 53
# the difference:  the protocol

01Get the exact packet

Ask for the source, the destination and the service, or read them from a denied entry in the log. "The website does not work" becomes: tcp from 10.0.1.25 to 10.0.2.10 port 443.

02Compare value by value

Put the packet beside the rule that should allow it and check protocol, source, destination and port in turn. In this lab the Output tab shows each test packet and what decided it; "default deny, no rule matched" means every rule differed in at least one value.

03Tools on real devices

Real firewalls can show you a single packet travelling through the policy.

# FortiGate: trace how the next packets from one host are handled
diagnose debug flow filter addr 10.0.1.25
diagnose debug flow trace start 10
diagnose debug enable

# Huawei USG: sessions, and packets dropped by policy
display firewall session table verbose source inside 10.0.1.25
display firewall statistic system discard

# nftables: mark matching packets, then follow them through the rules
nft add rule inet filter prerouting ip saddr 10.0.1.25 meta nftrace set 1
nft monitor trace

Your turn

Three complaints arrived this morning: the website on web does not load over HTTPS, names do not resolve through dns, and the administrator (admin, 10.0.1.50) cannot use SSH to the servers. Each rule below has exactly one wrong value. Fix the three values without making any rule wider.

What the checks look for

  • The website loads over HTTPS
  • Names resolve
  • The administrator has SSH
  • Nothing was widened to make it work
Try it in the editor →

Take this with you

Name the packet, find the rule meant for it, and compare value by value. Fix the single difference; do not widen the rule.

Go a little further

Change one of your fixed rules back and read the denied line in the Output tab, as if it were the only evidence you had been given.

Learn Firewall Foundations for free

20 short lessons with real code and instant checks.

See the whole course →