OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Profile of ittchmh »
  • Show Posts »
  • Topics
  • Profile Info
    • Summary
    • Show Stats
    • Show Posts...
      • Messages
      • Topics
      • Attachments

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

  • Messages
  • Topics
  • Attachments

Topics - ittchmh

Pages: [1]
1
General Discussion / [FIXED] os-nut plugin permissions issue
« on: November 25, 2020, 03:36:26 pm »
I have NUT usb permissions issue
It doesn't work, always UPS APC is unavailable end errors like
Command:
Code: [Select]
/usr/local/etc/rc.d/nut restartOutput:
Code: [Select]
nut not running? (check /var/db/nut/upsd.pid).
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
No matching HID UPS found
Driver failed to start (exit status=1)
/usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut

In logs I see errors like
restarting nut
returned exit status 1


Command:
Code: [Select]
usbconfigOutput:
Code: [Select]
ugen0.1: <Intel EHCI root HUB> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.2: <vendor 0x8087 product 0x07db> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen0.3: <American Power Conversion Back-UPS XS 700U   FW:924.Z3 .I USB FW:Z3> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (24mA)
ugen0.4: <Generic Ultra Fast Media> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (96mA)

Config file
Code: [Select]
/usr/local/etc/nut/ups.conf
Code: [Select]
[APC]
driver=usbhid-ups
port=ugen0.3

I've set /etc/devfs.conf to
Code: [Select]
perm usb0 0770
own usb0 root:uucp

perm uhid0 0770
own uhid0 root:uucp

[nut_usb=10]
add path 'ugen0.3' group wheel user uucp mode 0770
add path 'usb/0.3.0' group wheel user uucp mode 0770

Reloaded rules with
Code: [Select]
/etc/rc.d/devfs restart
If I run from console
Code: [Select]
/usr/local/libexec/nut/usbhid-ups -u root -D -a APC it works
Code: [Select]
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
   0.000000     debug level is '1'
   0.000802     upsdrv_initups...
   0.066616     Using subdriver: APC HID 0.96
   0.066641     104 HID objects found
   0.068696     Path: UPS.PowerSummary.iProduct, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 1
....

If I run without root parameter
Code: [Select]
/usr/local/libexec/nut/usbhid-ups -D -a APC I get

Code: [Select]
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
   0.000000     debug level is '1'
   0.000828     upsdrv_initups...
   0.001004     No matching HID UPS found

So it seams to NUT USB permissions issue, I can't reboot right now after I edited /etc/devfs.conf but I reloaded devfs service

Please help!

2
16.7 Legacy Series / OPNSense CLI interface on Roadmap?
« on: January 28, 2016, 09:50:54 am »
Hi!

Then MS closed TMG Server development I started searching alternatives, more then 2 years ago
I choesed Vyatta, after some time I falining love into CLI, but after a few months Vyatta was sold to Brocard and Open Source project was closed. I switched to pfSense.

Configuration with CLI is very fast and very easy to edit template config.
After open source project Vyatta was closed, community forked project, now it is VyOS, it based on PERL

If OPNsens has API will it be easy to add CLI?
Or CLI is somewere in roadmap?



3
General Discussion / [SOLVED] Switch apinger to dpinger possible?
« on: January 26, 2016, 06:32:15 pm »
I have same issue in OPNSense like in pfSense
Issue and potiential fix for apinger monitoring of IPv6 GIF interfaces



After apinger restart all ok



Currently I have other issues in pfSense with apinger, I fixed it like this
pfsense 2.1-release - Gateway aPinger broken?
Code: [Select]
<?phprequire_once("/etc/inc/service-utils.inc");require_once("/etc/inc/globals.inc");require_once("/etc/inc/gwlb.inc");$log_file = "/var/log/apinger.log";$log_date = date('d/m/Y H:i:s', time());$counter = 0;$a_gateways = return_gateways_array();$gateways_status = array();$gateways_status = return_gateways_status(true);foreach ($a_gateways as $gname => $gateway) {	if ($gateways_status[$gname]) {		$str_data = $gateways_status[$gname]['delay'];		$pos = substr($str_data,0,strpos($str_data, "ms"));		if (floatval($pos) > 500 ) {			$counter++;					}		}	}if ($counter > 0) {		service_control_restart(apinger,restartservice);	$log_data = 'Counter = '.$counter. ' date: '.$log_date. ' | service restarted!'. PHP_EOL;	file_put_contents($log_file, $log_data, FILE_APPEND);} ?>



OPNSense running as guest on Hyper-V host

Pages: [1]
OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2