Free tool
Flow Log Policy Drafter
Runs in your browser, with no sign-up and nothing to install.
This flow log policy drafter turns network flow logs into a draft allowlist between groups, ending in default deny. Paste AWS VPC Flow Logs or a CSV, and optionally name your groups. It merges requests with their responses, leaves out rejected flows and flags admin protocols. Your logs stay in your browser, and you can download the draft as CSV.
How do you use the flow log policy drafter?
Paste your logs, or select “Load sample data” to see how it works. Add groups such as web = 10.0.1.0/24, one per line. Without groups, private addresses are grouped by /24 and public addresses appear as “external”. Then review each rule, starting with anything marked in red.
How does it work out the direction of traffic?
Flow logs record requests and responses separately, so the destination port isn’t always the service port. The tool decides direction using this evidence, in order:
- TCP flags, if logged: a SYN alone marks the client, and SYN with ACK marks the server. Add
tcp-flagsto a custom VPC format to use this. - A well-known port: if only one side uses a port below 1024, that side is the server.
- Ephemeral ports: if only one side is at 32768 or above, the other side is the server. We use 32768 because it’s the start of the Linux default range, while IANA’s dynamic range starts at 49152.
- The lower port: if nothing else decides it, the tool guesses that the lower port is the service, and it marks the rule as uncertain.
These are heuristics. AWS’s own examples show client ports such as 20641, which sit outside the usual ephemeral ranges.
How do you read the results?
Each row is one proposed allow rule. The Review column tells you what to check first.
| Flag | Meaning | What to do |
|---|---|---|
| SSH, RDP, SMB, WinRM, VNC, RPC, NetBIOS | Admin protocol that attackers often use for lateral movement | Confirm that this path is needed, and whether it can come from a management host instead |
| Service port uncertain | The ports alone don’t show which side is the server | Check with the application owner |
| Within one group | Traffic inside a group | Decide whether to allow it, or split the group |
Rejected flows are left out of the rules and counted separately. AWS notes that REJECT can include packets arriving after a connection closed, so a rejected flow doesn’t always mean a policy blocked a real attempt.
What are the limits of a draft from flow logs?
Logs only show the period you captured. Monthly or quarterly jobs may be missing, and any malicious traffic in the logs will also appear as a proposed rule. In AWS, addresses can also belong to an intermediate interface such as a NAT gateway, and the pkt-srcaddr and pkt-dstaddr fields can help if you log them. The tool reads IPv4 groups only, so IPv6 addresses aren’t grouped.
Use the draft as the dependency step in the process described in our network segmentation best practices. It’s also useful when you compare network segmentation tools, because you can check what each proposes against your own traffic. For clusters, turn the result into policies with the Kubernetes network policy builder.
Sources
- AWS, Flow log records: docs.aws.amazon.com/vpc/latest/userguide/flow-log-records.html
- AWS, Flow log record examples: docs.aws.amazon.com/vpc/latest/userguide/flow-logs-records-examples.html
- IANA, Service Name and Transport Protocol Port Number Registry: iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml
- Linux kernel, IP sysctl documentation: docs.kernel.org/networking/ip-sysctl.html
- MITRE ATT&CK, T1021 Remote Services: attack.mitre.org/techniques/T1021
Frequently asked questions
Are my flow logs uploaded?
No. The tool parses and groups logs with JavaScript in your browser, and it never sends log contents anywhere. You can check this with your browser's network inspector. Still follow your own policy on handling logs.
Does this tool use AI?
No. It uses fixed rules, which you can see described on this page. That keeps results repeatable, and it means your logs don't need to go to an AI service.
Can I apply the draft rules directly?
No. Treat them as a starting point. Logs show what happened during the period you captured, not what should be allowed, and they may include unwanted traffic. Review each rule with application owners and test it in monitoring mode.
Which log formats does it read?
It reads the AWS VPC Flow Logs default format, custom VPC formats with a header line, and CSV with a header or in the order src, dst, port, protocol, action. It accepts protocol names or numbers.
Related articles
East West Traffic: What It Is and How to Control It
What east-west and north-south traffic mean, and how to control traffic inside your network.