An ansible role for managing and providing advanced configuration of UBNT EdgeMAX and UniFI Network Devices.
After doing some research I realized there's a bunch fo scattered material for automating management and taking advantage of the functionatly of these great network devices. The goal is to consolidate that information and simplify the extension of the core platform to enable things like LetsEncrypt, Easy OpenVPN Connectivity, OSPF, MPLS and Other Advanced Configures.
A list features based on the research included here I'm hoping to implement.
Feature | Ansible | UniFI CloudKey | USG4P | USG | EdgeRouterX |
---|---|---|---|---|---|
unifi_controller_facts | ansible library | * | |||
Install SSH Keys | ansible role | untested | tested | tested | tested |
SSH No Passwd Auth | task | ||||
LetsEncrypt | task | ||||
Get EdgeSwitch Config | template | n/a | n/a | n/a | untested |
AWS Route53 DNS Update | task | Untested | n/a | n/a | n/a |
- Some UBNT (EdgeRouter/UniFI) Devices to Manage.
- unifi_controller_facts
Provide the location for the SSH keys that will be installed for SSH key based authentication to the ubnt device.
ubnt_ssh_authorized_key: ~/.ssh/id_ed25519.pub
AWS Credentials and additional information needed for updating Route53 information. This is currently untested.
Example Variables:
aws_access_key_id: < AWS_ACCESS_KEY_ID >
aws_secret_access_key: < AWS_SECRET_ACCESS_KEY >
aws_route53_domain: pouliot.net
aws_route53_network: 192.168.1.0/24
aws_route53_syslog_facility: local7
aws_route53_exclude_host: nothisone.pouliot.net
Script template to get ERX config.
docker run \
--rm \
-v ${PWD}:/usr/src/myapp \
-w /usr/src/myapp \
-e GOOS=linux \
-e GOARCH=mips64 \
golang bash -c "go get -v github.com/cloudflare/cloudflared/cmd/cloudflared ; GOOS=linux GOARCH=mips64 go build -ldflags='-s -w' -v -x github.com/cloudflare/cloudflared/cmd/cloudflared "
docker run \
--rm \
-v ${PWD}:/usr/src/myapp \
-w /usr/src/myapp \
-e GOOS=linux \
-e GOARCH=mipsle \
golang bash -c "go get -v github.com/cloudflare/cloudflared/cmd/cloudflared ; GOOS=linux GOARCH=mipsle go build -ldflags='-s -w' -v -x github.com/cloudflare/cloudflared/cmd/cloudflared"
docker run \
--rm \
-v ${PWD}:/usr/src/myapp \
-w /usr/src/myapp \
-e GOOS=linux \
-e GOARCH=mips64 \
golang bash -c "go get -v go.universe.tf/netboot/cmd/pixiecore ; GOOS=linux GOARCH=mips64 go build -ldflags='-s -w' -v -x go.universe.tf/netboot/cmd/pixiecore"
docker run \
--rm \
-v ${PWD}:/usr/src/myapp \
-w /usr/src/myapp \
-e GOOS=linux \
-e GOARCH=mipsle \
golang bash -c "go get -v go.universe.tf/netboot/cmd/pixiecore ; GOOS=linux GOARCH=mipsle go build -ldflags='-s -w' -v -x go.universe.tf/netboot/cmd/pixiecore"
Here is a non-working example of typical usage.
- hosts: localhost
gather_facts: True
roles:
- ppouliot.ubnt_platform_mgmt
- https://networkjutsu.com/hardening-edgerouter-lite-part-1/
- https://miketabor.com/enable-ssh-auto-login-ubiquiti-edgerouter-x/
- https://community.ubnt.com/t5/EdgeRouter/ssh-authorized-keys/td-p/458361
- https://community.ubnt.com/t5/UniFi-Stories/Adding-Let-s-Encrypt-certificate-to-UniFi-Cloud-Key-without/cns-p/2222363
- https://github.com/Ar0xA/USG-DNS-ADBLOCK
- https://github.com/amarcu5/EdgeOS-Blacklist
- https://github.com/britannic/blacklist
- https://github.com/Ar0xA/USG-DNS-ADBLOCK
- https://bendews.com/posts/implement-dns-over-https/
- https://github.com/j-c-m/ubnt-letsencrypt
- https://github.com/neilalexander/vyatta-cjdns
- https://github.com/bettermanbao/erx-shadowsocks-libev
- https://github.com/cmur2/vyatta-sixxs
- A Pi-hole equivalent for the Unifi Security Gateway
- pi-hole conditional forwarding and unifi networking
- catching naughty devices on my home network
- https://github.com/brontide/usg-blacklist
- Pritunl to USG/Unifi
- https://community.ubnt.com/t5/UniFi-Routing-Switching/OpenVPN-to-Pritunl-using-USG/td-p/2161699
- https://github.com/mafredri/vyatta-wireguard-installer
- https://github.com/whiskerz007/ubnt_get_wireguard
- https://community.ubnt.com/t5/UniFi-Routing-Switching/USG-PRO-4-amp-MPLS-Outbound-routing-works-but-unable-to-reach/td-p/2450723
- https://github.com/basmeerman/unifi-usg-kpn
- How to build a load balancer with BGP and ECMP
- Update AWS Route53
- Install cloudflared on UniFI Controller
- Cloudflare DynDNS
- https://github.com/Twanislas/ubnt-cloudflared
- https://khaz.me/cloudflare-ddns-configuration-for-unifi-usg/
- ubnt_cloudflared
- https://github.com/kchristensen/udm-le
- https://github.com/Art-of-WiFi/UniFi-API-client/
- https://github.com/tbyehl/edgerouter-backup
- https://github.com/syncloudsoft/unifi-client
- https://github.com/hobbyquaker/unifi2mqtt
- https://github.com/jens-maus/node-unifi
- https://github.com/KoenZomers/UniFiApi
- https://github.com/davidmaitland/unifi-voucher-generator
- https://gist.github.com/troyfontaine/43f4a978418b845cdbb117ffe1fd30e8
- https://github.com/bsab/django-unifi-portal
- https://github.com/emanuelepaiano/espresso-portal
- https://github.com/SEQUOIIA/unifi-proper-portal
- https://github.com/kaptk2/portal
- http://dl.ubnt.com/unifi/3.2.10/portal_sample_paypal.zip
- https://github.com/PaintSplasher/unifi-voucher-service
- https://github.com/woodjme/unifi-hotspot
- https://github.com/batesta/whoshere
- https://github.com/stevejenkins/unifi-linux-utils
- https://github.com/oldsj/edgerouter-automation
- https://github.com/brianredbeard/edgeos_setup
- kenmoini/unifi_controller_facts
- https://github.com/btaub/misc-scripts/blob/master/get-EdgeSwitch-config.sh
- https://github.com/jaysoffian/eap_proxy
- https://github.com/ubiquiti/eot-controller
- https://github.com/Enatec/UniFiTooling
- https://github.com/martbrooks/unifi_ssl_certs
- https://github.com/dmbaturin/scripts/blob/master/usg-config-export.py
- https://github.com/msnelling/ansible-unifi
- https://github.com/boostchicken/udm-utilities
- https://github.com/richardhofman/ansible-role-edgerouter/
- Ansible Example w/ Jinja template
- https://github.com/unifi-toolbox/unifi-protect-video-downloader
- https://github.com/yuppity/unifi-video-api
- https://github.com/petergeneric/unifi-protect-remux
- EdgeRouter to git repo backup scripts.
- Oxidized
- https://github.com/gebn/unifibackup
- https://github.com/zhangyoufu/unifi-backup-decrypt
- Nagios Plugin to check Unifi Controller
- Sensu plugin that polls metrics from UBNT Unifi wireless controllers
- Collect your Unifi Controller Data and send it to an InfluxDB instance. Grafana dashboards included
- Periodic monitoring of UBNT EdgeRouter metrics not otherwise available via SNMP and logging to InfluxDB/Grafana
- Simple web server that connects to a Ubiquiti Edge Router to show who is using a substantial amount of data
- Perl Module to output UBNT info
- https://github.com/mikeder/edgerouter-graylog-extractors
- https://github.com/lowfive/graylog-grok-edgerouter
- https://github.com/Graylog2/graylog-guide-ubiquity-unify-ap
- https://github.com/breakandinspect/graylog
- https://github.com/loganmarchione/graylog-edgerouter-lite
- https://github.com/edoput/netjsonconfig-airos
- https://github.com/WaterByWind/grafana-dashboards
- https://github.com/zbx-sadman/unifi_miner
- https://github.com/zbx-sadman/unifi_proxy
- https://github.com/mdlayher/unifi_exporter
- https://github.com/caglar10ur/elk-usg
- https://github.com/custom-components/sensor.unifigateway
- unifi-poller
- https://github.com/tusc/ntopng-udm
- https://github.com/iobroker-community-adapters/ioBroker.unifi
- https://github.com/custom-components/sensor.unifigateway
- https://github.com/finish06/Unifi-Metrics-Collector
- https://github.com/jcoutch/usg-scripts
- https://github.com/Manawyrm/unifirespondd
- https://github.com/tborychowski/unifi-event-monitor
- https://github.com/stevejenkins/UBNT-EdgeRouter-Example-Configs
- https://github.com/ekrunch/ubiquiti_unifi_configs
- https://github.com/psaintemarie/unifi-bytel
- https://github.com/TimoDJatomika/EdgeRouter-Stuff
- Vyatta Network OS High Availability
- 235723207-UniFi-USG-UDM-Port-Forwarding-Configuration-and-Troubleshooting
- https://github.com/chashtag/unifi-8021x-setup
- PiHole - Catching and dealing w/ naughty devices
- Unifi Usg dnat rule for pi-hole or other dns redirection
- How To Enable InterVLAN Routing on the UniFi USG
- Firewall-rules-DNS-blocking-except-for-my-local-Pi-Hole
- PiHole across VLANs blocking internet traffic SOLVED
- VLAN inter-accessibility for MultiCast devices (SONOS, Chromecast, Airtame, etc)
- EdgeRouter Setup IGMP proxy and statistics
- Configure Sonos across subnets on USG
- Unifi Sonos and VLANs
- An optimal configuration for a Unifi Managed Network & Sonos
- Tips Connecting to SONOS speakers on a Unifi Wireless Network.
- Sonos on Unifi Network Gear
- How to configure your UniFi network for Sonos
- Tips: Running Sonos wired and wireless in a pure Unifi (Ubiquiti) network environment
- Getting Sonos and Ubiquiti to play nice
- Peter Pouliot [email protected]
Copyright (C) 2018 Peter J. Pouliot
Peter Pouliot can be contacted at: [email protected]
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.