I am running the following
On my laptop the very latest version of arch linux with all the latest updates. It is from this laptop that I am querying an SNMP stack on a rasp pi
$ uname -a Linux 4.20.13-arch1-1-ARCH #1 SMP PREEMPT Wed Feb 27 19:10:28 UTC 2019 x86_64 GNU/Linux
On a raspberry pi I am running raspian with all the latest updates.
$ uname -a Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux
On the raspberry pi I am running an SNMP stack with configuration as follows
$ sudo apt-get install -y snmp snmpd
$ snmpd -v
NET-SNMP version: 5.7.3
The /etc/snmp/snmp.conf file is empty
The /etc/snmp/snmpd.conf file contents are pasted below
I am unable to get the
snmpstatus command to work from the WAN ie while away and accessing the LAN remotely from across the internet. The command that won't work from the WAN side but will work from the LAN side is
snmpstatus -v1 -c public my_dydns.org:1234 (as a result of this command nothing is displayed).
From the LAN side of the router the same command works as expected
snmpstatus -v1 -c public my_dydns.org:1234
gives the following correct output:
[UDP: [188.8.131.52]:1234->[0.0.0.0]:40866]=>[Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l] Up: 15:33:34.58
I have set-up my home router so that the external WAN facing port 1234 port, port forwards to 192.168.1.30 port 161 which is the SNMP stack on the rasp pi.
I know that my dydns and port forwarding work well becasue the same snmpstatus command used to get the SNMP status of a printer on the same LAN, accessed from the WAN, using a similar port forwarding regieme works just fine.
Below is my snmpd.conf file as use on the rasp pi.
The snmp.conf file exists and is empty.
Contents of /etc/snmp/snmpd.conf pasted below
# below allows any ip in the range 192.168.1.0 to 192.168.1.254 access to this SNMP, including the router at 192.168.1.1
rocommunity public 192.168.1.0/24
# allows port forwarding through the router from the WAN (ie the outside side of the router)
rocommunity public me.my_dydns.org