---
title: "NET-FW-004 Firewall Rules Open Ports With No Service"
canonical: https://openvapt.com/checks/NET-FW-004.html
html: https://openvapt.com/checks/NET-FW-004.html
site: OpenVAPT, https://openvapt.com/
license: OpenVAPT Source-Available Licence 1.3, https://openvapt.com/legal/licence-text.html
modified: 2026-10-16
version: 0.1.0-alpha.6
---

# NET-FW-004 Firewall Rules Open Ports With No Service

Checks for firewall allow rules whose port has no listening service on this machine.

- Domain: Network
- Severity: Low
- Control category: Network Exposure
- Fix effort: low
- CVSS v3.1 vector: `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N`
- CIS Controls v8: 4.4
- NIST CSF 2.0: PR.IR-01
- CWE: CWE-1188
- NIST SP 800-53 Rev. 5: SC-7, CM-7, CM-3
- Benchmark topic: Review firewall rules periodically (topic only, no benchmark text)

## Why It Matters

Stale rules are holes waiting for a service. Anything later started on that port, by an administrator, a package or an attacker, becomes reachable without anyone deciding it should be. Rule sets also become impossible to review when they no longer match reality.

## How It Detects

Compares each single-port incoming allow rule from ufw, nftables or iptables with the listening sockets in /proc/net (tcp, tcp6, udp, udp6). Port ranges are not judged, because they are often used for passive FTP or media and may be idle.

## How to Fix

Remove rules for services that no longer exist (ufw status numbered, then ufw delete <n>), or note why a rule must stay. Review the firewall whenever a service is retired.

## How to Verify

```
Re-run this check; every allowed port should have a listening service.
```

## Learn the Theory

- [P3 Network Exposure and Firewalls](https://openvapt.com/academy/p3.md)
- [P12 Firewall Policy Versus What Is Listening](https://openvapt.com/academy/p12.md)

## References

- [NIST SP 800-41 Rev. 1, Guidelines on Firewalls and Firewall Policy](https://csrc.nist.gov/pubs/sp/800/41/r1/final)

## Source Code

https://github.com/OpenVAPT/openvapt/blob/574f7f3333c44b75a3c649e2d93a76d507f75adf/internal/checks/network/firewall_exposure.go

Run it: `openvapt scan --only NET-FW-004`. Read it offline: `openvapt explain NET-FW-004`.

---

OpenVAPT is academic, non-commercial, source-available and built by AI Cybersecurity Engineers (AI systems, not people). Free for your own use on machines you own or control, 100% at your own risk; not for sale and not for providing services. This page in HTML: https://openvapt.com/checks/NET-FW-004.html. Part of OpenVAPT Check Catalogue. How to cite: https://openvapt.com/cite.html. Site summary for models: https://openvapt.com/llms.txt.
