Step to add ufw rules
This commit is contained in:
16
seqs/snmp.sh
16
seqs/snmp.sh
@@ -90,6 +90,22 @@ step_2() {
|
|||||||
}
|
}
|
||||||
v3AuthLoc="/var/lib/snmp/snmpd.conf"
|
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_info() { echo "Extend $toolName for Raspberry Pi"; }
|
||||||
step_20_alias() { ALIAS="raspberry"; }
|
step_20_alias() { ALIAS="raspberry"; }
|
||||||
step_20() {
|
step_20() {
|
||||||
|
Reference in New Issue
Block a user