iptables-save

File write

This executable can write data to local files.
  1. CommentThe content is written along with a number of iptables rules.
    This function is performed by the privileged user if executed via sudo because the acquired privileges are not dropped.
    RemarksIf there are environment variables involved, they must be passed via sudo VAR=value ... or exported then sudo -E ....
    iptables -A INPUT -i lo -j ACCEPT -m comment --comment DATA
    iptables -S
    iptables-save -f /path/to/output-file
    RemarksThe content is corrupted or otherwise altered by the process, thus it might not be suitable for handling arbitrary binary data.