View previous topic :: View next topic |
Author |
Message |
luciano Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 18 Nov 2004 Posts: 132
|
Posted: Sat Feb 15, 2014 2:25 pm Post subject: iptables/firewall for systemd |
|
|
I upgraded to systemd a couple of months ago, following the gentoo systemd guide. However, I've been unable to find support for iptables (or any other firewall for that matter); the stable iptables version 1.4.20 doesn't appear to include init scripts for systemd.
Also there is no replacement service discussed in the howto guide for iptables here http://wiki.gentoo.org/wiki/Systemd#Native_services .
Any suggestions? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Hu Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
Joined: 06 Mar 2007 Posts: 23093
|
Posted: Sat Feb 15, 2014 3:54 pm Post subject: |
|
|
In openrc, the iptables init script is just a wrapper around calling iptables-restore to load rules at startup and iptables-save to save them to persistent storage at shutdown. If no systemd service exists for it, one should be easy to write. No processes are left running long term for systemd to manage. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
666threesixes666 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/48510216954a8919d65183.jpg)
Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Sat Feb 15, 2014 6:13 pm Post subject: |
|
|
mkultra@mkultra [ ~ ] $ locate iptables | grep service
/usr/portage/net-firewall/arno-iptables-firewall/files/arno-iptables-firewall.service
mkultra@mkultra [ ~ ] $ cat /usr/portage/net-firewall/arno-iptables-firewall/files/arno-iptables-firewall.service
Code: |
[Unit]
Description=A secure stateful firewall for both single and multi-homed machine
Before=network.target
Wants=network.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/arno-iptables-firewall start
ExecStop=/usr/sbin/arno-iptables-firewall stop
ExecReload=/usr/sbin/arno-iptables-firewall force-reload
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
|
and it looks like UFW has systemd service files.
mkultra@mkultra [ ~ ] $ cat /usr/lib64/systemd/system/ufw.service
Code: |
[Unit]
Description=Uncomplicated Firewall
DefaultDependencies=no
Before=network.target sysinit.target
After=systemd-sysctl.service
ConditionPathExists=|/etc/ufw/ufw.conf
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/share/ufw/ufw-init start
ExecStop=/usr/share/ufw/ufw-init stop
[Install]
WantedBy=multi-user.target
|
id probably go with ufw, i just got it up and going on my laptop i haven't tinkered with it with systemd yet....
https://wiki.gentoo.org/wiki/Ufw |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
luciano Tux's lil' helper
![Tux's lil' helper Tux's lil' helper](/images/ranks/rank_rect_1.gif)
Joined: 18 Nov 2004 Posts: 132
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|