User Tools

Site Tools


ubiquiti:cli:dns_forwarding

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
ubiquiti:cli:dns_forwarding [2020/09/15 08:16] – created 192.168.1.1ubiquiti:cli:dns_forwarding [2020/09/15 09:14] (current) 192.168.1.1
Line 1: Line 1:
 ====== Ubiquiti - CLI - DNS forwarding ====== ====== Ubiquiti - CLI - DNS forwarding ======
 +
 +===== ssh into your Controller =====
 +
 +ssh into your Controller (NOT the USG!).
 +
 +For controller on:
 +
 +  * **Windows**: C:\Users\<user>\Ubiquiti UniFi\data\sites\default
 +  * **Mac**: /Users/<user>/Library/Application Support/UniFi/data/sites/<site-name>/config.gateway.json
 +  * **Ubuntu**: /usr/lib/unifi/data/sites/default
 +  * **CloudKey**: /srv/unifi/data/sites/default
 +
 +
 +<WRAP info>
 +**NOTE:**  Use the site-name you had configured instead of "default" if you did.
 +</WRAP>
 +
 +
 +----
 +
 +Create/Edit the file config.gateway.json in your site directory:
 +
 +<file bash config.gateway.json>
 +{
 + "service": {
 + "dns": {
 + "forwarding": {
 + "options": [
 + "host-record=AP-EG-WZ.WORKGROUP,192.168.1.3",
 + "host-record=AP-OG-SZ.WORKGROUP,192.168.1.5"
 + ]
 + }
 + }
 + }
 +}
 +</file>
 +
 +<WRAP info>
 +**NOTE:**  It is a good habit to run a sanity check on your .json file before pushing it to the device.
 +
 +Simply copy & paste it to JSON Formatter & Validator.  There are many of them available such as https://jsonformatter.curiousconcept.com/
 +
 +</WRAP>
 +
 +----
 +
 +===== Finalize =====
 +
 +
 +Once the file is on the UniFi-Controller:
 +
 +  * Navigate to **Devices**.
 +  * Click your USG.
 +  * Click the "Config"-icon
 +  * Click "Manage Device" and pick "Provision" under Force Provisioning.
 +
 +----
 +
 +===== Verify =====
 +
 +Verify the setting by ssh'ing into your USG, enter "configure" and "show system".
 +
 +----
 +
 +===== References =====
 +
 +https://help.ui.com/hc/en-us/articles/115004872967-UniFi-Where-is-unifi-base-
  
ubiquiti/cli/dns_forwarding.1600157817.txt.gz · Last modified: 2020/09/15 08:16 by 192.168.1.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki