问题原文
原帖链接 · marshallslee · CC BY-SA 3.0
I'm currently working on CentOS 7.3.
In order to activate SNMP, I installed it, configured it and successfully started the service using the firewall-cmd command.
Now, I realized that I need to open the port 161 to make the SNMP start communicating. therefore I ran the following commands below.
$sudo firewall-cmd --permanent --add-port=161/udp --zone-public
Success
$sudo firewall-cmd --reload
Success
After that I checked if the new options are successfully added, and everything turned out to be fine.
But, while trying to check if I had no problem connecting to the port 161 using telnet, I got the following error message.
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
Trying ::1...
telnet: connect to address ::1: No route to host
Is there any part I'm missing in this step?
已采纳解答
原帖链接 · DoruH · CC BY-SA 3.0
You cannot telnet snmp port because its not TCP, is UDP;
Try to test it with snmpget command from the net-snmp package :
http://net-snmp.sourceforge.net/tutorial/tutorial-5/commands/snmpget.html
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
