[Bug 905] New: Please support passing a filename to iptables-save

bugzilla-daemon at netfilter.org bugzilla-daemon at netfilter.org
Thu Feb 20 21:20:13 CET 2014


           Summary: Please support passing a filename to iptables-save
           Product: iptables
           Version: unspecified
          Platform: x86_64
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: iptables-save
        AssignedTo: netfilter-buglog at lists.netfilter.org
        ReportedBy: mgorny at gentoo.org
   Estimated Hours: 0.0

I'm working on systemd integration in Gentoo. One of the issues I've hit while
integrating iptables support is that 'iptables-save' does not support
specifying a file to output to, and instead outputs to stdout only. Since
systemd does not support cleanly redirecting stdout to any file, calling it
requires quite ugly shell indirection that looks like:

  /bin/sh -c 'iptables-save > ...'

It would be really helpful to us if iptables-save supported specifying the
output file on argv, much like iptables-restore does.

I can provide a patch if you prefer. Just please let me know if I should pass
the output file as a parameter to the functions, as a global variable or use
dup2() on stdout.

Configure bugmail: https://bugzilla.netfilter.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.

More information about the netfilter-buglog mailing list