[SOLVED] Mosquitto on OPNsense

Started by poupin, January 06, 2017, 09:14:13 PM

Previous topic - Next topic
January 06, 2017, 09:14:13 PM Last Edit: January 07, 2017, 05:40:37 PM by franco
Hello together,

I'm new to OPNsense (just installed the OPNsense-16.7) and to freebsd also.
Everything seems to work fine, but I need to run mosquitto (MQTT broker) on OPNsense to allow communicate IoT devices on my local network.
I've tried to install the mosquitto package, but got message that no package is available.

# pkg install mosquitto
Updating OPNsense repository catalogue...
OPNsense repository is up-to-date.
All repositories are up-to-date.
pkg: No packages available to install matching 'mosquitto' have been found in the repositories


I can find mosquitto on https://github.com/opnsense/ports/tree/master/net/mosquitto, so it seems it should be present in repository.

Please advise how to install mosquitto on OPNsense.

Thanks in advance for your help

Martin

OPNsense has it's own repository.
It might be that Franco is able to create a package for you, so it will be available generally in OPNsense.

He will likely reply to this topic soon.
Hobbyist at home, sysadmin at work. Sometimes the first is mixed with the second.

As an alternative you can use the package from FreeBSD in mean time (you just need to enable the repository) to install the package. Dont forget to disable it again after installation (you can break your appliance).
I made a tutorial which contains this information (but for other packages) here:
https://fabian-franz.eu/icaprb/opnsense/2016/11/23/install-icaprb-on-opnsense.html

Hi Martin,

We don't provide 25000 prebuilt packages for our firewall, just around 350. Everything that is required and that people have asked for. :)

All ports, however, can still be built from the tree. We keep it up to date with FreeBSD. The tree can be installed on a running OPNsense with just a single command:

# opnsense-code ports

From there anything that FreeBSD says about using ports is correct.

For useful and small packages we add them to our builds. Mosquitto looks good, so it will be available as soon as 16.7.14 comes out:

https://github.com/opnsense/tools/commit/9a565866e5

If you can't wait, I've built snapshots for amd64/OpenSSL to be installed in OPNsense 16.7.13:

# pkg add -f https://pkg.opnsense.org/snapshots/c-ares-1.12.0.txz
# pkg add -f https://pkg.opnsense.org/snapshots/mosquitto-1.4.10.txz

For here on out, you're on your own with configuring them. It should work like on a normal FreeBSD or even Linux with a few caveats.

Maybe one more thing: we make a distinction between "packages" and "plugins". Packages are what FreeBSD offers, configurable from the command like everywhere else. Plugins have GUI components, so one does not have to use the command line to configure the services the plugin provides.

I'm marking this as solved although should you have any questions let us know. :)


Cheers,
Franco

Hi Franco,

First of all many thanks for reply and superb support!

I've installed the packages, updated config file, but during run got message that library libuuid.so.1 is missing.
# /usr/local/sbin/mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf
Shared object "libuuid.so.1" not found, required by "mosquitto"


Again, many thanks for your support.

Kind Regards, Martin

Hi Martin,

Oh, looks like an untracked dependency of the package. This should help:

# pkg install e2fsprogs-libuuid

I will try to fix it in the package before 16.7.14 is out.


Cheers,
Franco

Hi Franco,

that helps, now it works.

Many thanks for help!

Kind Regards, Martin