forked from PinSpace-Org/GistPin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtraffic-rules.yml
More file actions
83 lines (70 loc) · 2.69 KB
/
Copy pathtraffic-rules.yml
File metadata and controls
83 lines (70 loc) · 2.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
---
# Network traffic rules for GistPin.
# Used by analyze-traffic.sh to validate flow logs against expected behaviour.
version: "1.0"
updated: "2026-06-01"
# Thresholds for anomaly detection
thresholds:
ddos_packets_per_window: 10000 # packets from a single source in the lookback window
port_scan_distinct_ports: 50 # distinct destination ports from a single source
reject_spike_count: 500 # total REJECT actions in the lookback window
rules:
# Public-facing ports — must be ACCEPT on ALB/ingress
- name: "HTTPS public ingress"
port: "443"
expected_action: "ACCEPT"
severity: CRITICAL
description: "All HTTPS traffic to the ingress must be accepted."
- name: "HTTP redirect"
port: "80"
expected_action: "ACCEPT"
severity: HIGH
description: "HTTP traffic accepted for redirect to HTTPS."
# Backend API (internal only — should never be directly accepted from outside)
- name: "Backend API internal only"
port: "3000"
expected_action: "REJECT"
severity: CRITICAL
description: "Direct access to the backend port must be rejected at the VPC boundary."
# Database — must never be reachable from outside the private subnet
- name: "PostgreSQL not publicly accessible"
port: "5432"
expected_action: "REJECT"
severity: CRITICAL
description: "Database port must be rejected for all traffic not originating from private subnets."
- name: "Redis not publicly accessible"
port: "6379"
expected_action: "REJECT"
severity: CRITICAL
description: "Redis port must be rejected for all external traffic."
# SSH — should be blocked at the VPC level (use SSM Session Manager instead)
- name: "SSH blocked"
port: "22"
expected_action: "REJECT"
severity: HIGH
description: "SSH must be rejected. Use AWS SSM Session Manager for shell access."
# Stellar / Soroban RPC
- name: "Stellar Horizon API"
port: "8000"
expected_action: "ACCEPT"
severity: MEDIUM
description: "Horizon API traffic accepted for Stellar network interaction."
# Monitoring
- name: "Prometheus scrape (internal)"
port: "9090"
expected_action: "REJECT"
severity: MEDIUM
description: "Prometheus must not be reachable from outside the cluster."
- name: "Grafana (internal)"
port: "3001"
expected_action: "REJECT"
severity: MEDIUM
description: "Grafana must not be reachable from outside the cluster."
# Known safe CIDR ranges (informational — not enforced by the script directly)
trusted_cidrs:
- cidr: "10.0.0.0/8"
description: "Internal VPC / private subnets"
- cidr: "172.16.0.0/12"
description: "Kubernetes pod CIDR"
# Blocked CIDR ranges (informational)
blocked_cidrs: []