-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use iptables-save instead of explicit lists of tables #1205
Conversation
🤖 Created branch: z_pr1205/skitt/use-iptables-save |
I think syntax [1] is more convenient for debugging/troubleshooting than [2]. [1]
[2]
|
What do these numbers represent, pkts/bytes?
[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. |
Yes, packets:bytes — you can see similar values in the |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further |
This was inspired by the recent addition of the mangle table in iptables output for subctl gather. In addition to the current logging of manually-specified tables (in a format which is easy to read), it uses iptables-save to automatically determine all the active tables. This ensures that if a user's setup relies on other tables, developers can still determine what's happening without having to go back to the user to run additional iptables commands. Signed-off-by: Stephen Kitt <[email protected]>
ca8822b
to
5c77e90
Compare
🤖 Closed branches: [z_pr1205/skitt/use-iptables-save] |
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
: