A Ubiquiti UniFi hálózati eszközök (access pointek, switchek, security gateway) központi felügyeleti szoftvere. Az alábbi lépések a telepítést, az Apache mögé reverse proxy-zást és a Let's Encrypt SSL beállítást fedik le.

Hivatalos telepítési útmutató: https://help.ubnt.com/hc/en-us/articles/220066768-UniFi-How-to-Install-Update-via-APT-on-Debian-or-Ubuntu

Telepítés

echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list

apt-get install openjdk-8-jdk
sudo /etc/init.d/mongodb start
service unifi restart

Megjegyzés: Szükséges nyitott UFW port: 8080 (eszközök állapot-kommunikációjához).

Hasznos parancsok

systemctl status unifi
sudo systemctl enable mongod      # autostart bekapcsolása
sudo systemctl start mongod       # alternatív indítási mód

Apache + Let's Encrypt konfiguráció

Referencia konfiguráció: https://github.com/reillychase/UniFi-Controller-LetsEncrypt-Apache

echo 'deb http://ftp.debian.org/debian unstable main' | sudo tee /etc/apt/sources.list.d/unstable.list
sudo apt-get update
sudo apt-get install python-certbot-apache -t unstable

sudo letsencrypt certonly -d unifi.[sajat-domain] -d [masik_subdomain].[sajat-domain] -d [harmadik_subdomain].[sajat-domain]

certbot --apache

UniFi IGMP Proxy (multicast forgalom továbbítása VLAN-ok/alhálózatok között)

show interfaces
Interface    IP Address                        S/L  Description
---------    ----------                        ---  -----------
eth0         [wan_ip]/22                        u/u  WAN
eth1         [lan1_ip]/24                       u/u  LAN
eth2         [lan2_ip]/24                       u/u  LAN2
lo           127.0.0.1/8                        u/u
             ::1/128

IGMP proxy konfiguráció (kliens oldali parancssor)

configure
edit protocols igmp-proxy
set interface eth1 role downstream
set interface eth1 alt-subnet [lan1_halozat]/24
set interface eth1 threshold 1
set interface eth2 role upstream
set interface eth2 alt-subnet [lan2_halozat]/24
set interface eth2 threshold 1
commit
top

show protocols igmp-proxy
exit

show ip multicast mfc
show ip multicast interfaces

Ugyanez JSON konfigurációként (config.gateway.json)

Elérési út: /usr/lib/unifi/data/sites/default/config.gateway.json

{
  "protocols": {
    "igmp-proxy": {
      "interface": {
        "eth1": {
          "alt-subnet": ["[lan1_halozat]/24"],
          "role": "upstream",
          "threshold": "1"
        },
        "eth2": {
          "alt-subnet": ["[lan2_halozat]/24"],
          "role": "downstream",
          "threshold": "1"
        }
      }
    }
  }
}

Forgalom rögzítése hibakereséshez

# UniFi Security Gateway oldalon:
show interfaces ethernet eth1 capture port 1900

# Sima Ubuntu/Debian szerveren tcpdump-pal:
sudo tcpdump -i any port 443

← Vissza: Linux