# Technical Guides

# KeePass Password Manager Tutorial

### Introduction

I don't trust online password managers because they are closed source and companies have been hacked in the past. If you look up "lastpass breached" in Google you can see my point. Keepass is open source and offline. Why put your trust in a company when you can create and access the database yourself?

An honorable mention is **bitwarden**. They are also open-source and you have the option of hosting your own **bitwarden** server at home as an option. If you want to pay and are willing to trust a company and have your passwords encrypted on their cloud they would be your best bet.

##### Downloading Keepass

[https://keepass.info/download.html](https://keepass.info/download.html)

Get the **Installer for Windows (2.45) aka KeePass-2.45-Setup.exe**. After you get it install Keepass.

##### Recommended plugins (.plgx) to download:

Keepass has a variety of useful plugins listed here: [https://keepass.info/plugins.html](https://keepass.info/plugins.html)

I recommend the following below for now. Plugins always have a .plgx file extension.

- WebAutoType-v6.3.0.zip: [https://sourceforge.net/projects/webautotype/files/](https://sourceforge.net/projects/webautotype/files/)
- YetAnotherFaviconDownloader.plgx: [https://github.com/navossoc/KeePass-Yet-Another-Favicon-Downloader/releases](https://github.com/navossoc/KeePass-Yet-Another-Favicon-Downloader/releases)

After you downloaded the necessary .plgx plugins. Copy or move them into the Plugins folder at <span style="color: #000000; font-family: monospace; font-size: 11.7px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #f3f3f3; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;">C:\\Program Files (x86)\\KeePass Password Safe 2\\Plugins</span>.

#### 1.1.1 Master Password

To start off you will be creating a **master password** which is the masterkey to access all your other passwords. This password should be long, easy remember, but difficult for a computer to guess. Please refer to the image below to see what I mean.

[![xkcd_password_strength.png](https://wiki.stoplagging.com/uploads/images/gallery/2020-07/scaled-1680-/xkcd_password_strength.png)](https://wiki.stoplagging.com/uploads/images/gallery/2020-07/xkcd_password_strength.png)

You can test theoretical passwords to see how strong they are here: **[https://howsecureismypassword.net/](https://howsecureismypassword.net/)**

These concepts are important to security so if you don't want to get pwned follow the advice above. Do not lose or forget your master password otherwise you will not be able to access your Keepass database ever again.

#### 1.1.2 Creating your first .kdbx database

There are two ways to do this.

**Option 1:** Create a .kdbx file only meaning you only need your master password to unlock the database.

**Option 2:** Create a .kdbx file + a .key file. When you do this you need your master password + the .key file in order to unlock the database.

Typically you can choose **Option 1** if you're confident in your master password. This is the easiest and simplest option.

I personally opted for **Option 2**. I store my .kdbx database in the cloud such as, Google Drive or Dropbox. I keep duplicates of my .key files locally (on my pc, on a usb stick, on a remote computer). That way if both my Google Drive and master password are compromised I am still safe because the hacker still needs the .key file to unlock it.

**<span style="color: #800000;">No matter the method do not lose your .kdbx and/or .key file!!!</span>**

If you lose these files your passwords are gone. Make copies and backups of your databases! Besides your main computer save it on your phone, the cloud, a flash drive, or etc.

##### **Video 1a: Option 1 creating .kdbx only**

Please note where you saved the .kdbx file...

<video controls="controls" height="400" width="800"><source src="https://wiki.stoplagging.com/attachments/1"></source></video>

##### **Video 2a: Option 1 opening database w/ password** 

<video controls="controls" height="400" width="800"><source src="https://wiki.stoplagging.com/attachments/2"></source></video>

##### **Video 1b: Option 2 Creating .kdbx + .key file** 

Please note where you saved the .kdbx and .key files...

**<video controls="controls" height="400" width="800"><source src="https://wiki.stoplagging.com/attachments/5"></source></video>**

##### **Video 2b: Option 2 Opening database w/ password + .key file** 

**<video controls="controls" height="400" width="800"><source src="https://wiki.stoplagging.com/attachments/4"></source></video>**

#### 1.1.2 Adding your first password entry

Right-click anywhere near the big box and click on **"Add Entry..."** The shortcut to add an entry is also **CTRL+ i** if that is faster for you.[![KeePass_AddEntry.png](https://wiki.stoplagging.com/uploads/images/gallery/2020-07/scaled-1680-/KeePass_AddEntry.png)](https://wiki.stoplagging.com/uploads/images/gallery/2020-07/KeePass_AddEntry.png)

Give your entry a **title**. Fill out the **username** and login **URL** whenever possible. If you don't have a login URL or website URL to use then you can leave it blank. As you can see a password is already auto generated for you. You may use the generated password or manually enter in your own. And finally add any notes you need for reference.

In the video below I demonstrate how to play around with the password generator. Remember to **Save** when done. If you forget, don't worry it will ask you if you would like to save the database when you try to close.

<video controls="controls" height="400" width="800"><source src="https://wiki.stoplagging.com/attachments/6"></source></video>

#### 1.1.3 Using your password manager to login (Auto-Typing)

**Double-click** on the URL next to the entry you want, to load the login page from your default browser. **Alternatively**, right click the URL and choose your preferred browser. (This is the reason why you should enter in your URL entries).

[![OpenwFirefoxv2.png](https://wiki.stoplagging.com/uploads/images/gallery/2020-07/scaled-1680-/OpenwFirefoxv2.png)](https://wiki.stoplagging.com/uploads/images/gallery/2020-07/OpenwFirefoxv2.png)

There are 3 ways to sign in. First make sure the cursor is blinking in the username field. Then you have 3 ways to login.

1. Right-click and click on Perform Auto Type. Alternatively, press CTRL+V on keepass.
2. Double-click on the username on to copy it. Then paste manually. Double-click on the password to copy. Then paste it manually. Note: copies stay in your clipboard for 12 seconds there's a bar that shows you how much time you have left.
3. The most convenient method. If you installed the WebAutoType plugin and had the URL entry filled out. Simply press "CTRL+ALT+A" on the site you were trying to login.

A video below explains these 3 methods.

<video controls="controls" height="400" width="800"><source src="https://wiki.stoplagging.com/attachments/7"></source></video>

#### 1.1.4 Modifying Auto-Type

Some websites have a different auto-typing sequence then the default of {USERNAME}{TAB}{PASSWORD}{ENTER}.

One variation you can try is {USERNAME}{ENTER}{DELAY 2000}{PASSWORD}{ENTER}

Demonstration of this variation in the video below.

<video controls="controls" height="400" width="800"><source src="https://wiki.stoplagging.com/attachments/8"></source></video>

Other variations maybe {USERNAME}{TAB}{TAB}{TAB}{PASSWORD}{ENTER} it is situational. Modify this sequence to your needs.

##### Congratulations you've mastered the basics!

### 2.1 Beyond the Basics and Customization!

#### 2.1.1 Attaching a File

You can securely attach files to the database and keep it protected behind your master key!

This is basically done by creating / editing an entry and going to the advanced tab as shown below. You can store the file to your database then delete the original file. To retrieve it go back to your entry and the advanced tab. Then click on save and choose where to save it.

<video controls="controls" height="400" width="800"><source src="https://wiki.stoplagging.com/attachments/10"></source></video>

#### 2.1.2 Groups and Recycle Bin

You can organize your database with groups! As for the recycle bin how it works is any entry you delete will end up in the recycle bin. It is only truly deleted when you delete it from the recycle bin. If you want to view all groups at the same time just type an empty entry in the search bar. Demonstration video below.

<video controls="controls" height="400" width="800"><source src="https://wiki.stoplagging.com/attachments/11"></source></video>

#### 2.1.3 Password History

Keepass keeps a password history up to 10 revisions by default (you can change this). This video below demonstrates changing your password and retrieving your old passwords in case something went wrong.

<video controls="controls" height="400" width="800"><source src="https://wiki.stoplagging.com/attachments/13"></source></video>

#### 2.1.4 Custom Icons

Lastly if you have the YetAnotherFaviconDownloader plugin you can customize your keepass icons! This only works on entries with URLs.

<video controls="controls" height="400" width="800"><source src="https://wiki.stoplagging.com/attachments/14"></source></video>

#### 2.1.5 Advanced Auto SSH with Putty

WIP. Requires KeeAgent &amp; Putty.

Temporary Tutorial Starts at 25m10s: [https://www.youtube.com/watch?v=e6G8zHZlhv8&amp;t=&amp;t=25m10s](https://www.youtube.com/watch?v=e6G8zHZlhv8&t=&t=25m10s)

#### 2.1.6 Cool Plugins

- ReadablePassphrase.1.2.1.plgx: [https://github.com/ligos/readablepassphrasegenerator/releases](https://github.com/ligos/readablepassphrasegenerator/releases)
    - Generates passwords like the correct horse battery staple principle mentioned in the beginning!

### 3.1 Mobile Apps

Don't know much for Apple iOS but heard **StrongBox** was good.

For Android, you can choose between "**KeePassDX"** or "**Keepass2Android Offline**" from the play store. **KeePassDX** has a nicer UI, but I only have experience with **Keepass2Android Offline** so there will only be a tutorial for that one.

#### Keepass2Android Offline Quick Tutorial

Some phones have advanced features where some apps or browsers ask you if you want to use keepass to sign in which is very convenient and much faster if they ask you this accept it! Some also have fingerprint unlock as an option as well for convenience so you may accept that as well.

If your phone doesn't have these advanced features there are still one way you can "Auto-Type."

1\. Search for entry you want to login to.   
2\. Go back to the login page or tap on URL to open browser to get there.   
3\. Swipe down to see notifications. Tap on "Your entry. Entry is available through KP2A Keyboard".   
4\. Choose the Keepass2Android Offline keyboard.   
5\. Don't worry this is temporary and your default keyboard will revert back when you lock your database.  
6\. Go back to page you are trying to login.  
7\. Tap User &amp; Tap Password on the mini keyboard below. Then to switch back to your original keyboard press the lockpad on the bottom right.  
[![AndroidKeyboardSwitch.jpg](https://wiki.stoplagging.com/uploads/images/gallery/2020-07/scaled-1680-/AndroidKeyboardSwitch.jpg)](https://wiki.stoplagging.com/uploads/images/gallery/2020-07/AndroidKeyboardSwitch.jpg)  
8\. Instead of doing step 3 you could also copied user / pass from the notification bar (less secure).  
  
Video of steps 1-8 below.

<video controls="controls" height="1000" width="500"><source src="https://wiki.stoplagging.com/attachments/12"></source></video>

### 4.1 Other KeePass Variants

This tutorial only covered **Keepass** for Windows, because this is what I know... **KeepassXC** is the nicer looking one with cross-platform support you might miss out on the CTRL+ALT+A for autotype mentioned in 1.1.3 because it's powered by a Keepass plugin.  
  
/u/[SeerLite](https://www.reddit.com/user/SeerLite) on reddit also gave a mention of [https://keeweb.info/](https://keeweb.info/) and primarily uses that. I have no experience with it so I don't have much say.

### 5.1 Final Thoughts

Backup your damn database (.kdbx) file. Backup your .key file too if you created one!

Follow the 3-2-1 rule to prevent data loss.

Have 3 backups.

2 local (like desktop and phone).

1 Remote (Google Cloud / Dropbox).

# Wireguard Ubuntu Deployment

### Installation

```shell
sudo add-apt-repository ppa:wireguard/wireguard   ### Not needed if you're using Ubuntu 20.04 or later
sudo apt install wireguard
```

##### Enabling IP Forwarding

```shell
sudo echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
sudo echo "net.ipv4.conf.all.proxy_arp = 1" >> /etc/sysctl.conf
sudo sysctl -p /etc/sysctl.conf
```

This equivalent to commenting the following 2 lines below in /etc/sysctl.conf file and then running `sudo sysctl -p`

```
net.ipv4.ip_forward = 1
net.ipv4.conf.all.proxy_arp = 1
```

##### Starting Wireguard &amp; Making it a System Service

This is done so Wireguard always starts on system reboot

```shell
sudo systemctl enable wg-quick@wg0
```

### Opening Ports

If you're using UFW for your firewall open up the necessary ports for Wireguard. 51820 is the standard Wireguard port but feel free to use a non-standard port.

```shell
sudo ufw allow 22/tcp
sudo ufw allow 51820/udp
sudo ufw enable
sudo ufw status verbose
```

### Server Configuration

Create a configuration file in `/etc/wireguard/wg0.conf`. An example configuration is below. If you need a private public key pair you can generate one in tunsafe (windows wireguard client).

```
[Interface]
Address = 10.xx.xx.1/24
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
ListenPort = 51820
PrivateKey = <Server's Private Key Here>
SaveConfig = true

[Peer]
PublicKey = <Client's Public Key Here>
AllowedIPs = 10.xx.xx.2/32

[Peer]
PublicKey = <Client's Public Key Heree>
AllowedIPs = 10.xx.xx.3/32
```

##### <span class="valid" data-id="1851fa9b-07b7-465d-bb46-0164c8457283" data-mark-annotation-type="inlineComment" data-mark-type="annotation">Server Config Explanation for </span>\[Interface\]

Be aware that these <span class="code">iptables</span> entries in PostUp &amp; PostDown are for a given interface. Make sure that your **<span style="color: #00b8d9;">VM’s interface</span>** is captured on here you can check with `ip a`. In this above config example<span class="valid" data-id="49127180-0954-441b-9763-e4e96be9a116" data-mark-annotation-type="inlineComment" data-mark-type="annotation"> if you scroll right</span>, you can see that the **<span style="color: #00b8d9;">VM’s interface</span>** is <span class="code">eth0</span>. Additionally, and worth noting, also make sure that your **<span style="color: #36b37e;">wireguard interface</span>** also matches the reference on the <span class="code">iptables</span> entry. In this above config example, the **<span style="color: #36b37e;">wireguard interface</span>** is <span class="code">wg0</span>.

For Address = 10.xx.xx.xx/xx create and choose an arbitrary “[Private IP address](https://whatismyipaddress.com/private-ip "https://whatismyipaddress.com/private-ip")” different from other subnets on this VM’s network to avoid IP conflict. Also specify the IP range you’re going to use like <span class="valid" data-id="1851fa9b-07b7-465d-bb46-0164c8457283" data-mark-annotation-type="inlineComment" data-mark-type="annotation">/24 or /20 etc. You can use a program line tunsafe (Windows) to generate these keys or you can use line 14+15 [here](#bkmrk-%C2%A0-3).  
</span>

<span class="valid" data-id="1851fa9b-07b7-465d-bb46-0164c8457283" data-mark-annotation-type="inlineComment" data-mark-type="annotation">SaveConfig = true / false. This setting when set to "true" will automatically save the current live config in standard format into your wg0.conf file whenever wireguard service is turned off. Because it is in standard format any comments you made to the wg0.conf file while be gone. Set this to false if you don't want this to happen. Set this to true if you'd like to add clients while the server is live without turning it off.</span>

##### <span class="valid" data-id="1851fa9b-07b7-465d-bb46-0164c8457283" data-mark-annotation-type="inlineComment" data-mark-type="annotation">Server Config Explanation for \[Peer\]</span>

<span class="valid" data-id="1851fa9b-07b7-465d-bb46-0164c8457283" data-mark-annotation-type="inlineComment" data-mark-type="annotation">For peer just keep incrementing your arbitrary IP address by one &amp; use /32 because it is one IP. Then enter in their public key.</span>

##### <span class="valid" data-id="1851fa9b-07b7-465d-bb46-0164c8457283" data-mark-annotation-type="inlineComment" data-mark-type="annotation">Finally start your wireguard service with...</span>

```shell
sudo systemctl start wg-quick@wg0 ### to start wireguard server
sudo systemctl status wg-quick@wg0  ### to check wireguard server status
wg show ### alternative way to check wireguard server status
```

### Adding Clients to Server

Use Method#1 if you're new. Method #2 and #3 are advanced.

##### Method #1: Editing After Turning Wireguard Off

```shell
sudo systemctl stop wg-quick@wg0
# Edit your /etc/wireguard/wg0.conf file and add the peers you need there
sudo systemctl start wg-quick@wg0
```

##### Method #2: While Wireguard Is Live (wg-quick save wg0)

Also requires `SaveConfig = true` in your config.

```shell
sudo wg set wg0 peer <Client Public Key> allowed-ips 10.X.X.X/32
sudo wg show
sudo systemctl restart wg-quick@wg0
route 10.X.X.X/32 wg0
```

The difference with using a wg-quick save is that you have to do the 4th command of route add which is easy to fat finger and screw things up.

##### Method #3: While Wireguard Is Live (Restarting Interface)

This method requires `SaveConfig = true` in your config.

Adding a peer (Changes not saved yet)

```shell
sudo wg set wg0 peer <Client Public Key> allowed-ips 10.X.X.X/32
```

Check if new peer's public key and ip shows up with

```shell
sudo wg
```

Finally do a

```shell
sudo systemctl restart wg-quick@wg0
```

### Generating Client Configurations For Users

Example configuration. Please read the gotchas for each OS.

```
[Interface]
PrivateKey = < Client Private Key Here >
Address = 10.X.X.0/24
DNS = 8.8.8.8

[Peer]
PublicKey = < Server Public Key Here >
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = ServerPublicIPAdress:51820
PersistentKeepalive = 25
```

A couple of gotchas to note.

In **Linux**, the `Address =` line needs to end in /32.

In **Mac OS &amp; Windows** the `Address =` lines needs to end in /24 or the subnet assigned.

Also in **Linux** the `DNS = line` cannot be there it has to be erased.

In **Mac OS** the `DNS = line` needs to be there otherwise client cannot browse Internet.

In **Windows** **Tunsafe** the `DNS = line` is optional. In **Windows Wireguard** the `DNS = line` is required.

### Optional Configurations

##### Isolating Wireguard Clients From Each Other

This can be achieved with the following IP Tables command below assuming your wireguard interface is "wg0"

```shell
iptables -I FORWARD -i wg0 -o wg0 -j REJECT
```

### Command References

```shell
sysctl net.ipv4.ip_forward             ### Verifies if IP Forward is working
sudo systemctl enable wg-quick@wg0     ### Makes Wireguard auto-start on boot
sudo systemctl start wg-quick@wg0     #Turn on Wireguard Interface
sudo systemctl stop wg-quick@wg0   #Turn off Wireguard Interface
sudo wg show        #Check if VPN tunnel is running

#command to remove client (peer)
wg set wg0 peer peer_pubkey remove

#Don't know if this command is needed after wg-quick save or removal of client
wg addconf wgnet0 <(wg-quick strip wgnet0)

### Generating Key Pairs ###
umask 077
wg genkey | tee privatekey | wg pubkey > publickey
# Key pairs are saved in same path you typed this command in
### End Generating Key Pairs ###
```

# NanoPi R6S R4S for Gigabit SQM With OpenWrt

<p class="callout success">I made a new significant discovery on 2024.01.07 that makes the NanoPi R6S capable of pushing past 1400+ Mbps with cake on!!! Hooray! See [here](https://github.com/StarWhiz/NanoPi-R6S-CPU-Optimization-for-Gigabit-SQM/blob/main/README.md). On 2024.01.11 I discovered the same for the [NanoPi R4S](https://github.com/StarWhiz/NanoPi-R6S-CPU-Optimization-for-Gigabit-SQM/tree/main/R4S%20CPU%20Optimization) which is now able to push up to 800 Mbps with cake SQM.</p>

<p class="callout info">As of 2025.02.15 The NanoPi R6S is official supported by OpenWrt. Performance tweaks are no longer necessary! See [https://github.com/StarWhiz/NanoPi-R6S-CPU-Optimization-for-Gigabit-SQM/tree/main/How%20To%20Flash%20Official%20OpenWrt%20To%20R6S%20eMMC](https://github.com/StarWhiz/NanoPi-R6S-CPU-Optimization-for-Gigabit-SQM/tree/main/How%20To%20Flash%20Official%20OpenWrt%20To%20R6S%20eMMC) on how to flash!</p>

[![firefox_IzBtL64cLX.png](https://wiki.stoplagging.com/uploads/images/gallery/2024-12/scaled-1680-/firefox-izbtl64clx.png)](https://wiki.stoplagging.com/uploads/images/gallery/2024-12/firefox-izbtl64clx.png)

Pictured Gigabit Switch: [TP-Link 8-Port Gigabit Ethernet Switch](https://wiki.stoplagging.com/Pictured%20Access%20Point%20-%20Ubiquiti%20Unifi%206%20Pro%20(Official%20Link)%20Note:%20If%20Ubiquiti%20is%20out%20of%20stock%20you%20or%20if%20you%20don't%20like%20them,%20I%20heard%20that%20the%20TP-Link%20EAP670%20(Amazon%20Referral%20Link)%20from%20their%20Omada%20lines%20work%20just%20as%20great.%20I%20just%20have%20never%20tried%20it%20myself%20as%20I've%20been%20using%20Ubiquiti%20APs.) (**Amazon Referral Link)**

<span class="product-current-sku">Pictured Access Point - [Ubiquiti Unifi 6 Pro](https://store.ui.com/us/en/pro/category/wifi-flagship/products/u6-pro) (**Official Link)** Note: If Ubiquiti is out of stock you or if you don't like them, I heard that the [TP-Link EAP670](https://www.amazon.com/TP-Link-EAP670-Wireless-Seamless-Integrated/dp/B09ZV19DBP/ref=sr_1_4?crid=1M4Y8LX621QPT&amp;keywords=tp-link+omada+access+point&amp;qid=1704591674&amp;sprefix=tp-link+omada+access+poin%252Caps%252C161&amp;sr=8-4&_encoding=UTF8&tag=stopl02-20&linkCode=ur2&linkId=1d304da599013ae323d3ed5495bd3061&camp=1789&creative=9325) **(Amazon Referral Link)** from their Omada lines work just as great. I just have never tried TP-Link EAPs myself as I've been using Ubiquiti APs.   
  
**Note:** The Unifi 6's don't include power. So you need to buy the (30W aka 802.3at or PoE+) Injector to power it as shown in the picture. Alternative you can get a switch that supports PoE+, 802.3at, 30W).   
</span>

<span class="product-current-sku">Pictured OpenWrt Device: [NanoPi R4SE](https://www.friendlyelec.com/index.php?route=product/product&product_id=288) **(Official Link).<s> </s>**<s>As for the power supply I'd recommend the [CanaKit Raspberry Pi power supply](https://www.amazon.com/dp/B07TYQRXTK?ref=nb_sb_ss_w_as-reorder_k0_1_8&amp;amp=&amp;crid=21L0B6U7Q076N&amp;amp=&amp;sprefix=canakit+&_encoding=UTF8&tag=stopl02-20&linkCode=ur2&linkId=dec51dad3a53dab659afe4515b20e86a&camp=1789&creative=9325) **(Amazon Referral Link)** over the one FriendlyElec provides.</s> As of 2025.03.24 I heard 5V4A power adapter is needed now and have no recommendations at this time. The SE version has eMMC which means you can run off the devices storage instead of running on the MicroSD like it's predecessor the R4S. Cake SQM limit is at about **630Mbps**  
</span>

<span class="product-current-sku">The new one is the [NanoPi R6S](https://www.friendlyelec.com/index.php?route=product/product&product_id=289) **(Official Link)** which has a better CPU, the RK3588S. You may need to source your own 18W PD and USB-C to USB-C PD Cable. It has 2x 2.5Gbps ports and 1 Gbps port. The alternative, [NanoPi R6C](https://www.friendlyelec.com/index.php?route=product/product&path=69&product_id=291) **(Official Link)** costs less and has the same CPU however it only has 1x 2.5 Gbps port. Both can do cake SQM at **1400+Mbps**.  
</span>

<span class="product-current-sku">Note: The NanoPis from Amazon are not from official sources. FriendlyElec would be direct from manufacturer.   
</span>

<p class="callout info"><span class="product-current-sku">**R4SE - Can do cake SQM up to 800 Mbps (w/ [performance tweak](https://github.com/StarWhiz/NanoPi-R6S-CPU-Optimization-for-Gigabit-SQM/tree/main)).** Also has official OpenWrt software available. **R6S - Can do cake SQM up to 1500 Mbps (w/ [performance tweak](https://github.com/StarWhiz/NanoPi-R6S-CPU-Optimization-for-Gigabit-SQM/tree/main/R4S%20CPU%20Optimization))**. Only has official FriendlyWrt software for</span><span class="product-current-sku"> now.  
</span></p>

If you're interested in using cake SQM on an x86 machine please refer to this page instead: [https://wiki.stoplagging.com/books/technical-guides/page/sqm-for-beyond-1-gbps-lines-with-openwrt](https://wiki.stoplagging.com/books/technical-guides/page/x86-routers-for-gigabit-sqm-with-openwrt)

### <span class="product-current-sku">1.1 Introduction and Why?  
</span>

<span class="product-current-sku">The diagram above demonstrates how you would install a more powerful ARM PC, the nanoPi as a router into your network. Building your home network infrastructure like this, is more reliable and better than consumer routers which try to put the modem, routing, and wireless all in one.  
</span>

<span class="product-current-sku">The reason why we would want to do this is so we can stop [bufferbloat](#bkmrk-what-is-bufferbloat-) at higher bandwidths with SQM (Smart Queue Management) turned on. Currently consumer routers usually can't push past 350 Mbps with cake or fq\_codel SQM they are limited by their CPU power. Most consumer routers have underpowered CPUs so that's why the NanoPis are a solid choice. They are low power usage, small and have solid CPU that can handle cake at **800 Mbps** (R4SE) and **1400+ Mbps** (R6S w/ CPU fixes)  
</span>

##### <span class="product-current-sku">What is Bufferbloat and why stop it?</span>

<span class="product-current-sku">It is lag or ping spikes in video games or zoom calls that is caused when you or someone else uses up all your bandwidth. It could be torrenting, 4k streaming, bulk downloads, or even a speedtest. SQM algorithms (fq\_codel or cake) which are available on OpenWrt, can completely mitigate these pings and ensures low latency even under full load. Overall, you do sacrifice a little max speed 5-10% for guaranteed low latencies.</span>

#### NanoPi R4S / R4SE Performance  


<span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap" role="text">By default, the FriendlyWrt firmware on R4S doesn't optimally single out the use of it's faster A72 cores for Queues. This causes the cap to be around **630 Mbps**.</span>

<span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap" role="text">Do the performance tweak [here](https://github.com/StarWhiz/NanoPi-R6S-CPU-Optimization-for-Gigabit-SQM/tree/main/R4S%20CPU%20Optimization) and the improvement for cake SQM jumps from **630 Mbps** up to **800 Mbps** afterwards. </span>

<video controls="controls" height="500" poster="" width="800"><source src="https://wiki.stoplagging.com/attachments/26"></source></video>

Note: Don't copy me here and set max bandwidth as 920000 Mbps I was just testing the limits. You should be setting 90-95% of you max bandwidth for best performance! The video is just to demonstrate it's possible to do up to 800 Mbps cake.

#### NanoPi R6S Performance

<span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap" role="text">By default, the FriendlyWrt firmware on R6S doesn't optimally single out the use of it's faster A76 cores for Queues. This causes the cap to be around **800 Mbps**.</span>

<span class="yt-core-attributed-string yt-core-attributed-string--white-space-pre-wrap" role="text">Do the performance tweak [here](https://github.com/StarWhiz/NanoPi-R6S-CPU-Optimization-for-Gigabit-SQM/tree/main) and the improvement for cake SQM jumps from **800 Mbps** to **1400+ Mbps** afterwards. </span>  
  
<video controls="controls" height="500" poster="" width="800"><source src="https://wiki.stoplagging.com/attachments/25"></source></video>

#### NanoPi Software Installation

Installation is easy. You just need to flash a microSD card with friendlyWrt. They have a tutorial here for **R4SE**: [https://wiki.friendlyelec.com/wiki/index.php/NanoPi\_R4S#Install\_OS](https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R4S#Install_OS)

And a tutorial here for **R6S**: [https://wiki.friendlyelec.com/wiki/index.php/NanoPi\_R6S#Install\_OS\_to\_eMMC](https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R6S#Install_OS_to_eMMC)

**All you have to do to install is...**  
1\. Plug in a microSD card to your computer.   
2\. Download the appropriate image (usually the eflasher) from the FriendlyWrt wiki   
3\. Get win32diskimager and launch it.  
4\. On win32diskimager select your image file that you downloaded and select your microSD drive letter. Then flash!  
5\. After flashing is done eject microSD and unplug.  
6\. Plug in microSD into your NanoPi and wait for it to flash (LEDs pictured below for reference)

[![image.png](https://wiki.stoplagging.com/uploads/images/gallery/2024-01/scaled-1680-/B44image.png)](https://wiki.stoplagging.com/uploads/images/gallery/2024-01/B44image.png)

  
7\. Hook up WAN to your modem. Hook up LAN to either your switch which connects to a computer or hook up LAN directly to your computer.  
8\. Power on. Wait about 3 minutes.  
9\. On the computer that is connected to the switch or NanoPi's LAN port. Go to web browser and enter in [http://192.168.2.1](http://192.168.2.1) to access your router

That's it! All that is left is to configure SQM with fq\_codel as shown . There's no need to install luci-app-sqm because the FriendlyWrt image has everything already! You just need to enable SQM via the [official openWrt guide](https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm) or my [guide.](https://www.stoplagging.com/openwrt-method-fq_codel-cake/)

Either way feel free to improve it further with the [advanced cake config section of this page](https://wiki.stoplagging.com/books/technical-guides/page/x86-routers-for-gigabit-sqm-with-openwrt#bkmrk-1.4-advanced-cake-co)

If you want to fine tune cake further you can see the section below this page: [https://wiki.stoplagging.com/books/technical-guides/page/sqm-for-up-to-800-mbps-lines-with-openwrt#bkmrk-1.4-advanced-cake-co](https://wiki.stoplagging.com/books/technical-guides/page/sqm-for-up-to-1-gbps-lines-with-openwrt#bkmrk-1.4-advanced-cake-co)

### 1.3 What Access Point to Get?

I keep hearing raving reviews about the Ubiquiti APs and use one myself. I have extremely stable WiFi with these and never have to reboot them. Ubiquiti also advertises up to 200 concurrent users as well! If you have a recommendation better than these I'd like to know.

[Ubiquiti Unifi 6 Pro](https://store.ui.com/us/en/pro/category/wifi-flagship/products/u6-pro)<span class="product-current-sku"> (**Official Link)**</span>   
  
If you plan on only having one Ubiquti AP I recommend [installing via the phone](https://lazyadmin.nl/home-network/setup-unifi-ap-without-controller/) so you don't have to bother with more complicated things like AP Controllers.

If you're on a budget and can't buy a dedicated AP. You **can try turning your old router** into an **access point** by putting it into AP mode instead of routing mode. This is important because you should be letting the OpenWrt device do the routing to prevent bufferbloat not your old router.

Another option you could try that I've heard are good are the <span class="product-current-sku">[TP-Link EAP670](https://www.amazon.com/TP-Link-EAP670-Wireless-Seamless-Integrated/dp/B09ZV19DBP/ref=sr_1_4?crid=1M4Y8LX621QPT&amp;keywords=tp-link+omada+access+point&amp;qid=1704591674&amp;sprefix=tp-link+omada+access+poin%252Caps%252C161&amp;sr=8-4&_encoding=UTF8&tag=stopl02-20&linkCode=ur2&linkId=1d304da599013ae323d3ed5495bd3061&camp=1789&creative=9325) **(Amazon Referral Link)**</span>. I have no real world experience with these as I don't own any, but I heard they are solid products in the /r/homenetworking community.

##### Facts about WiFi

If you need more coverage you should get more APs not one single AP with a bunch of antennas, because those are marketing gimmicks.

WiFi has limited range due to the physics of their frequency bands.

5Ghz can handle more bandwidth, but will usually be about half the range of 2.4Ghz.

### 1.4 Advanced Cake Configuration

This section is for my own reference and these were recommended by the official docs: [https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm-details#sqmqueue\_discipline\_tab](https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm-details#sqmqueue_discipline_tab)

It's not necessary to do this but if you want even further ping stability under load it might be worthwhile!

<span class="style-scope yt-formatted-string" dir="auto">Under the Queue Discipline tab of SQM.   
</span><span class="style-scope yt-formatted-string" dir="auto">Enable the checkmark for advanced configuration and save&amp; apply. </span>   
  
<span class="style-scope yt-formatted-string" dir="auto">This turns on squash\_dscp, squash\_ingress, ECN on ingress and NOECN on egress. Leave them as defaults as they are good the way they are. (If you have symmetrical fiber then ECN can be enabled on egress.</span>   
  
<span class="style-scope yt-formatted-string" dir="auto">Next checkmark and enable "Dangerous Configuration" which is below the "Advanced Configuration" section. We are going to disable triple-isolate and enable per host isolation... </span> <span class="style-scope yt-formatted-string" dir="auto">Here's a short explanation.</span>   
  
<span class="style-scope yt-formatted-string" dir="auto">To quote the docs, by default, cake will use triple-isolate: “which will first make sure that no internal or internal host will hog too much bandwidth and then will still guarantee for fairness for each host. In that mode, Cake mostly does the right thing. It would ensure that no single stream and no single host could hog all the capacity of the WAN link. However, it can’t prevent a BitTorrent client – with multiple connections – from monopolizing most of the capacity.”</span> <span class="style-scope yt-formatted-string" dir="auto">You can enable per host isolation, which will identify all source/destination information.   
  
To enable that,</span> <span class="style-scope yt-formatted-string" dir="auto">Add the following to the “Advanced option strings” (in the Interfaces → SQM-QoS page; Queue Discipline tab, look for the Dangerous Configuration options):</span>   
  
<span class="style-scope yt-formatted-string" dir="auto">For queueing disciplines handling incoming packets from the internet (internet-ingress): nat dual-dsthost ingress</span>   
  
<span class="style-scope yt-formatted-string" dir="auto">For queueing disciplines handling outgoing packets to the internet (internet-egress): nat dual-srchost</span>   
  
<span class="style-scope yt-formatted-string" dir="auto">For me that means Qdisc options (ingress) I wrote in "nat dual-dsthost ingress" while for   
Qdisc options (egress) I wrote in "nat dual-srchost"</span>

### 1.5 Performance Tweaks for R4S and R6S

<p class="callout success">As of 2025.02.15 The NanoPi R6S is official supported by OpenWrt! Performance tweaks are no longer necessary! See [https://github.com/StarWhiz/NanoPi-R6S-CPU-Optimization-for-Gigabit-SQM/tree/main/How%20To%20Flash%20Official%20OpenWrt%20To%20R6S%20eMMC](https://github.com/StarWhiz/NanoPi-R6S-CPU-Optimization-for-Gigabit-SQM/tree/main/How%20To%20Flash%20Official%20OpenWrt%20To%20R6S%20eMMC) on how to flash!</p>

- [https://github.com/StarWhiz/NanoPi-R6S-CPU-Optimization-for-Gigabit-SQM/tree/main](https://github.com/StarWhiz/NanoPi-R6S-CPU-Optimization-for-Gigabit-SQM/tree/main) for NanoPi R6S  
    
    - Performance improvement for cake SQM jumps from 800 Mbps to 1400+ Mbps afterwards
- [https://github.com/StarWhiz/NanoPi-R6S-CPU-Optimization-for-Gigabit-SQM/tree/main/R4S%20CPU%20Optimization](https://github.com/StarWhiz/NanoPi-R6S-CPU-Optimization-for-Gigabit-SQM/tree/main/R4S%20CPU%20Optimization) for NanoPi R4S  
    
    - Performance improvement for cake SQM jumps from 630 Mbps up to 800 Mbps afterwards.

#### Deprecated way to fix this  


```
## Step1: Get CPU Frequencies to confirm that cores 4, 5, 6, and 7 are the faster cores. CPU0 starts from the top.
cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_max_freq

## Step2: Get IRQ ##s (In my example below they are 31 for eth0 and 88 for eth1 yours may be different)
grep eth /proc/interrupts

## My output of Step2 yours may be different
grep eth /proc/interrupts
 74:          0          0          0          0          0          0          0          0     GICv3 266 Level     eth0
 75:          0          0          0          0          0          0          0          0     GICv3 265 Level     eth0
128:          0          0      61981          0          0          0          0    2335426   ITS-MSI 570949632 Edge      eth1-0
144:          0          0    1236903          0          0          0          0          0   ITS-MSI 570949648 Edge      eth1-16
146:          0          0          0          0          0          0          0          0   ITS-MSI 570949650 Edge      eth1-18
149:          0          0          0          0          5          0          0          3   ITS-MSI 570949653 Edge      eth1-21
160:          0          0          0     148716    4732058          0          0          0   ITS-MSI 428343296 Edge      eth2-0
176:          0          0          0    1559148          0          0          0          0   ITS-MSI 428343312 Edge      eth2-16
178:          0          0          0          0          0          0          0          0   ITS-MSI 428343314 Edge      eth2-18
181:          0          0          0          0          0          0          0          7   ITS-MSI 428343317 Edge      eth2-21

## What is your IRQ ##?
By default eth2-0 is the WAN port and eth1-0 is the 2.5gbps LAN port on the R6S. So the lines of interest are below:
160:          0          0          0     148716    4732058          0          0          0   ITS-MSI 428343296 Edge      eth2-0
128:          0          0      61981          0          0          0          0    2335426   ITS-MSI 570949632 Edge      eth1-0

Your IRQ number might be different from mine whcih is 160 for 2.5 Gbps WAN and 128 for 2.5Gbps LAN

## Optional Step: List CPU Cores Assigned to Current IRQs
cat /proc/irq/160/smp_affinity
cat /proc/irq/128/smp_affinity

## Optional Step: List CPU Cores Assigned Current Queues
cat /sys/class/net/eth0/queues/rx-0/rps_cpus
cat /sys/class/net/eth1/queues/rx-0/rps_cpus

The optional steps above are to see what the values are currently. Nowe we will change them!

## Step3: The Performance Tweaks. The idea here is to put IRQ cpu affinities on Faster A76 Cores. 
And assign all CPU cores to the queues.

#ETH0 irq on core 4,5 (a76 core) replace 160 with your actual IRQ number for WAN
echo -n 30 > /proc/irq/160/smp_affinity

#ETH1 irq on core 6,7 (a76 core) replace 128 with your actual IRQ number for WAN
echo -n c0 > /proc/irq/128/smp_affinity

#ETH0 queues on all CPU cores
echo -n ff > /sys/class/net/eth0/queues/rx-0/rps_cpus

#ETH1 queues on all CPU cores
echo -n ff > /sys/class/net/eth1/queues/rx-0/rps_cpus

#ETH2 queues on all CPU cores
echo -n ff > /sys/class/net/eth1/queues/rx-0/rps_cpus
```

<p class="callout warning">If you restart [Smart Queue Management](https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm "docs:guide-user:network:traffic-shaping:sqm") or change SQM settings, it will **reset** the CPU affinity and you will **need** to re-apply the performance tweaks again. I recommend doing it the new way  
</p>

#### Optional understanding of CPU Affinity

This section below is **optional** and is for my understanding of how the hex value selects certain CPU cores.

```
## Performance Tweaks Quick Reference R6S
Binary   = hex ## = cpu core
00000001 = hex 1 = cpu core 0 (A55) selected
00000010 = hex 2 = cpu core 1 (A55) selected
00000100 = hex 4 = cpu core 2 (A55) selected
00001000 = hex 8 = cpu core 3 (A55) selected
00010000 = hex 10 = cpu core 4 (A76) selected
00100000 = hex 20 = cpu core 5 (A76) selected
01000000 = hex 40 = cpu core 6 (A76) selected
10000000 = hex 80 = cpu core 7 (A76) selected

## Examples (Note CPU0 starts on the right. CPU7 ends on the left. Read from right to left)
00001111 = hex 0f = cpu cores 0, 1, 2 and 3 selected
11111111 = hex ff = all cpu cores selected
11110000 = hex f0 = cpu cores 4, 5, 6, 7 selected
00110000 = hex 30 = cpu cores 4, 5 selected
11000000 = hex c0 = cpu cores 6, 7 selected

Just use binary and covert it to hex, 1 = select that cpu core and 0 = unselect that cpu core.
```

### 1.6 Contact

If you need help or consultation please join my rocket.chat server at [https://chat.stoplagging.com/invite/zaMu6X](https://chat.stoplagging.com/invite/zaMu6X) you can message me @Starfroz by looking me up under the globe icon after registering and logging in.

[![image-1609968043493.png](https://wiki.stoplagging.com/uploads/images/gallery/2021-01/scaled-1680-/image-1609968043493.png)](https://wiki.stoplagging.com/uploads/images/gallery/2021-01/image-1609968043493.png)

### External Resources for Nano Pi R4S

**R4S Benchmarks by Van Tech Corner on Youtube**: [https://www.youtube.com/watch?v=t5xuTy1xn64](https://www.youtube.com/watch?v=t5xuTy1xn64)

**R6S Benchmarks by Van Tech Corner on Youtube**: [https://www.youtube.com/watch?v=2bCf8Xchrfc](https://www.youtube.com/watch?v=2bCf8Xchrfc)

**R4S Performance Tweaking:** https://forum.openwrt.org/t/nanopi-r4s-rk3399-4g-is-a-great-new-openwrt-device/79143/406

<div class="notranslate" id="bkmrk--9" style="all: initial;"></div><div class="notranslate" id="bkmrk--10" style="all: initial;"></div><div class="notranslate" id="bkmrk--11" style="all: initial;"></div>

# Miyoo Mini V3 20221216 or 20221224 Firmware Specific Guide for Onion OS

This wiki comes with 20221216 or 20221224 firmware specific instructions for the Miyoo Mini V3 journey that I personally went thru.

##### Backup your official Miyoo SD Card

It's not mentioned on the OnionOS GitHub Installation Guide, but you should back up your official Miyoo SD Card. I just copied all the contents to my PC. It contains BIOS files and the ROMs. The BIOS being more important.

If you want to be extra safe you can make an image of the stock Miyoo MicroSD Card w/ a program called WIN32DiskImager on Windows.

[![image-1673087611871.png](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/scaled-1680-/image-1673087611871.png)](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/image-1673087611871.png)

On **WIN32DiskImager** I plugged in the Official SD Card into my Windows computer. Selected a location to save to. Then clicked "Read" to read the SD card image into my computer.

##### A. How to Use Higher Capacity MicroSD Cards on Miyoo V3

Skip this step if you're not using a microSD card bigger than 32GB. If you have a card higher than 32GB you'll have to format your higher capacity card in FAT32. I did this with [Rufus](https://rufus.ie/en/) in Windows. Video below shows you how to format.

<video controls="controls" height="606" width="474"><source src="https://wiki.stoplagging.com/attachments/23"></source></video>

##### B. Follow Onion OS Official Documentation

I followed the "Installing (on an empty SD card)" instructions since I wanted to use my bigger 256GB Samsung MicroSD card.

Official Onion OS GitHub Repository: [https://github.com/OnionUI/Onion/wiki/Installation](https://github.com/OnionUI/Onion/wiki/Installation)

<p class="callout warning">Only install Onion OS v.4.0.4 or later for firmware versions starting with 20221216 or 20221224. If you don't you may encounter soft brick and have to recover w/ I2C methods. As long as you downloaded 4.0.4 or later you should be safe.</p>

You can reference this [section](https://wiki.stoplagging.com/books/technical-guides/page/miyoo-mini-v3-20221216-or-20221224-firmware-specific-guide-for-onion-os#bkmrk-miyoo-to-onionos-rom) if you are having trouble w/ the folder mappings in Step 3 of the official doc.

##### C. Upgrade Firmware from 20221216/2022124 to Hotfix Firmware

I was able to proceed w/ this step after "[Step 2: Copy the installation files and boot up your device to begin the installation](https://github.com/OnionUI/Onion/wiki/Installation#step-2-copy-the-installation-files-and-boot-up-your-device-to-begin-the-installation)", but you can also do it after Step 3.

<p class="callout info">This is an important upgrade for our specific units running firmware 20221216XXXX or 20221224XXXX. Do not use this upgrade from any other firmware versions.  
  
Why it is important?  
\* Reduces the startup time from 20s to 12s.  
\* Allows system settings to persist after reboot (this is only an issue on 20221216).  
  
As of December 2022 Miyoo was no longer able to source the internal flash chip they were using so they sourced a new chip very similar in functionality, but they didn't immediately receive the <span class="c0">additional drivers needed to enable full write functionality with this new chip</span>. This is why the hotfix is solves the two issues above. Learn more [here.](https://docs.google.com/document/d/e/2PACX-1vQCTMHDUz2jJBPx3XbvXGVukRJ0t96JKe1gchuV9i5eo3RqY1mIwFx8H1Ja-3sQtFXcHh3U72O8DNcY/pub)  
  
</p>

If you want to follow the discussion thread it is here: [https://www.reddit.com/r/MiyooMini/comments/104qbak/community\_firmware\_patch\_for\_new\_devices/?sort=new](https://www.reddit.com/r/MiyooMini/comments/104qbak/community_firmware_patch_for_new_devices/?sort=new)

The actual firmware is downloaded here (make sure you dl the zip called "Firmware patch 20230104 (only for new devices).zip" not the other ones): [https://drive.google.com/drive/folders/1OvmkKEtSMEWv1RY8LPsbDk0ylWzOg\_7j?usp=sharing](https://drive.google.com/drive/folders/1OvmkKEtSMEWv1RY8LPsbDk0ylWzOg_7j?usp=sharing)

**Official Instructions Below**

Notes: Don't be like me and use a USB-C to USB-C cable w/ PD. It only worked w/ a USB-A to USB- C Cable. It's important that you follow all the steps, but especially "Step #3 Delete the firmware file".

```
Step 1 - Transfer the file
--------------------------

Copy the firmware image (miyoo283_fw.img) to the root of the SD card.


Step 2 - Flash the firmware
---------------------------

IMPORTANT: Do not power off device when upgrade starts

1. Make sure the device is off.

2. Insert the SD card into the device.

3. Insert the charging cable.
   - Do not press the POWER button.
   - It will power on and do the firmware upgrade automatically.

4. Wait for the upgrade to finish (about 2 minutes).

5. Unplug the charging cable when the charging screen appears.
   - Some devices will show "FINAL GATE / UNLOCKED", this is just a themed charging screen.
   - If you wait too long the screen will be off, it is still save to unplug then.
   - After removing the cable, wait for the device to power off.


Step 3 - Delete the firmware file
---------------------------------

IMPORTANT: Delete the firmware file from the SD card after the upgrade!


Notes on charging
-----------------

Use a known good USB-A to C charger.
```

Now you should be done with your Miyoo. The rest of the topics below are optional.

####  

#### Optional: Miyoo to OnionOS Rom Folder Mappings

This mapping list was determined from this source: [https://github.com/OnionUI/Onion/wiki/Emulators](https://github.com/OnionUI/Onion/wiki/Emulators)

It's for Step 3 of [https://github.com/OnionUI/Onion/wiki/Installation#step-3-copy-over-your-bios-and-rom-files](https://github.com/OnionUI/Onion/wiki/Installation#step-3-copy-over-your-bios-and-rom-files)

This is WIP and may not be 100% correct. You can DM me on reddit if you have any inputs. [https://www.reddit.com/user/Frozutek/](https://www.reddit.com/user/Frozutek/)

<p class="callout warning">From [https://github.com/OnionUI/Onion/wiki/Emulators#rom-files](https://github.com/OnionUI/Onion/wiki/Emulators#rom-files)  
  
The roms on the included Miyoo Mini SD Card are a mixed bag which can lead to incompatibility with some emulators. It is highly recommended to source your own roms to get the most out of the device.</p>

<table id="bkmrk-original-miyoo-sd-ca" style="height: 770px; width: 100%;" width="100%"><tbody><tr style="height: 35px;"><td style="height: 35px;" width="50%">**Original Miyoo SD Card**

</td><td style="height: 35px;" width="50%">**Onions OS SD Card**

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\ARCADE\\cps1

</td><td style="height: 35px;" width="50%">\\Roms\\CPS1

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\ARCADE\\cps2

</td><td style="height: 35px;" width="50%">\\Roms\\CPS2

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\ARCADE\\cps3

</td><td style="height: 35px;" width="50%">\\Roms\\CPS3

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\ARCADE\\pgm

</td><td style="height: 35px;" width="50%">\\Roms\\ARCADE

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\ARCADE\\shoot

</td><td style="height: 35px;" width="50%">\\Roms\\ARCADE

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\ATARI2600

</td><td style="height: 35px;" width="50%">\\Roms\\ATARI

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\ATARI7800

</td><td style="height: 35px;" width="50%">\\Roms\\SEVENTYEIGHTHUNDRED

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\FC

</td><td style="height: 35px;" width="50%">\\Roms\\FC

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\GB

</td><td style="height: 35px;" width="50%">\\Roms\\GBC (I put it here because it's backwards compatible on GBC)

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\GBC

</td><td style="height: 35px;" width="50%">\\Roms\\GBC

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\GBA

</td><td style="height: 35px;" width="50%">\\Roms\\GBA

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\MAME2003PLUS

</td><td style="height: 35px;" width="50%">\\Roms\\ARCADE

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\MAME2010

</td><td style="height: 35px;" width="50%">Don’t know yet

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\MD

</td><td style="height: 35px;" width="50%">\\Roms\\MD

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\MS

</td><td style="height: 35px;" width="50%">\\Roms\\MS

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\NEOGEO

</td><td style="height: 35px;" width="50%">\\Roms\\NEOGEO

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\NGP

</td><td style="height: 35px;" width="50%">\\Roms\\NGP

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\PCE

</td><td style="height: 35px;" width="50%">\\Roms\\PCE

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\PS

</td><td style="height: 35px;" width="50%">\\Roms\\PS

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\SFC

</td><td style="height: 35px;" width="50%">\\Roms\\SFC (Note: Games worked after unzipping)

</td></tr><tr style="height: 35px;"><td style="height: 35px;" width="50%">\\Roms\\WS

</td><td style="height: 35px;" width="50%">\\Roms\\WS

</td></tr></tbody></table>

#### Optional References / Resources Below

##### Onion Manual Displayed During Install

[![image-1673087943309.png](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/scaled-1680-/image-1673087943309.png)](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/image-1673087943309.png)

##### GitHub Docs (For More Help)

[https://github.com/OnionUI/Onion/wiki](https://github.com/OnionUI/Onion/wiki)

##### For those w/ 3D printers

**1. Better Shoulder Buttons (Resin Printer Only)**

STL Files: [https://www.thingiverse.com/thing:5422756](https://www.thingiverse.com/thing:5422756)

Install Guide: [https://vinitleedoes.notion.site/Better-Buttons-Installation-Guide-63e9eb7d93b2453a8c98bdce345ff37f](https://vinitleedoes.notion.site/Better-Buttons-Installation-Guide-63e9eb7d93b2453a8c98bdce345ff37f)

Discussion Thread: [https://old.reddit.com/r/MiyooMini/comments/voi09o/i\_designed\_better\_shoulder\_buttons\_new\_version/](https://old.reddit.com/r/MiyooMini/comments/voi09o/i_designed_better_shoulder_buttons_new_version/)

**2. Screen Protector (Any 3D Printer)**

STL Files: [https://www.printables.com/model/240152-miyoo-mini-minimal-flippable-screen-protector](https://www.printables.com/model/240152-miyoo-mini-minimal-flippable-screen-protector)

**3. Ergonomic Grip**

I recommend the MK2 which has retaining tabs on the front. Feels significantly great for use at home when you aren't on the go!

STL Files: [https://www.thingiverse.com/thing:5463606/files](https://www.thingiverse.com/thing:5463606/files)

**4. Better Grip Case V2**

STL Files: [https://www.printables.com/model/297997-miyoo-mini-better-gripcase-ver-2](https://www.printables.com/model/297997-miyoo-mini-better-gripcase-ver-2)

##### GBA Save State Importing from Miyoo to Onion

Naming convention and paths are different on Miyoo and Onion. Just start by copying from Miyoo to Onion. Then rename the copies with \*.state1 and \*.state1.png.

<p class="callout info">renaming the copies from Miyoo to state0 and state0.png did not work for me on Onion OS so I started with state1 and state1.png in my examples.</p>

Example below:

```
MiyooPath: \Roms\GBA\.gpsp_libretro
****************************************************
Some Game Title (USA).0.png
Some Game Title (USA).0.state

Onion Path: \Saves\CurrentProfile\states\gpSP
****************************************************
Some Game Title (USA).state1.png
Some Game Title (USA).state1
```

After doing this you can load the state you imported from the game w/ (Gameswitcher Button + Select Button) &gt; Save States &gt; State Slot (Choose slot 1). Then load state!

# Miyoo Mini V3 Female Screen Connector Part

### Introduction

So the reason for this wiki is for identifying the part my friend broke (pictured below) when trying to replace the buttons on the Miyoo Mini V3. This is the FFC/FPC connector that connects to the ribbon cable of the Miyoo Mini screen.

[![image-1674375792056.png](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/scaled-1680-/image-1674375792056.png)](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/image-1674375792056.png)

Someone who has soldering experience or hot plate experience can attempt to replace the FFC/FPC connector. There's some tutorials on YouTube about soldering FFC/FPC connectors as well.

### Conclusion / Where to Buy the Part

<p class="callout success">My best guess/conclusion is that the FH35C is a good direct replacement for the FFC/FPC connector.  
  
Update 2023.01.31: I have confirmed that this is 100% the right part and it was extremely difficult to solder. My mom who is a professional solderer of 30 years took about an hour to replace this part. Taking out the old part was easy put putting in the replacement was the hard part.</p>

  
**Aliexpress** FH35C-27S-0.3SH: [https://www.aliexpress.us/item/2251832661601648.html?gatewayAdapt=glo2usa4itemAdapt&amp;\_randl\_shipto=US](https://www.aliexpress.us/item/2251832661601648.html?gatewayAdapt=glo2usa4itemAdapt&_randl_shipto=US)

[![image-1674376405137.png](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/scaled-1680-/image-1674376405137.png)](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/image-1674376405137.png)

**Mouser** FH35C-27S-0.3SHW(99):<span class="x4k7w5x x1h91t0o x1h9r5lt xv2umb2 x1beo9mf xaigb6o x12ejxvf x3igimt xarpa2k xedcshv x1lytzrv x1t2pt76 x7ja8zs x1qrby5j x1jfb8zj"><span role="gridcell">[ https://mou.sr/3Ws6JTt](https://mou.sr/3Ws6JTt?fbclid=IwAR27VYKrNA8giBNVs3jDhmSqdn04rpI14bvuwPheXm5R_cdU7IueIf45gxY)</span></span>

[![image-1674377023661.png](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/scaled-1680-/image-1674377023661.png)](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/image-1674377023661.png)

### How I arrived at the conclusion above

As you can see here in the first photo above,the connector has DIANWEI and 27 printed on it. It also measures about 1mm high from the board facing you.

I figured out it was by DIANWEI ELECTRONIC TECHNOLOGY CO.,LTD

From the DIANWEI ELECTRONIC TECHNOLOGY CO.,LTD catalog I found on Google: [https://wiki.stoplagging.com/attachments/24](https://wiki.stoplagging.com/attachments/24)

I was able to deduce it to be the 8.03A0.027200. or the 8.03A0.\*\*\*200 series. This series has two substitutes, the **HRS FH35C** or the **SCG BL143**.

[![image-1674376028663.png](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/scaled-1680-/image-1674376028663.png)](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/image-1674376028663.png)

This deduction was made from the height being close to 0.9mm and the number pins being 27P. The only other one that had 27P was the 2.0mm height which is double the size. The 8.03A0.027200 can also use HRS FH35C or SCG BL143 as substitutes.

[![image-1674376768309.png](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/scaled-1680-/image-1674376768309.png)](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/image-1674376768309.png)

[![image-1674376117715.png](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/scaled-1680-/image-1674376117715.png)](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/image-1674376117715.png)

From here we can also see that a 27 pin FFC/FPC connector is 9.70mm in length. This matches the FH35C Series from [https://www.hirose.com/product/series/FH35C](https://www.hirose.com/product/series/FH35C)

As you can see the \[DIM A\] matches the Connector length for the various pin counts. That's how i found out the FH35C series is an appropriate replacement connector.

[![image-1674376900041.png](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/scaled-1680-/image-1674376900041.png)](https://wiki.stoplagging.com/uploads/images/gallery/2023-01/image-1674376900041.png)

# Senior Shinobi NVR Stack configuration when getting new Gateway / Firewall

### DNS

Freenom DNS records updated to new public IP

### Ports Forwarded

If on Xfi Gateway this has to be done on xfinity mobile app. This is unfortunately the case for new XFI gateways.

80/tcp, 443/tcp, and 51820/tcp have to be forwarded to the server and has to done under the same IP.

Multiple ports can be added to the same IP in the XFi app so don't worry

### IP Reservation

Reserved IPs are still configured on 10.0.0.1. Default login is admin //// password

Assign these IPs to the Cameras

```
UIDCAM4 = 10.0.0.71
UIDCAM3 = 10.0.0.16
UIDCAM2 = 10.0.0.253
UIDCAM1 = 10.0.0.242
```

### Check Reolink Client App

Make sure all FTP Surveillance is working and that all Cameras have a video feed.

IP Addresses reserved must match.

<p class="callout info">As of 2023.10.01 all 4 camera IPs are set as static IPs. On new comcast gateways they should retain the same internal IPs.</p>

### Shinobi Web App

Make sure each camera has the same reserved IPs.

### Bonus

Fix client Wireguard config IP address range to 10.0.0.0/24

Update client Wireguard config to the new public IP address

# x86 routers for Gigabit SQM with OpenWrt

If you're here. It's because you want to get SQM for **1400Mbps+** and connections. The reason I'm saying 1400Mbps+ is because that is my current maximum provided by my ISP. The set up has potential for more than 1400Mbps. This is a write up based on an Intel N100 CPU mini PC I've tested.

If your internet connection is between **160-630 Mbps** it is more economical for you to get a NanoPi R4SE and follow the [NanoPi guide](https://wiki.stoplagging.com/books/technical-guides/page/nanopi-r6s-r4s-for-gigabit-sqm-with-openwrt) instead. The NanoPi R6S is also cheaper and can do **1400Mbps+** as well, but keeps requiring constant CPU tweaks. For some reason it kept defaulting to the slower A55 cores instead of using the A76 cores every time I modify SQM settings.

Now on to the physical setup.

<span class="product-current-sku">The diagram below demonstrates how you would install any x86 Mini PC as a router in your network stack. Building your home network infrastructure like this, is more reliable and better than consumer routers which try to combine the modem, routing, and wireless all in one.</span>

[![firefox_tIgLausVr0.png](https://wiki.stoplagging.com/uploads/images/gallery/2024-01/scaled-1680-/firefox-tiglausvr0.png)](https://wiki.stoplagging.com/uploads/images/gallery/2024-01/firefox-tiglausvr0.png)

Pictured Switch - [TP-Link 2.5Gbps 8 Port Multi-gigabit switch](https://www.amazon.com/TP-Link-TL-SG108-M2-Multi-Gigabit-Wall-Mount-Protection/dp/B08ZHZL5Q7/ref=sr_1_3?crid=2PTK1PYOPBEMC&amp;keywords=2.5+gigabit+switch+tp-link&amp;qid=1704589664&amp;sprefix=2.5+gigabit+switch+tp-lin%252Caps%252C134&amp;sr=8-3&_encoding=UTF8&tag=stopl02-20&linkCode=ur2&linkId=04325de997c423bf7fca03bbc72a9158&camp=1789&creative=9325) **(Amazon Referral Link)** I earn a small commission on these links thank you!

Pictured Access Point - [Ubiquiti Unifi 6 Pro](https://store.ui.com/us/en/pro/category/wifi-flagship/products/u6-pro)<span class="product-current-sku"> (**Official Link)** Note: If Ubiquiti is out of stock you or if you don't like them, I heard that the [TP-Link EAP670](https://www.amazon.com/TP-Link-EAP670-Wireless-Seamless-Integrated/dp/B09ZV19DBP/ref=sr_1_4?crid=1M4Y8LX621QPT&amp;keywords=tp-link+omada+access+point&amp;qid=1704591674&amp;sprefix=tp-link+omada+access+poin%252Caps%252C161&amp;sr=8-4&_encoding=UTF8&tag=stopl02-20&linkCode=ur2&linkId=1d304da599013ae323d3ed5495bd3061&camp=1789&creative=9325) **(Amazon Referral Link)** from their Omada lines work just as great. A reader of mine prefers Omada over the Ubiquiti stuff. I just have never tried it myself so I can't say much.  
</span>

<span class="product-current-sku">Pictured OpenWrt Device - [BeeLink EQ12 Intel N100 Mini-PC](https://www.amazon.com/gp/product/B0C339KVH9/ref=ox_sc_saved_title_1?smid=APV34ZV660JMX&amp;psc=1&_encoding=UTF8&tag=stopl02-20&linkCode=ur2&linkId=70bf8f30fb1600d04e78bdc0341bda2a&camp=1789&creative=9325) **(Amazon Referral Link)**. If you're cheap and don't mind waiting you get an N100 x86 miniPC from Aliexpress. I had good experience with the one on the [WooYi Storefront](https://www.aliexpress.us/item/3256805850545059.html?spm=a2g0o.order_list.order_list_main.5.32b81802nplCsn&gatewayAdapt=glo2usa).  
</span>

If you want a beefier PC that's probably overkill the [AceMagician ](https://amzn.to/3TLYnHM)<span class="product-current-sku">**(Amazon Referral Link)**</span> with the AMD Ryzen 5800U or the [Beelink EQR6](https://amzn.to/3ZFqegC) <span class="product-current-sku">**(Amazon Referral Link)**</span> would work. The over point is to make sure you get an x86 PC with at least 2, 1Gbps RJ-45 Ethernet ports.

<p class="callout info"><span class="product-current-sku">**What is bufferbloat and why do we not want it?** It is lag or ping spikes in video games or zoom calls that is caused when you or someone else uses up all your bandwidth. It could be torrenting, 4k streaming, bulk downloads, or even a speedtest. SQM algorithms (fq\_codel or cake) which are available on OpenWrt, can completely mitigate these pings and ensures low latency even under full load. Overall, you do sacrifice a little max speed 5-10% for guaranteed low latencies.</span></p>

#### Hardware Requirements

The minimum requirement for choosing one of these x86 based PCs is as follows

1\. Make sure it has at least **2x 1 Gbps Ethernet ports or better**. Intel Ethernet ports are generally preferred over Realtek ports but Realtek ports will do. You might want to consider 2.5 Gbps if your ISP (Internet Service Provider) has the capability.

2\. You also want to make sure it has a CPU Mark of 5000 or more. And a strong single core performance of 1200+. You can check here: [https://www.cpubenchmark.net/cpu\_list.php](https://www.cpubenchmark.net/cpu_list.php)

3\. Preferably it would be a low power device that uses &lt; 25 Watts.

### Intel Alder Lake N100 12th Generation Based Mini PCs

#### Performance of N100

On my 1400 Mbps connection I was able to run cake SQM at 1350Mbps with up to 40% CPU Usage on a single CPU core so there's a lot of room for more Mbps!

[![image.png](https://wiki.stoplagging.com/uploads/images/gallery/2024-01/scaled-1680-/image.png)](https://wiki.stoplagging.com/uploads/images/gallery/2024-01/image.png)

#### Installing OpenWrt

As for installation of software. OpenWrt has an official written guide here: [https://openwrt.org/docs/guide-user/installation/openwrt\_x86](https://openwrt.org/docs/guide-user/installation/openwrt_x86)

If you're lost on what to do no worries I can give some pointers. I typically choose the generic-squashfs-combined-efi.img.gz image

1. I normally would take out the nVME SSD of my miniPC to an external enclosure.
2. Plug it into my primary PC.
3. Then flash the official image (using win32diskimager or balenaetcher for windows) it to my Router PC's nVME SSD inside the enclosure.
4. Then I would take the nVME back out of the enclosure and install it back in the miniPC.
5. That's pretty much it! OpenWrt should boot from there. The default ports for WAN and LAN may incorrect such as ETH0 being LAN and ETH1 being WAN but we can fix that.

**Optional (Swapping ETH0 to WAN and ETH1 to LAN)**: This is done in Network &gt; Interfaces -&gt; Devices Tab -&gt; Then hitting configure under the device called "br-lan"/

[![image.png](https://wiki.stoplagging.com/uploads/images/gallery/2024-01/scaled-1680-/9gLimage.png)](https://wiki.stoplagging.com/uploads/images/gallery/2024-01/9gLimage.png)

Attach eth1 as the bridge port. You can also attach eth2 eth3 if you have more ports, just make sure you detach eth0.

Then go back to Network &gt; Interfaces. Edit "wan" and "wan6" so that they use eth0 instead of eth1.

Then save and apply. Plug your machine to ETH1 (or ETH2 ETH3 if you have those.... and Modem into ETH0.

**Optional (Expand rootfs to use all SSD size) :** Now the problem with all the openWrt images is that the root partition is small by defualt. The easiest thing you can do to expand this size is to boot a live ubuntu usb disk. Run gparted and expand the rootfs partition so you can utilize the full size of your SSD.

After OpenWrt is setup and running you just need to enable SQM via the [official openWrt guide](https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm) or my [guide.](https://www.stoplagging.com/openwrt-method-fq_codel-cake/)

Either way feel free to improve it further with the [advanced cake config section of this page](https://wiki.stoplagging.com/books/technical-guides/page/x86-routers-for-gigabit-sqm-with-openwrt#bkmrk-1.4-advanced-cake-co)

#### Gotchas

If you're not getting your beyond Gigabit speeds make sure you're using CAT6 or higher Ethernet cables and make sure the devices like the laptop you're using also have 2.5 Gbps ports.

In the diagram, I made sure that the example router, switch, and access point all had 2.5 Gbps ports!

### What Access Point to Get?

I keep hearing raving reviews about the Ubiquiti APs and use one myself. I have extremely stable WiFi with these and never have to reboot them. Ubiquiti also advertises up to 200 concurrent users as well! If you have a recommendation better than these I'd like to know.

[Ubiquiti Unifi 6 Pro](https://store.ui.com/us/en/pro/category/wifi-flagship/products/u6-pro)<span class="product-current-sku"> (**Official Link)**</span>   
  
If you plan on only having one Ubiquti AP I recommend [installing via the phone](https://lazyadmin.nl/home-network/setup-unifi-ap-without-controller/) so you don't have to bother with more complicated things like AP Controllers.

If you're on a budget and can't buy a dedicated AP. You **can try turning your old router** into an **access point** by putting it into AP mode instead of routing mode. This is important because you should be letting the OpenWrt device do the routing to prevent bufferbloat not your old router.

Another option you could try that I've heard are good are the <span class="product-current-sku">[TP-Link EAP670](https://www.amazon.com/TP-Link-EAP670-Wireless-Seamless-Integrated/dp/B09ZV19DBP/ref=sr_1_4?crid=1M4Y8LX621QPT&amp;keywords=tp-link+omada+access+point&amp;qid=1704591674&amp;sprefix=tp-link+omada+access+poin%252Caps%252C161&amp;sr=8-4&_encoding=UTF8&tag=stopl02-20&linkCode=ur2&linkId=1d304da599013ae323d3ed5495bd3061&camp=1789&creative=9325) **(Amazon Referral Link)**</span>. I have no real world experience with these as I don't own any, but I heard they are solid products in the /r/homenetworking community.

##### Facts about WiFi

If you need more coverage you should get more APs not one single AP with a bunch of antennas, because those are marketing gimmicks.

WiFi has limited range due to the physics of their frequency bands.

5Ghz can handle more bandwidth, but will usually be about half the range of 2.4Ghz.

### Advanced Cake Configuration

This section is for my own reference and these were recommended by the official docs: [https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm-details#sqmqueue\_discipline\_tab](https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm-details#sqmqueue_discipline_tab)

It's not necessary to do this but if you want even further ping stability under load it might be worthwhile!

<span class="style-scope yt-formatted-string" dir="auto">Under the Queue Discipline tab of SQM.   
</span><span class="style-scope yt-formatted-string" dir="auto">Enable the checkmark for advanced configuration and save&amp; apply. </span>   
  
<span class="style-scope yt-formatted-string" dir="auto">This turns on squash\_dscp, squash\_ingress, ECN on ingress and NOECN on egress. Leave them as defaults as they are good the way they are. (If you have symmetrical fiber then ECN can be enabled on egress.</span>   
  
<span class="style-scope yt-formatted-string" dir="auto">Next checkmark and enable "Dangerous Configuration" which is below the "Advanced Configuration" section. We are going to disable triple-isolate and enable per host isolation... </span> <span class="style-scope yt-formatted-string" dir="auto">Here's a short explanation.</span>   
  
<span class="style-scope yt-formatted-string" dir="auto">To quote the docs, by default, cake will use triple-isolate: “which will first make sure that no internal or internal host will hog too much bandwidth and then will still guarantee for fairness for each host. In that mode, Cake mostly does the right thing. It would ensure that no single stream and no single host could hog all the capacity of the WAN link. However, it can’t prevent a BitTorrent client – with multiple connections – from monopolizing most of the capacity.”</span> <span class="style-scope yt-formatted-string" dir="auto">You can enable per host isolation, which will identify all source/destination information.   
  
To enable that,</span> <span class="style-scope yt-formatted-string" dir="auto">Add the following to the “Advanced option strings” (in the Interfaces → SQM-QoS page; Queue Discipline tab, look for the Dangerous Configuration options):</span>   
  
<span class="style-scope yt-formatted-string" dir="auto">For queueing disciplines handling incoming packets from the internet (internet-ingress): nat dual-dsthost ingress</span>   
  
<span class="style-scope yt-formatted-string" dir="auto">For queueing disciplines handling outgoing packets to the internet (internet-egress): nat dual-srchost</span>   
  
<span class="style-scope yt-formatted-string" dir="auto">For me that means Qdisc options (ingress) I wrote in "nat dual-dsthost ingress" while for   
Qdisc options (egress) I wrote in "nat dual-srchost"</span>

### <span class="style-scope yt-formatted-string" dir="auto">Optional: Docker on x86</span>

<span class="style-scope yt-formatted-string" dir="auto">This section is for those of you who run docker containers.</span>

<span class="style-scope yt-formatted-string" dir="auto">For x86 machines you'll need to run the following commands in order for docker-compose to work and wg-easy docker container to work. For some reason the default opkg install docker-compose does not seem to work, so the solution is below.</span>

```
The first command line:
opkg remove docker luci-app-dockerman docker-compose dockerd --autoremove --force-remove

Then command line:
opkg install docker luci-app-dockerman docker-compose dockerd --force-maintainer

opkg install luci-proto-wireguard
opkg install wireguard-tools
```

### Contact

If you need help or consultation please join my rocket.chat server at [https://chat.stoplagging.com/invite/zaMu6X](https://chat.stoplagging.com/invite/zaMu6X) you can message me @Starfroz by looking me up under the globe icon after registering and logging in.

[![image-1609968043493.png](https://wiki.stoplagging.com/uploads/images/gallery/2021-01/scaled-1680-/image-1609968043493.png)](https://wiki.stoplagging.com/uploads/images/gallery/2021-01/image-1609968043493.png)

<div class="notranslate" id="bkmrk--7" style="all: initial;"></div>