File tree Expand file tree Collapse file tree
lisa/sut_orchestrator/openvmm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1527,12 +1527,12 @@ def _enable_ssh_forwarding(
15271527 "-m state --state RELATED,ESTABLISHED -j ACCEPT"
15281528 ),
15291529 (
1530- "iptables -C FORWARD -i "
1531- f"{ shlex .quote (forwarding_interface )} -o { shlex .quote (host_interface )} "
1530+ "iptables -C FORWARD ! -i "
1531+ f"{ shlex .quote (host_interface )} -o { shlex .quote (host_interface )} "
15321532 f"-p tcp -d { guest_address } --dport { guest_port } -j ACCEPT "
15331533 "|| "
1534- "iptables -I FORWARD -i "
1535- f"{ shlex .quote (forwarding_interface )} -o { shlex .quote (host_interface )} "
1534+ "iptables -I FORWARD ! -i "
1535+ f"{ shlex .quote (host_interface )} -o { shlex .quote (host_interface )} "
15361536 f"-p tcp -d { guest_address } --dport { guest_port } -j ACCEPT"
15371537 ),
15381538 (
@@ -1634,8 +1634,8 @@ def _disable_ssh_forwarding_context(
16341634 "-m state --state RELATED,ESTABLISHED -j ACCEPT || true"
16351635 ),
16361636 (
1637- "iptables -D FORWARD -i "
1638- f"{ shlex .quote (forwarding_interface )} -o { shlex .quote (host_interface )} "
1637+ "iptables -D FORWARD ! -i "
1638+ f"{ shlex .quote (host_interface )} -o { shlex .quote (host_interface )} "
16391639 f"-p tcp -d { guest_address } --dport { guest_port } -j ACCEPT || true"
16401640 ),
16411641 (
You can’t perform that action at this time.
0 commit comments