Open skitt opened 1 month ago
🤖 Created branch: z_pr1205/skitt/use-iptables-save 🚀 Full E2E won't run until the "ready-to-test" label is applied. I will add it automatically once the PR has 2 approvals, or you can add it manually.
I think syntax [1] is more convenient for debugging/troubleshooting than [2].
[1]
Chain SUBMARINER-POSTROUTING (1 references)
num pkts bytes target prot opt in out source destination
1 0 0 SNAT 0 -- * vx-submariner 240.0.0.0/8 0.0.0.0/0 to:10.131.1.1
2 0 0 ACCEPT 0 -- * * 10.131.0.0/16 100.66.0.0/16
3 0 0 ACCEPT 0 -- * * 100.66.0.0/16 10.131.0.0/16
4 1 52 ACCEPT 0 -- * * 10.131.0.0/16 10.130.0.0/16
5 0 0 ACCEPT 0 -- * * 10.130.0.0/16 10.131.0.0/16
[2]
[0:0] -A SUBMARINER-POSTROUTING -s 240.0.0.0/8 -o vx-submariner -j SNAT --to-source 10.131.1.1
[0:0] -A SUBMARINER-POSTROUTING -s 10.131.0.0/16 -d 100.66.0.0/16 -j ACCEPT
[0:0] -A SUBMARINER-POSTROUTING -s 100.66.0.0/16 -d 10.131.0.0/16 -j ACCEPT
[1:52] -A SUBMARINER-POSTROUTING -s 10.131.0.0/16 -d 10.130.0.0/16 -j ACCEPT
[0:0] -A SUBMARINER-POSTROUTING -s 10.130.0.0/16 -d 10.131.0.0/16 -j ACCEPT
What do these numbers represent, pkts/bytes?
:PREROUTING ACCEPT [26:2537]
[1] one does look more legible but that could also be due to familiarity. What I like about [2] is that it looks like we could copy/paste it to apply those rules. It may come in handy if we tomorrow explore option to recreate/simulate setup from gather output. We had done something similar with OVS Openflow rules though not sure if it would be practical in this case as OVS by design lends well to it unlike IP Tables.
What do these numbers represent, pkts/bytes?
:PREROUTING ACCEPT [26:2537]
Yes, packets:bytes — you can see similar values in the iptables
output (27 packets, 2590 bytes).
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This was inspired by the recent addition of the mangle table in iptables output for subctl gather. Instead of manually specifying which tables to log, it uses iptables-save to automatically determine all the active tables.
The output is not as legible so this may not be appropriate. For comparison, here’s the current output from
iptables -L
for thenat
table:and here’s the corresponding output from
iptables-save -c
: