Reconfigure snmpd listening ports
Teus Benschop <[email protected]> Mon, 16 Sep 2024 14:43:31 +0200
| Newsgroups | gmane.network.net-snmp.devel |
|---|---|
| Message-ID | <CAFueZ4x=MzX3XAk+40R1Ob5qxuM5x9W3VPSOnabWZCmcn+hhmQ@mail.gmail.com> |
--===============1628947586111223284== Content-Type: multipart/alternative; boundary="0000000000004946e506223bec4b" --0000000000004946e506223bec4b Content-Type: text/plain; charset="UTF-8" Hello, The SNMP daemon can be configured to listen on a set of ports through entries like this in file snmpd.conf : agentaddress tcp:2161 agentaddress tcp:2162 I tried to reconfigure the daemon to listen on more or less ports than the above as follows: 1. Edit snmpd.conf and add or remove agentaddress entries. 2. $ killall -HUP snmpd The logging was like this: Reconfiguring daemon NET-SNMP version 5.9.4.pre2 restarted The daemon kept the same ports open as before editing the snmpd.conf even in case some agentaddress entries were removed from snmpd.conf. Questions: 1. Is this the correct way of reconfiguring the SNMP agent? 2. How to add or remove listening ports during reconfigure, is this even possible at all? 3. Can I do a bit of library patching work to get this done? Thank you for considering this question, and thank you for the great SNMP library, we use it a lot. With kind regards, Teus Benschop --0000000000004946e506223bec4b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-size:small">Hel= lo,</div><div class=3D"gmail_default" style=3D"font-size:small"><br></div><= div class=3D"gmail_default" style=3D"font-size:small">The SNMP daemon can b= e configured to listen on a set of ports through entries like this in file = <font face=3D"monospace">snmpd.conf</font> :</div><div class=3D"gmail_defau= lt" style=3D"font-size:small"><br></div><div class=3D"gmail_default" style= =3D"font-size:small"><font face=3D"monospace">agentaddress tcp:2161<br>agen= taddress tcp:2162<br></font></div><div class=3D"gmail_default" style=3D"fon= t-size:small"><br></div><div class=3D"gmail_default" style=3D"font-size:sma= ll">I tried to reconfigure the daemon to listen on more or less ports than = the above as follows:</div><div class=3D"gmail_default" style=3D"font-size:= small">1. Edit snmpd.conf and add or remove agentaddress entries.</div><div= class=3D"gmail_default" style=3D"font-size:small">2. $ killall -HUP snmpd<= /div><div class=3D"gmail_default" style=3D"font-size:small"><br></div><div = class=3D"gmail_default" style=3D"font-size:small">The logging was like this= :</div><div class=3D"gmail_default" style=3D"font-size:small"><br></div><di= v class=3D"gmail_default" style=3D"font-size:small"><font face=3D"monospace= ">Reconfiguring daemon<br>NET-SNMP version 5.9.4.pre2 restarted<br></font><= /div><div class=3D"gmail_default" style=3D"font-size:small"><br></div><div = class=3D"gmail_default" style=3D"font-size:small">The daemon kept the same = ports open as before editing the snmpd.conf even in case some agentaddress = entries were removed from snmpd.conf.</div><div class=3D"gmail_default" sty= le=3D"font-size:small"><br></div><div class=3D"gmail_default" style=3D"font= -size:small">Questions:</div><div class=3D"gmail_default" style=3D"font-siz= e:small">1. Is this the correct way of reconfiguring the SNMP agent?</div><= div class=3D"gmail_default" style=3D"font-size:small">2. How to add or remo= ve listening ports during reconfigure,=C2=A0is this even possible at all?</= div><div class=3D"gmail_default" style=3D"font-size:small">3. Can I do a bi= t of library patching work to get this done?</div><div class=3D"gmail_defau= lt" style=3D"font-size:small"><br></div><div class=3D"gmail_default" style= =3D"font-size:small">Thank you for considering this question, and thank you= for the great SNMP library, we use it a lot.</div><div class=3D"gmail_defa= ult" style=3D"font-size:small"><br></div><div><div dir=3D"ltr" class=3D"gma= il_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr"><div><div= dir=3D"ltr">With kind regards,<br></div><div dir=3D"ltr"><div><br></div><d= iv>Teus Benschop</div><div></div><div><br></div></div></div></div></div></d= iv></div> --0000000000004946e506223bec4b-- --===============1628947586111223284== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============1628947586111223284== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders --===============1628947586111223284==--