hass-pfsense icon indicating copy to clipboard operation
hass-pfsense copied to clipboard

Common Name for openVPN sensor

Open SmartM-ui opened this issue 2 years ago • 4 comments

Hi @travisghansen , last request of the year! Could you make the common name sensor for openVPN? Thanks and happy new year!

SmartM-ui avatar Dec 31 '21 13:12 SmartM-ui

I don’t understand the request. Can you give more detail with maybe an example?

travisghansen avatar Dec 31 '21 15:12 travisghansen

I don’t understand the request. Can you give more detail with maybe an example?

hi, that would be the name of the device that connects. I saw that on pfsense / openvpn in the same screen there is also the real IP address of the client that connects, perhaps it could be useful to have this data also available if it is not too complicated to obtain the sensor

thanks again for your availability

SmartM-ui avatar Dec 31 '21 16:12 SmartM-ui

I hesitate to create a sensor per client as that could get quite unruly. Maybe info could be included as extra state data however but that may not fit the need either.

travisghansen avatar Jan 01 '22 02:01 travisghansen

Hi @travisghansen , In pfSense these sensors are displayed with reference to the VPN connection created (they must not be created for each client): common name, real address, etc.

If you could have this data, when the automation in Home Assistant sends the message that a client has connected to pfSense, you could also have the name of the connected client and the real IP address sent, so a person can recognize whether it is a client known to him or not.

Schermata 2022-01-05 alle 00 46 58

I can ask you for some information that does not concern your custom for pfSense, but that perhaps you could create (as you have already done for OPNsense).

I also use a VM with only openVPN Access Server (without going through pfSense). Did you also create a component for the openVPN Access Server version so I could insert your sensors for it too?

Thanks

SmartM-ui avatar Jan 04 '22 23:01 SmartM-ui