Skip to content

Commit 86831be

Browse files
committed
ci: permit emulator UDP through offline gate
1 parent 9a4af72 commit 86831be

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,14 @@ jobs:
232232
# claiming the sources are missing.
233233
cd keepkey-firmware/deps/python-keepkey/tests
234234
python tx_fixture_manifest.py --check
235+
# Docker DNATs localhost-published packets before the filter OUTPUT
236+
# chain, so they no longer have `lo` as their output interface. Keep
237+
# only the emulator's two UDP ports reachable through the offline
238+
# gate; every other new non-loopback connection remains rejected.
235239
sudo iptables -I OUTPUT 1 ! -o lo -m conntrack --ctstate NEW -j REJECT
240+
sudo iptables -I OUTPUT 1 -p udp -m multiport --dports 11044,11045 -j ACCEPT
236241
cleanup_network_gate() {
242+
sudo iptables -D OUTPUT -p udp -m multiport --dports 11044,11045 -j ACCEPT
237243
sudo iptables -D OUTPUT ! -o lo -m conntrack --ctstate NEW -j REJECT
238244
}
239245
trap cleanup_network_gate EXIT

0 commit comments

Comments
 (0)