Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-the-mosquitto-mqtt-messaging-broker-on-ubuntu-18-04-quickstart
- # https://medium.com/jungletronics/mosquitto-acls-ac062aea3f9
- # https://jaimyn.com.au/mqtt-use-acls-multiple-user-accounts/
- # https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-the-mosquitto-mqtt-messaging-broker-on-ubuntu-18-04-quickstart
- # Creating passwd file: sudo mosquitto_passwd -c /etc/mosquitto/passwd username
- # Adding new user: sudo mosquitto_passwd /etc/mosquitto/passwd username
- cat << 'EOF' >> /etc/mosquitto/mosquitto.acl
- user wordsharing
- topic readwrite wordsharing/#
- user ciberado
- topic readwrite #
- EOF
- cat << 'EOF' >> /etc/mosquitto/conf.d/tls.conf
- allow_anonymous false
- password_file /etc/mosquitto/passwd
- acl_file /etc/mosquitto/mosquitto.acl
- listener 1883 localhost
- listener 8883
- certfile /etc/letsencrypt/live/mqtt.aprender.cloud/cert.pem
- cafile /etc/letsencrypt/live/mqtt.aprender.cloud/chain.pem
- keyfile /etc/letsencrypt/live/mqtt.aprender.cloud/privkey.pem
- listener 8083
- protocol websockets
- certfile /etc/letsencrypt/live/mqtt.aprender.cloud/cert.pem
- cafile /etc/letsencrypt/live/mqtt.aprender.cloud/chain.pem
- keyfile /etc/letsencrypt/live/mqtt.aprender.cloud/privkey.pem
- EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement