Hello,
I have managed to figure out what the culprit was for this problem.
Explanation:
When I enabled tailscale client on the server the PowerShute is running, in the tcpdump traces
from opnsense shows that it only sends but never receives on LAN net.
From tcpdump in opnsense could see this behaviour.
But when I disable the tailscale app in .4 server then all comes through OK.
I even saw this when testing with net-snmp snmpwalker. (packets leaving but no response on LAN .20 from 192.168.x.4.
Client however handled it because I got output)
I suspect that the server gets the the command from LAN 192.168.x.20 but
then (because tailscale is also enabled in opnsense) it sends
the response back on the tailscale interface.
Synology (which also has tailscale) seems to handle it.
Net-SNMP plugin in opnsense seems to handle it.
apcupsd in opnsense, NOT so much. :-/
Not sure when in time they swapped from net-snmp in apcupsd to other snmp client ?
So in the past it is most likely working because 1 - I hadn't enabled tailscale on server yet.
OR 2. they changed from net-snmp to other and then it broke.
Seems like Net-SNMP handles it better though.
Net-SNMP tailscale on in server (also look similar with apcupsd with only outgoing on LAN net.)
Net-SNMP tailscale off in server
I will test a bit with some settings in server tailscale client.
But now I have found the main reason at least.
Interesting is that Net-SNMP for sure handles it even if the response came back on tailscale interface. (as seen further up)
I tested to use the tailscale IP to the server instead of the LAN net and then it works with apcupsd with tailscale enabled in server. 😊
Best regards
Dan Lundqvist
Stockholm, Sweden
I have managed to figure out what the culprit was for this problem.
Explanation:
When I enabled tailscale client on the server the PowerShute is running, in the tcpdump traces
from opnsense shows that it only sends but never receives on LAN net.
From tcpdump in opnsense could see this behaviour.
But when I disable the tailscale app in .4 server then all comes through OK.
I even saw this when testing with net-snmp snmpwalker. (packets leaving but no response on LAN .20 from 192.168.x.4.
Client however handled it because I got output)
Code Select
root@OPNsense:~ # snmpwalk -v1 -c private 192.168.x.4 .1.3.6.1.2.1.1
SNMPv2-MIB::sysDescr.0 = STRING: PowerChute Business Edition
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.318.1.3.33.1
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (60296) 0:10:02.96
SNMPv2-MIB::sysContact.0 = STRING:
SNMPv2-MIB::sysName.0 = STRING: PowerChute UPS
SNMPv2-MIB::sysLocation.0 = STRING:
SNMPv2-MIB::sysServices.0 = INTEGER: 10
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00I suspect that the server gets the the command from LAN 192.168.x.20 but
then (because tailscale is also enabled in opnsense) it sends
the response back on the tailscale interface.
Synology (which also has tailscale) seems to handle it.
Net-SNMP plugin in opnsense seems to handle it.
apcupsd in opnsense, NOT so much. :-/
Not sure when in time they swapped from net-snmp in apcupsd to other snmp client ?
So in the past it is most likely working because 1 - I hadn't enabled tailscale on server yet.
OR 2. they changed from net-snmp to other and then it broke.
Seems like Net-SNMP handles it better though.
Net-SNMP tailscale on in server (also look similar with apcupsd with only outgoing on LAN net.)
Code Select
root@OPNsense:~ # tcpdump -i em1 host 192.168.x.4 and udp port 161
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on em1, link-type EN10MB (Ethernet), snapshot length 262144 bytes
21:59:54.947059 IP OPNsense.57487 > 192.168.x.4.snmp: C="private" GetNextRequest(26) system
21:59:54.948212 IP OPNsense.57487 > 192.168.x.4.snmp: C="private" GetNextRequest(28) system.sysDescr.0
21:59:54.948706 IP OPNsense.57487 > 192.168.x.4.snmp: C="private" GetNextRequest(28) system.sysObjectID.0
21:59:54.949247 IP OPNsense.57487 > 192.168.x.4.snmp: C="private" GetNextRequest(28) system.sysUpTime.0
21:59:54.949683 IP OPNsense.57487 > 192.168.x.4.snmp: C="private" GetNextRequest(28) system.sysContact.0
21:59:54.950191 IP OPNsense.57487 > 192.168.x.4.snmp: C="private" GetNextRequest(28) system.sysName.0
21:59:54.950629 IP OPNsense.57487 > 192.168.x.4.snmp: C="private" GetNextRequest(28) system.sysLocation.0
21:59:54.951030 IP OPNsense.57487 > 192.168.x.4.snmp: C="private" GetNextRequest(28) system.sysServices.0
21:59:54.951481 IP OPNsense.57487 > 192.168.x.4.snmp: C="private" GetNextRequest(28) system.8.0
Net-SNMP tailscale off in server
Code Select
root@OPNsense:~ # tcpdump -i em1 host 192.168.x.4 and udp port 161
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on em1, link-type EN10MB (Ethernet), snapshot length 262144 bytes
22:01:08.907568 IP OPNsense.50746 > 192.168.x.4.snmp: C="private" GetNextRequest(26) system
22:01:08.908316 IP 192.168.x.4.snmp > OPNsense.50746: C="private" GetResponse(55) system.sysDescr.0="PowerChute Business Edition"
22:01:08.908388 IP OPNsense.50746 > 192.168.x.4.snmp: C="private" GetNextRequest(28) system.sysDescr.0
22:01:08.908763 IP 192.168.x.4.snmp > OPNsense.50746: C="private" GetResponse(39) system.sysObjectID.0=E:318.1.3.33.1
22:01:08.908788 IP OPNsense.50746 > 192.168.x.4.snmp: C="private" GetNextRequest(28) system.sysObjectID.0
22:01:08.909213 IP 192.168.x.4.snmp > OPNsense.50746: C="private" GetResponse(31) system.sysUpTime.0=60296
22:01:08.909235 IP OPNsense.50746 > 192.168.x.4.snmp: C="private" GetNextRequest(28) system.sysUpTime.0
22:01:08.909562 IP 192.168.x.4.snmp > OPNsense.50746: C="private" GetResponse(28) system.sysContact.0=""
22:01:08.909580 IP OPNsense.50746 > 192.168.x.4.snmp: C="private" GetNextRequest(28) system.sysContact.0
22:01:08.909861 IP 192.168.x.4.snmp > OPNsense.50746: C="private" GetResponse(42) system.sysName.0="PowerChute UPS"
22:01:08.909879 IP OPNsense.50746 > 192.168.x.4.snmp: C="private" GetNextRequest(28) system.sysName.0
22:01:08.910161 IP 192.168.x.4.snmp > OPNsense.50746: C="private" GetResponse(28) system.sysLocation.0=""
22:01:08.910177 IP OPNsense.50746 > 192.168.x.4.snmp: C="private" GetNextRequest(28) system.sysLocation.0
22:01:08.910461 IP 192.168.x.4.snmp > OPNsense.50746: C="private" GetResponse(29) system.sysServices.0=10
22:01:08.910479 IP OPNsense.50746 > 192.168.x.4.snmp: C="private" GetNextRequest(28) system.sysServices.0
22:01:08.910810 IP 192.168.x.4.snmp > OPNsense.50746: C="private" GetResponse(29) system.8.0=0
22:01:08.910827 IP OPNsense.50746 > 192.168.x.4.snmp: C="private" GetNextRequest(28) system.8.0
22:01:08.911209 IP 192.168.x.4.snmp > OPNsense.50746: C="private" GetResponse(30) snmp.snmpInPkts.0=499
I will test a bit with some settings in server tailscale client.
But now I have found the main reason at least.
Interesting is that Net-SNMP for sure handles it even if the response came back on tailscale interface. (as seen further up)
I tested to use the tailscale IP to the server instead of the LAN net and then it works with apcupsd with tailscale enabled in server. 😊
Best regards
Dan Lundqvist
Stockholm, Sweden
"