forked from istio/istio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix kube-virt-related rules cleanup in legacy istio-clean-iptables (i…
- Loading branch information
Showing
6 changed files
with
207 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: release-notes/v2 | ||
kind: bug-fix | ||
area: installation | ||
issue: | ||
- 48368 | ||
releaseNotes: | ||
- | | ||
**Fixed** kube-virt-related rules not being removed by istio-clean-iptables tool. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
tools/istio-clean-iptables/pkg/cmd/testdata/ipnets-with-kube-virt-interfaces.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
iptables -t PREROUTING -D PREROUTING nat -i eth1 -d 10.0.0.0/8 -j ISTIO_REDIRECT | ||
iptables -t PREROUTING -D PREROUTING nat -i eth2 -d 10.0.0.0/8 -j ISTIO_REDIRECT | ||
iptables -t PREROUTING -D nat -i eth1 -j RETURN | ||
iptables -t PREROUTING -D nat -i eth2 -j RETURN | ||
ip6tables -t PREROUTING -D nat -i eth1 -j RETURN | ||
ip6tables -t PREROUTING -D nat -i eth2 -j RETURN | ||
iptables -t nat -D PREROUTING -p tcp -j ISTIO_INBOUND | ||
iptables -t mangle -D PREROUTING -p tcp -j ISTIO_INBOUND | ||
iptables -t nat -D OUTPUT -p tcp -j ISTIO_OUTPUT | ||
iptables -t nat -F ISTIO_OUTPUT | ||
iptables -t nat -X ISTIO_OUTPUT | ||
iptables -t nat -F ISTIO_INBOUND | ||
iptables -t nat -X ISTIO_INBOUND | ||
iptables -t mangle -F ISTIO_INBOUND | ||
iptables -t mangle -X ISTIO_INBOUND | ||
iptables -t mangle -F ISTIO_DIVERT | ||
iptables -t mangle -X ISTIO_DIVERT | ||
iptables -t mangle -F ISTIO_TPROXY | ||
iptables -t mangle -X ISTIO_TPROXY | ||
iptables -t nat -F ISTIO_REDIRECT | ||
iptables -t nat -X ISTIO_REDIRECT | ||
iptables -t nat -F ISTIO_IN_REDIRECT | ||
iptables -t nat -X ISTIO_IN_REDIRECT | ||
iptables -t nat -F ISTIO_OUTPUT | ||
iptables -t nat -X ISTIO_OUTPUT | ||
ip6tables -t nat -D PREROUTING -p tcp -j ISTIO_INBOUND | ||
ip6tables -t mangle -D PREROUTING -p tcp -j ISTIO_INBOUND | ||
ip6tables -t nat -D OUTPUT -p tcp -j ISTIO_OUTPUT | ||
ip6tables -t nat -F ISTIO_OUTPUT | ||
ip6tables -t nat -X ISTIO_OUTPUT | ||
ip6tables -t nat -F ISTIO_INBOUND | ||
ip6tables -t nat -X ISTIO_INBOUND | ||
ip6tables -t mangle -F ISTIO_INBOUND | ||
ip6tables -t mangle -X ISTIO_INBOUND | ||
ip6tables -t mangle -F ISTIO_DIVERT | ||
ip6tables -t mangle -X ISTIO_DIVERT | ||
ip6tables -t mangle -F ISTIO_TPROXY | ||
ip6tables -t mangle -X ISTIO_TPROXY | ||
ip6tables -t nat -F ISTIO_REDIRECT | ||
ip6tables -t nat -X ISTIO_REDIRECT | ||
ip6tables -t nat -F ISTIO_IN_REDIRECT | ||
ip6tables -t nat -X ISTIO_IN_REDIRECT | ||
ip6tables -t nat -F ISTIO_OUTPUT | ||
ip6tables -t nat -X ISTIO_OUTPUT | ||
iptables -t nat -D OUTPUT -p udp -j ISTIO_OUTPUT | ||
iptables -t raw -D OUTPUT -p udp -j ISTIO_OUTPUT | ||
ip6tables -t nat -D OUTPUT -p udp -j ISTIO_OUTPUT | ||
ip6tables -t raw -D OUTPUT -p udp -j ISTIO_OUTPUT | ||
iptables -t raw -F ISTIO_OUTPUT | ||
iptables -t raw -X ISTIO_OUTPUT | ||
iptables -t nat -F ISTIO_OUTPUT | ||
iptables -t nat -X ISTIO_OUTPUT | ||
iptables-save | ||
ip6tables-save |
56 changes: 56 additions & 0 deletions
56
tools/istio-clean-iptables/pkg/cmd/testdata/kube-virt-interfaces.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
iptables -t PREROUTING -D nat -i eth1 -j ISTIO_REDIRECT | ||
iptables -t PREROUTING -D nat -i eth2 -j ISTIO_REDIRECT | ||
iptables -t PREROUTING -D nat -i eth1 -j RETURN | ||
iptables -t PREROUTING -D nat -i eth2 -j RETURN | ||
ip6tables -t PREROUTING -D nat -i eth1 -j ISTIO_REDIRECT | ||
ip6tables -t PREROUTING -D nat -i eth2 -j ISTIO_REDIRECT | ||
ip6tables -t PREROUTING -D nat -i eth1 -j RETURN | ||
ip6tables -t PREROUTING -D nat -i eth2 -j RETURN | ||
iptables -t nat -D PREROUTING -p tcp -j ISTIO_INBOUND | ||
iptables -t mangle -D PREROUTING -p tcp -j ISTIO_INBOUND | ||
iptables -t nat -D OUTPUT -p tcp -j ISTIO_OUTPUT | ||
iptables -t nat -F ISTIO_OUTPUT | ||
iptables -t nat -X ISTIO_OUTPUT | ||
iptables -t nat -F ISTIO_INBOUND | ||
iptables -t nat -X ISTIO_INBOUND | ||
iptables -t mangle -F ISTIO_INBOUND | ||
iptables -t mangle -X ISTIO_INBOUND | ||
iptables -t mangle -F ISTIO_DIVERT | ||
iptables -t mangle -X ISTIO_DIVERT | ||
iptables -t mangle -F ISTIO_TPROXY | ||
iptables -t mangle -X ISTIO_TPROXY | ||
iptables -t nat -F ISTIO_REDIRECT | ||
iptables -t nat -X ISTIO_REDIRECT | ||
iptables -t nat -F ISTIO_IN_REDIRECT | ||
iptables -t nat -X ISTIO_IN_REDIRECT | ||
iptables -t nat -F ISTIO_OUTPUT | ||
iptables -t nat -X ISTIO_OUTPUT | ||
ip6tables -t nat -D PREROUTING -p tcp -j ISTIO_INBOUND | ||
ip6tables -t mangle -D PREROUTING -p tcp -j ISTIO_INBOUND | ||
ip6tables -t nat -D OUTPUT -p tcp -j ISTIO_OUTPUT | ||
ip6tables -t nat -F ISTIO_OUTPUT | ||
ip6tables -t nat -X ISTIO_OUTPUT | ||
ip6tables -t nat -F ISTIO_INBOUND | ||
ip6tables -t nat -X ISTIO_INBOUND | ||
ip6tables -t mangle -F ISTIO_INBOUND | ||
ip6tables -t mangle -X ISTIO_INBOUND | ||
ip6tables -t mangle -F ISTIO_DIVERT | ||
ip6tables -t mangle -X ISTIO_DIVERT | ||
ip6tables -t mangle -F ISTIO_TPROXY | ||
ip6tables -t mangle -X ISTIO_TPROXY | ||
ip6tables -t nat -F ISTIO_REDIRECT | ||
ip6tables -t nat -X ISTIO_REDIRECT | ||
ip6tables -t nat -F ISTIO_IN_REDIRECT | ||
ip6tables -t nat -X ISTIO_IN_REDIRECT | ||
ip6tables -t nat -F ISTIO_OUTPUT | ||
ip6tables -t nat -X ISTIO_OUTPUT | ||
iptables -t nat -D OUTPUT -p udp -j ISTIO_OUTPUT | ||
iptables -t raw -D OUTPUT -p udp -j ISTIO_OUTPUT | ||
ip6tables -t nat -D OUTPUT -p udp -j ISTIO_OUTPUT | ||
ip6tables -t raw -D OUTPUT -p udp -j ISTIO_OUTPUT | ||
iptables -t raw -F ISTIO_OUTPUT | ||
iptables -t raw -X ISTIO_OUTPUT | ||
iptables -t nat -F ISTIO_OUTPUT | ||
iptables -t nat -X ISTIO_OUTPUT | ||
iptables-save | ||
ip6tables-save |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters