Pnetlab SNMP 환경 구축
Use
Kali Linux Desktop x1
Kali Linux Server x1
Switch x1
Louter x1
Desktop IP - 192.168.1.200
Server IP - 192.168.2.20
Louter - GigabitEthernet0/0, GigabitEthernet0/2
Desktop & Server Setting
파일 편집 # vi /etc/snmp/snmpd.conf agentAddress udp:161,udp6:[::1]:161 rocommunity public 192.168.1.0/24 rocommunity public 192.168.2.0/24 # systemctl restart snmpd SNMP 구동 확인 # systemctl status snmpd //Active 뜨면 정상 포트 개방 # iptables -A INPUT -p udp --dport 161 -j ACCEPT # iptables-save | tee /etc/iptables/rules.v4 방화벽 확인 # iptables -L -n | grep 161//161결과 뜨면 성공
Louter Setting
# en # conf t # interface GigabitEthernet0/0 # ip address 192.168.1.1 255.255.255.0 # no shutdown # exit # interface GigabitEthernet0/2 # ip address 192.168.2.1 255.255.255.0 # no shutdown # exit # show ip interface brief // 0/0과 0/2에 정상적으로 뜨면 성공 # conf t # snmp-server community public RO # snmp-server enable traps
Testing
Desktop # snmpwalk -v2c -c public 192.168.2.20 Server # snmpwalk -v2c -c public 192.168.1.200
No response 가 안뜨고 내용이 주르륵 넘어가면 성공