FS#33478 - [iptables] should be started as early as possible
Attached to Project:
Arch Linux
Opened by Pierre Buard (Gilrain) - Sunday, 20 January 2013, 17:02 GMT
Last edited by Doug Newgard (Scimmia) - Thursday, 21 April 2016, 19:04 GMT
Opened by Pierre Buard (Gilrain) - Sunday, 20 January 2013, 17:02 GMT
Last edited by Doug Newgard (Scimmia) - Thursday, 21 April 2016, 19:04 GMT
|
Details
To insure the firewall rules are setup before any sockets
are made available, it must be started before
sysinit.target.
Please add the following line to the [Unit] section of both service files: Before=sysinit.target Additional info: * iptables 1.4.16.3-1 * systemd bug report establishing the new guideline: <https://bugs.freedesktop.org/show_bug.cgi?id=57773#c2> |
This task depends upon
Closed by Doug Newgard (Scimmia)
Thursday, 21 April 2016, 19:04 GMT
Reason for closing: Fixed
Additional comments about closing: iptables 1.6.0-1
Thursday, 21 April 2016, 19:04 GMT
Reason for closing: Fixed
Additional comments about closing: iptables 1.6.0-1
It was amended with the necessary systemd magic (see <https://bugs.archlinux.org/task/33477>) and has been working perfectly on my computers ever since.
> Firewall services should order themselves Before=, and
> declare a RequiredBy= relation to network-pre.target.
> Once enabled, their failure to start will impede network
> communication, avoiding dangerous leaks.
Patch is attached.
[1] https://bugs.freedesktop.org/show_bug.cgi?id=79600
[2] http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
So, I would personally go with what was proposed in [1]...
The release announcement gives firewall scripts as an example for this target.
Sorry for the noise, I only now noticed that this is exactly what the latest version of the patch does:-/
[Unit]
Before=network-pre.target
[Install]
RequiredBy=network-pre.target
IOW, RequiredBy goes in the install section. See upstream bug report https://bugs.freedesktop.org/show_bug.cgi?id=79600 .
sais you should use Wants, RequiredBy doesn't work without anything pulling the target in.
[Unit]
Before=network-pre.target
Wants=network-pre.target
A new iptables release was shipped today without it. Is there a reason why?
[1] https://bugs.archlinux.org/task/41633
Can we finally please get this done?