Ignore:
Timestamp:
07/20/2014 03:55:27 PM (10 years ago)
Author:
Krejzi <krejzi@…>
Branches:
systemd-11177
Children:
d131a8a
Parents:
4321c68
Message:

Convert iptables, firewall section and haveged to systemd. Remove network service files from systemd-units.

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@13509 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 moved

Legend:

Unmodified
Added
Removed
  • postlfs/security/firewalling-systemd.xml

    r4321c68 raf8e1cb5  
    141141    </caution>
    142142
    143     <para>The firewall configuration script installed in the iptables section
    144     differs from the standard configuration script. It only has two of
    145     the standard targets: start and status. The other targets are clear
    146     and lock. For instance if you issue:</para>
    147 
    148 <screen role="root"><userinput>/etc/rc.d/init.d/iptables start</userinput></screen>
    149 
    150     <para>the firewall will be restarted just as it is upon system startup.
    151     The status target will present a list of all currently implemented
    152     rules. The clear target turns off all firewall rules and the lock
    153     target will block all packets in and out of the computer with the
    154     exception of the loopback interface.</para>
    155 
    156143    <para>The main startup firewall is located in the file
    157     <filename>/etc/rc.d/rc.iptables</filename>. The sections below provide
     144    <filename>/etc/systemd/scripts/iptables</filename>. The sections below provide
    158145    three different approaches that can be used for a system.</para>
    159146
     
    178165      to the Linux 2.6 kernels.</para>
    179166
    180 <screen role="root"><?dbfo keep-together="auto"?><userinput>cat &gt; /etc/rc.d/rc.iptables &lt;&lt; "EOF"
     167<screen role="root"><?dbfo keep-together="auto"?><userinput>install -v -dm755 /etc/systemd/scripts
     168
     169cat &gt; /etc/systemd/scripts/iptables &lt;&lt; "EOF"
    181170<literal>#!/bin/sh
    182171
    183 # Begin rc.iptables
     172# Begin /etc/systemd/scripts/iptables
    184173
    185174# Insert connection-tracking modules
     
    250239iptables -A INPUT -j LOG --log-prefix "FIREWALL:INPUT "
    251240
    252 # End $rc_base/rc.iptables</literal>
     241# End /etc/systemd/scripts/iptables</literal>
    253242EOF
    254 chmod 700 /etc/rc.d/rc.iptables</userinput></screen>
     243chmod 700 /etc/systemd/scripts/iptables</userinput></screen>
    255244
    256245      <para>This script is quite simple, it drops all traffic coming
     
    284273      a worm via a buffer-overflow).</para>
    285274
    286 <screen role="root"><?dbfo keep-together="auto"?><userinput>cat &gt; /etc/rc.d/rc.iptables &lt;&lt; "EOF"
     275<screen role="root"><?dbfo keep-together="auto"?><userinput>install -v -dm755 /etc/systemd/scripts
     276
     277cat &gt; /etc/systemd/scripts/iptables &lt;&lt; "EOF"
    287278<literal>#!/bin/sh
    288279
    289 # Begin rc.iptables
     280# Begin /etc/systemd/scripts/iptables
    290281
    291282echo
     
    371362
    372363# Enable IP Forwarding
    373 echo 1 &gt; /proc/sys/net/ipv4/ip_forward</literal>
     364echo 1 &gt; /proc/sys/net/ipv4/ip_forward
     365
     366# End /etc/systemd/scripts/iptables</literal>
    374367EOF
    375 chmod 700 /etc/rc.d/rc.iptables</userinput></screen>
     368chmod 700 /etc/systemd/scripts/iptables</userinput></screen>
    376369
    377370      <para>With this script your intranet should be reasonably secure
Note: See TracChangeset for help on using the changeset viewer.