add net-tools install, remove full path to ip command

This commit is contained in:
Matthew Saunders Brown 2023-03-18 16:38:57 -07:00
parent d1f589a9d8
commit 6160b1d10a

View File

@ -71,7 +71,7 @@ sed -i "s|//Unattended-Upgrade::Mail \"\";|Unattended-Upgrade::Mail \"$WEBMASTER
DEBIAN_FRONTEND=noninteractive apt-get -y install firewalld --no-install-recommends DEBIAN_FRONTEND=noninteractive apt-get -y install firewalld --no-install-recommends
firewall-cmd --set-default-zone=public firewall-cmd --set-default-zone=public
# get public interface (e.g. eth0, enp0s10, etc.) then add it to the default (public) zone # get public interface (e.g. eth0, enp0s10, etc.) then add it to the default (public) zone
INTERFACE=$(/usr/bin/ip route get 1.1.1.1 | sed -n 's/.*dev \([^\ ]*\).*/\1/p') INTERFACE=$(ip route get 1.1.1.1 | sed -n 's/.*dev \([^\ ]*\).*/\1/p')
firewall-cmd --permanent --zone=public --add-interface=$INTERFACE firewall-cmd --permanent --zone=public --add-interface=$INTERFACE
# ssh should already be enabled by default, just making sure # ssh should already be enabled by default, just making sure
firewall-cmd --permanent --zone=public --add-service=ssh firewall-cmd --permanent --zone=public --add-service=ssh
@ -111,7 +111,7 @@ sed -i 's|.*MaxRetentionSec=.*|MaxRetentionSec=1week|g' /etc/systemd/journald.co
systemctl restart systemd-journald.service systemctl restart systemd-journald.service
# install some handy extra packages # install some handy extra packages
DEBIAN_FRONTEND=noninteractive apt-get -y install gdu exa pwgen DEBIAN_FRONTEND=noninteractive apt-get -y install gdu exa pwgen net-tools
# install # install
chmod 750 sbin/* chmod 750 sbin/*