diff --git a/seqs/snmp.sh b/seqs/snmp.sh index 953a5d3..5d81515 100755 --- a/seqs/snmp.sh +++ b/seqs/snmp.sh @@ -90,6 +90,22 @@ step_2() { } v3AuthLoc="/var/lib/snmp/snmpd.conf" +step_5_info() { + echo "Add ufw rules for port 161 udp [INTERFACE]" + echoinfo " [INTERFACE] (default: eth0)" +} +step_5_alias() { ALIAS="ufw"; } +step_5() { + shift + local lInterface="eth0" + [ ! -z "$1" ] && lInterface="$1" + # Check if interface exists + ip -br a | grep -E "^$lInterface" >>/dev/null 2>&1 + endReturn -o $? "Interface $lInterface does not exist" + + exe ufw allow in on $lInterface to any port 161 proto udp comment "snmp" +} + step_20_info() { echo "Extend $toolName for Raspberry Pi"; } step_20_alias() { ALIAS="raspberry"; } step_20() {