stack-orchestrator/scripts/relay-test-udp-send.py
A. F. Dudley 05f9acf8a0 fix: DOCKER-USER rules for inbound relay, add UDP test playbooks
Root cause: Docker FORWARD chain policy DROP blocked all DNAT'd relay
traffic (UDP/TCP 8001, UDP 9000-9025) to the kind node. The DOCKER
chain only ACCEPTs specific TCP ports (6443, 443, 80). Added ACCEPT
rules in DOCKER-USER chain which runs before all Docker chains.

Changes:
- ashburn-relay-biscayne.yml: add DOCKER-USER ACCEPT rules (inbound
  tag) and rollback cleanup
- ashburn-relay-setup.sh.j2: persist DOCKER-USER rules across reboot
- relay-inbound-udp-test.yml: controlled e2e test — listener in kind
  netns, sender from kelce, assert arrival
- relay-link-test.yml: link-by-link tcpdump captures at each hop
- relay-test-udp-listen.py, relay-test-udp-send.py: test helpers
- relay-test-ip-echo.py: full ip_echo protocol test
- inventory/kelce.yml, inventory/panic.yml: test host inventories
- test-ashburn-relay.sh: add ip_echo UDP reachability test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 02:43:31 +00:00

13 lines
359 B
Python

#!/usr/bin/env python3
"""Send a UDP probe packet to a target host:port."""
import socket
import sys
HOST = sys.argv[1] if len(sys.argv) > 1 else "137.239.194.65"
PORT = int(sys.argv[2]) if len(sys.argv) > 2 else 8001
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.sendto(b"PROBE", (HOST, PORT))
print(f"OK sent 5 bytes to {HOST}:{PORT}")
s.close()