Inhaltsverzeichnis

Ubiquiti EdgeMAX EdgeRouter

Siehe auch: Englische Version dieser Seite 🇬🇧, Firewall-Konfiguration 🇬🇧, OpenVPN auf dem EdgeRouter 🇬🇧

Modelle

Lite (ERLite-3) 3 Port, high throughput (~90€)
ER-X passive PoE (not compliant to 802.11af/at – extra "instant 802.3af" adapter required)
ER-X SFP additional SFP port, 5xPoE out

modellspezifische Anleitungen

USB console header auf ER-X: https://wiki.openwrt.org/toh/ubiquiti/ubiquiti_edgerouter_x_er-x_ka

Standardkonfiguration

Netzwerkinterface eth0
IP 192.168.1.1
User ubnt
Passwort ubnt

Software-Download: https://www.ubnt.com/download/edgemax/

Einstellungen

CLI-Kommandos

show logs Logs anzeigen

Konfiguration über CLI

# Konfigurationsmodus betreten
configure
 
# Einstellung anzeigen
show ...
# Einstellung ändern
set ...
# eine Ebene höher
up
 
# Einstellungen aktivieren (laufende Konfiguration)
commit
# Automatisch nach 10min neu starten, wenn nicht bestätigt wird
commit-confirm
confirm
 
# Speichern in die Boot-Konfiguration
save
 
# Konfigurationsmodus verlassen
exit

Revisionen der Commits anlegen:

configure
set system config-management commit-revisions 50
commit; exit
show system commit

Die aktuelle Konfigurationsdatei liegt in `/config/config.boot`.

statisches DNS

set system static-host-mapping host-name <hostname> inet <ip address>

DNS für DHCP-IPs

set service dhcp-server hostfile-update enable
set service dhcp-server dynamic-dns-update enable true

wenn der ER zwar die entsprechenden Hosts anpingen kann, aber die Clients nicht

cat /var/log/dnsmasq.log
[] failed to load names from /etc/hosts: Permission denied []

Lösung:

sudo su
chmod 755 /etc/hosts
service dnsmasq restart

change management ports

set service gui https-port 8443
set service ssh port 22

Traffic Shaping

Buffer Bloat

traffic-policy shaper upload {
     bandwidth 5100kbps
     default {
         bandwidth 99%
         burst 15k
         ceiling 100%
         queue-limit 32
         queue-type fair-queue
     }
 }

(source: forum post)

WAN-Einstellungen

Dual WAN, WAN Failover, Load Balancing, PPPoE

→ siehe EdgeRouter WAN 🇬🇧

Hardware-Beschleunigung (Offloading)

set system offload ipv4 forwarding enable
set system offload ipv4 pppoe enable
set system offload ipv4 vlan enable
set system offload hwnat enable

alle DNS-Anfragen auf Router umleiten

# show service nat rule 1
 description RedirectDNS
 destination {
     port 53
 }
 inbound-interface switch0
 inside-address {
     address 192.168.178.1
 }
 log disable
 protocol tcp_udp
 type destination

Key-Based auth für SSH-Logins

user@client:~$ scp .ssh/id_rsa.pub router:/tmp/ubnt.pub
user@client:~$ ssh ubnt@router

user@ubnt:~$ configure
user@ubnt:~$ loadkey ubnt /tmp/ubnt.pub                                            
Done                                                                            
[edit]                                                                          
user@ubnt:~$ show system login user ubnt                                          
 authentication {                                                               
     encrypted-password $1$zKNoUbAo$gomzUbYvgyUMcD436Wo66.                      
     public-keys ubnt@host {                                               
         key ...
         type ssh-rsa                                                           
     }                                                                          
 }                                                                              
 level admin                                                                    
[edit]
user@ubnt:~$ save

Quelle: https://community.ubnt.com/t5/EdgeMAX/ssh-authorized-keys/td-p/458361

Troubleshooting

SIP

Wenn beispielsweise snom300-Telefone über SIP/RTP nicht funktionieren, ist vermutlich connection tracking für das entsprechende Protokoll aktiviert. Folgendes Kommando zum Deaktivieren:

set system conntrack modules sip disable

System

Upgrade: es passiert nichts

Kann daran liegen, dass nicht genügend Speicherplatz zum Upgrade verfügbar ist.

delete system image

Anleitungen