Skip to content

Instantly share code, notes, and snippets.

@krisnova
Created March 26, 2020 22:47
Show Gist options
  • Save krisnova/9fac0b6c677ef7db4b658d393a2e707f to your computer and use it in GitHub Desktop.
Save krisnova/9fac0b6c677ef7db4b658d393a2e707f to your computer and use it in GitHub Desktop.
Hacking on my unifi network

Corona virus debugging 2020

So I have been stuck at home and was getting between 30% and 55% packet loss intermittently.

I was getting constant "your connection is unstable" messages in zoom and dropping calls every 60-120 seconds or so

It would hang for a moment and then reconnect.

At first I thought it was just that everyone was at home using internet, but then I isolated my connection and connected my laptop straight to my modem and the issue was resolved.

So it had to be something with my unifi gear.

SSHing into my security gateway

In the controller UI you can set an SSH password for your security gateway.

Just search for ssh and you can find the SSH authentication stuff and set a password or copy the existing random password.

[nova@nova ~]$ ssh knova@10.0.0.1
Welcome to EdgeOS

By logging in, accessing, or using the Ubiquiti product, you
acknowledge that you have read and understood the Ubiquiti
License Agreement (available in the Web UI at, by default,
http://192.168.1.1) and agree to be bound by its terms.

knova@10.0.0.1's password: 
Linux ubnt 3.10.107-UBNT #1 SMP Sat Feb 15 02:47:59 UTC 2020 mips64

  ___ ___      .__________.__
 |   |   |____ |__\_  ____/__|
 |   |   /    \|  ||  __) |  |   (c) 2010-2020
 |   |  |   |  \  ||  \   |  |   Ubiquiti, Inc.
 |______|___|  /__||__/   |__|
            |_/                  https://www.ui.com

      Welcome to EdgeOS on UniFi Security Gateway!


 **********************  WARNING!  **********************
 * Configuration changes made here are not persistent.  *
 * They will be overwritten by the controller on next   *
 * provision. Configuration must be done in controller. *
 ********************************************************

knova@ubnt:~$ 

I was looking around in /config

knova@ubnt:/config$ ls
auth                 config.boot          dnsmasq-dhcp.leases  mgmt                 scripts              unifi                user-data
blocked_sta          dhcpd.leases         ips                  openvpn              support              url-filtering        wizard

I didn't find anything that looked unusual so I did a hard reset across my network and broke all the things

Repairing my network

So you have to forget all your devices from your controller before you bring them back - otherwise you are going to have a bad time.

So disconnect your controller from your network and isolate it. Manage -> forget on everything (this took 2 days to figure out)

I did a hard reset of all my devices - and then plugged every thing back in.

Reset my security IP to 10.0.0.1

Just for grins I check /config again

knova@ubnt:/config$ ls
auth                 config.boot          dnsmasq-dhcp.leases  mgmt                 support              url-filtering        wizard
blocked_sta          dhcpd.leases         ips                  scripts              unifi                user-data

Notice that the openvpn directory is now gone.

I think I had tinkered with those settings in the past - and I think the security gateway wrote some config - I have no idea what was in there.

But anyway - 0 % latency now :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment