aboutsummaryrefslogtreecommitdiffstats
path: root/setup2hd/setup.liveslak.tpl
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2021-12-20 14:56:53 +0100
committer Eric Hameleers <alien@slackware.com>2021-12-20 14:56:53 +0100
commitd17940bf4d2f7502d78b18eac380865c77e0444d (patch)
tree803fc420d640b73eac91e66c9af56608b6a18cd6 /setup2hd/setup.liveslak.tpl
parent68ce32cdd4f154597014c4baa3e78361d8c10985 (diff)
downloadliveslak-d17940bf4d2f7502d78b18eac380865c77e0444d.tar.gz
liveslak-d17940bf4d2f7502d78b18eac380865c77e0444d.tar.xz
Add an (optional) basic firewall configuration to setup2hd
The firewall will be configured and installed only when you use setup2hd to install the Live OS to your hard drive. The scripts are not particular to Slackware Live; you can easily copy the resulting files /usr/sbin/myfwconfig, /etc/rc.d/rc.firewall and /var/lib/pkgtools/setup/setup.firewall out of the installed system and use them anywhere on a Slackware-compatible OS. - The 'myfwconfig' script will ask a few simple questions and generate the ipv4 and ipv6 configuration in /etc/firewall/. - The 'rc.firewall' script will load/save its iptables/ip6tables configuration from /etc/firewall/ files. - The 'setup.firewall' script is a convenient way to call the firewall configurator from pkgtools or during Slackware's installation to harddisk.
Diffstat (limited to 'setup2hd/setup.liveslak.tpl')
-rw-r--r--setup2hd/setup.liveslak.tpl12
1 files changed, 12 insertions, 0 deletions
diff --git a/setup2hd/setup.liveslak.tpl b/setup2hd/setup.liveslak.tpl
index ccbc8d7..789b81f 100644
--- a/setup2hd/setup.liveslak.tpl
+++ b/setup2hd/setup.liveslak.tpl
@@ -125,6 +125,18 @@ EOT
unset UPASS
fi
+ # Add a rc.firewall script:
+ install -D -m0775 -t ${T_PX}/etc/rc.d/ /usr/share/@LIVEMAIN@/rc.firewall
+ # Install a firewall configuration script:
+ install -D -m755 /usr/share/@LIVEMAIN@/SeTfirewall ${T_PX}/usr/sbin/myfwconf
+ # Add a Slackware setup script invoking that 'myfwconf' script:
+ cat <<EOT >${T_PX}/var/log/setup/setup.firewall
+#!/bin/sh
+#BLURB="Configure a basic firewall."
+chroot . usr/sbin/myfwconf
+EOT
+ chmod 0775 ${T_PX}/var/log/setup/setup.firewall
+
# Re-use some of the custom configuration from 0099-@DISTRO@_zzzconf-*.sxz
# (some of these may not be present but the command will not fail):
${DIALOG} --backtitle "@CDISTRO@ Linux Setup (Live Edition)" \