##// END OF EJS Templates
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list...
-Enable_nonfree no longer enables non-free packages while install. now it enables non free packacges in sources.list -Fix: check for kernel_threads -Fix: Cryptfs Kernel parameters -Renamed: Kernel_reduce renamed for better varaible grouping to Reduce_kernel -Fix: defaultgov check in 13-kernel.sh -Dropped: Enable_DHCP - now seperated in Enable_eth_dhcp and enable_wifi_dhcp -Feature: Dhcp and static configuration of both wired and wifi interface -Feature: added uart_2ndstage=1 for even more uart output in early stages -Renamed: eth.network and wlan.network to eth0 and wlan0 -Improve: sanity check for stattic ip -Renamed: Enable_SSHD to SSH_Enable for better variable gouping -Renamed PASSWORD to ROOT_PASSWORD for better distinction with USER_PASSWORD -Improved: Enable_dbus check on firstboot (generate-machineid) -improved: Reduce if ipv6 disable remove xtables -Improved: recomend $Release if xorg is enabled on some rpi models -Install wpasupplicant if Enabled_wireless is true -Reorder key:value in rpi23-gen-image.sh -fixing some wrong var assingments and missing declarations in rpi23-gen-image.sh -updated precompiled kernel links - changed the following default values: "Reduce_*,cryptfs_keysize (support for 0 and 1),rpi_model" - added a complete config (rpi3buster-fullconfig) in sync with new order of key:value in rpi23-gen-image.sh thx to trampeltier@fsfe for testing a lot!

Fichier de la dernière révision:

r732:4551fcf06923
r732:4551fcf06923
Show More
21-firewall.sh
54 lines | 1.9 KiB | application/x-sh | BashLexer
#
# Setup Firewall
#
# Load utility functions
. ./functions.sh
if [ "$ENABLE_IPTABLES" = true ] ; then
# Create iptables configuration directory
mkdir -p "${ETC_DIR}/iptables"
if [ "$KERNEL_NF" = false ] ; then
# iptables-save and -restore are slaves of iptables and thus are set accordingly
chroot_exec update-alternatives --verbose --set iptables /usr/sbin/iptables-legacy
fi
# Install iptables systemd service
install_readonly files/iptables/iptables.service "${ETC_DIR}/systemd/system/iptables.service"
# Install flush-table script called by iptables service
install_exec files/iptables/flush-iptables.sh "${ETC_DIR}/iptables/flush-iptables.sh"
# Install iptables rule file
install_readonly files/iptables/iptables.rules "${ETC_DIR}/iptables/iptables.rules"
# Reload systemd configuration and enable iptables service
chroot_exec systemctl daemon-reload
chroot_exec systemctl enable iptables.service
if [ "$ENABLE_IPV6" = true ] ; then
if [ "$KERNEL_NF" = false ] ; then
# iptables-save and -restore are slaves of iptables and thus are set accordingly
chroot_exec update-alternatives --verbose --set ip6tables /usr/sbin/ip6tables-legacy
fi
# Install ip6tables systemd service
install_readonly files/iptables/ip6tables.service "${ETC_DIR}/systemd/system/ip6tables.service"
# Install ip6tables file
install_exec files/iptables/flush-ip6tables.sh "${ETC_DIR}/iptables/flush-ip6tables.sh"
install_readonly files/iptables/ip6tables.rules "${ETC_DIR}/iptables/ip6tables.rules"
# Reload systemd configuration and enable iptables service
chroot_exec systemctl daemon-reload
chroot_exec systemctl enable ip6tables.service
fi
if [ "$SSH_ENABLE" = false ] ; then
# Remove SSHD related iptables rules
sed -i "/^#/! {/SSH/ s/^/# /}" "${ETC_DIR}/iptables/iptables.rules" 2> /dev/null
sed -i "/^#/! {/SSH/ s/^/# /}" "${ETC_DIR}/iptables/ip6tables.rules" 2> /dev/null
fi
fi