added ufw command for snmp and zabbix-agent
This commit is contained in:
1
snmp.sh
1
snmp.sh
@@ -15,6 +15,7 @@ fi
|
||||
if [ -f /etc/debian_version ]; then
|
||||
apt update
|
||||
apt install -y snmpd curl
|
||||
ufw allow snmp
|
||||
elif [ -f /etc/redhat-release ]; then
|
||||
yum install -y net-snmp net-snmp-utils
|
||||
firewall-cmd --zone=public --add-service=snmp --permanent
|
||||
|
||||
@@ -35,6 +35,8 @@ if [ ${OS} == 'Debian' ]; then
|
||||
apt update
|
||||
# install the agent
|
||||
apt install -y zabbix-agent
|
||||
# firewall-cmd
|
||||
ufw allow zabbix-agent
|
||||
|
||||
elif [ ${OS} == 'Ubuntu' ]; then
|
||||
# Install the repository configuration package. This package contains apt (software package manager) configuration files.
|
||||
@@ -46,6 +48,8 @@ elif [ ${OS} == 'Ubuntu' ]; then
|
||||
apt update
|
||||
# install the agent
|
||||
apt install -y zabbix-agent
|
||||
# firewall-cmd
|
||||
ufw allow zabbix-agent
|
||||
|
||||
elif [ ${OS} == 'CentOS' ]; then
|
||||
# Install the repository configuration package. This package contains yum (software package manager) configuration files.
|
||||
|
||||
Reference in New Issue
Block a user