Poke Holes in a New Firewall Rulebase Before Live Traffic Does
You just rewrote 40 firewall rules and want to know if they actually work before flipping DNS. Sadly, curl and ping obey your OS kernel, while single-packet hping3 SYN blasts get laughed out of the room by any stateful NGFW.
The Catch
Normal tools like ping, curl, and netcat go through your laptop’s polite OS TCP/IP stack: they refuse to spit out an unsolicited mid-stream TCP ACK on port 22, they can’t bundle client probes and firewall rejections into a single baseline file, and Windows/macOS NIC drivers happily eat your 802.1Q VLAN tags for breakfast.
Meanwhile, stateless one-packet injectors (hping3 or quick Scapy one-liners) bounce straight off Palo Alto, FortiGate, Check Point, and nftables—because stateful engines ignore a bare TLS ClientHello SNI unless it rides in behind a real 3-way TCP handshake with matching 4-tuple SEQ/ACK math.
DMZ Reverse-Proxy Cutover on VLAN 40 (Without Waking Up the Whole Floor)
You are swapping a crusty router ACL for a stateful zone firewall in front of a DMZ proxy (198.51.100.80) on VLAN 40. Instead of crossing your fingers at 2 AM, one 9-frame .frasm script checks all four cases at once: (1) TCP 443 finishes syn -> syn ack -> ack and carries a TLS 1.3 ClientHello SNI for "portal.corp.example"; (2) MySQL TCP 3306 gets slapped back with tcp rst ack; (3) a stray out-of-state TCP ACK on SSH port 22 gets dropped cold; and (4) ICMP ping into VLAN 40 gets icmp destunreach code 13 (Administratively Prohibited).
Adapt It for Your Network
- Change outside_tester and dmz_proxy to your own source zone and DMZ IPs/MACs.
- Tweak vlan 40, the permitted TLS sni string, and whichever dstport numbers your policy is supposed to block.
- Run frameassembly firewall_acl_test.frasm, then replay the .pcap across your test interface with tcpreplay.
.frasm -> .pcap
Preview frames inline or open in Playground ->Compiles 9 VLAN-40 frames covering a full TCP 443 handshake + TLS 1.3 SNI, a rejected MySQL 3306 probe, an out-of-state SSH ACK test, and an ICMP Code 13 admin block.
host outside_tester { ip 203.0.113.45 mac 00:0c:29:45:11:22 }host dmz_proxy { ip 198.51.100.80 mac 00:1b:21:80:aa:bb }flow allow_https_sni(ext, dmz) { // 1. Permitted TCP 443 handshake + TLS 1.3 ClientHello SNI on VLAN 40 ext -> dmz vlan 40 tcp syn srcport 52100 dstport 443 win 64240 mss 1460 wscale 7 sackperm wait 1ms ext <- dmz vlan 40 tcp syn ack win 65535 mss 1460 wscale 7 sackperm wait 1ms ext -> dmz vlan 40 tcp ack wait 1ms ext -> dmz vlan 40 tls clienthello sni "portal.corp.example" ciphersuite 4865 alpn "h2" wait 2ms}flow verify_firewall_blocks(ext, dmz) { // 2. Blocked MySQL port 3306 rejected immediately with TCP RST+ACK ext -> dmz vlan 40 tcp syn srcport 52101 dstport 3306 win 64240 mss 1460 wait 1ms ext <- dmz vlan 40 tcp rst ack wait 5ms // 3. Out-of-state TCP ACK probe on SSH port 22 (audits stateful session drop) ext -> dmz vlan 40 tcp ack srcport 52102 dstport 22 seq 85000 acknum 42000 win 1024 wait 5ms // 4. Blocked ICMP Echo answered with Code 13 (Administratively Prohibited) ext -> dmz vlan 40 ttl 64 icmp echorequest id 900 seq 1 payload "DMZ_ACL_AUDIT" wait 1ms ext <- dmz vlan 40 ttl 64 icmp destunreach code 13 wait 1ms}compile { allow_https_sni(outside_tester, dmz_proxy) verify_firewall_blocks(outside_tester, dmz_proxy)}# 1. Preview the 9-packet stateful firewall audit ladder in your terminal
frameassembly show firewall_acl_test.frasm
# 2. Compile to .pcap and verify TCP SEQ/ACK, VLAN 40, TLS SNI, and ICMP Code 13 in tshark
frameassembly firewall_acl_test.frasm firewall_acl_test.pcap
tshark -r firewall_acl_test.pcap
# 3. Replay into your firewall ingress test port or SPAN sensor
sudo tcpreplay -i eth0 firewall_acl_test.pcapKeep firewall_acl_test.frasm in Git and compile .pcap in under 1ms
Single rootless binary + VS Code extension with live squiggles, quick-fixes, and side-by-side packet ladders ready for Wireshark.