# Networking

# DNS



# Apple Private Relay on pihole

if your Apple device has a DNS issue, but the DNS queries are not showing in the pihole logs you should see something along the lines of `mask.icloud.com` and `mask-h2.icloud.com` being blocked as Blocked (Special Domain) nxdomain. This appears to be a problem with Apple Private Relay, which can happen even when this is disabled. Below are the steps to resolve the issue.

Open the pihole server and edit `/etc/pihole/pihole-FTL.conf` in a text editor of your choice

add the line `BLOCK_ICLOUD_PR=false`

Save the file and reboot the hardware

After reboot Apple device DNS queries should begin to show properly in the pihole, and the PR `mask.icloud.com` and `mask-h2.icloud.com` domains should no longer be visible.

# Blocking External Client DNS Queries

# Blocking External Client DNS Queries

This procedure configures the firewall to block DNS requests from local clients to servers outside the local network. With no other accessible DNS servers, clients are forced to send DNS requests to the DNS Resolver or DNS Forwarder on pfSense® software for resolution.

Note

Blocking is effective but does not gracefully handle the situation. Clients must manually adjust their configuration to use the firewall for DNS. Redirecting DNS requests to the firewall is a more seamless solution. See [<span class="doc">Redirecting Client DNS Requests</span>](https://docs.netgate.com/pfsense/en/latest/recipes/dns-redirect.html) for details.

- Navigate to **Firewall &gt; Rules**, **LAN** tab
- Create the block rule as the first rule in the list:
    
    
    - Click ![fa-level-up](https://docs.netgate.com/pfsense/en/latest/_images/fa-level-up.png) **Add** to create a new rule at the top of the list
    - Fill in the following fields on the rule:
        
        <dl class="field-list simple"><dt class="field-odd">Action</dt><dd class="field-odd">*Reject*
        
        </dd><dt class="field-even">Interface</dt><dd class="field-even">*LAN*
        
        </dd><dt class="field-odd">Protocol</dt><dd class="field-odd">*TCP/UDP*
        
        </dd><dt class="field-even">Destination</dt><dd class="field-even">*Any*
        
        </dd><dt class="field-odd">Destination Port Range</dt><dd class="field-odd">*DNS (53)*
        
        </dd><dt class="field-even">Description</dt><dd class="field-even">`<span class="pre">Block</span> <span class="pre">DNS</span> <span class="pre">to</span> <span class="pre">Everything</span> <span class="pre">Else</span>`
        
        </dd></dl>
- Create the pass rule to allow DNS to the firewall, above the block rule:
    
    
    - Click ![fa-level-up](https://docs.netgate.com/pfsense/en/latest/_images/fa-level-up.png) **Add** to create a new rule at the top of the list
    - Fill in the following fields on the rule:
        
        <dl class="field-list simple"><dt class="field-odd">Action</dt><dd class="field-odd">*Pass*
        
        </dd><dt class="field-even">Interface</dt><dd class="field-even">*LAN*
        
        </dd><dt class="field-odd">Protocol</dt><dd class="field-odd">*TCP/UDP*
        
        </dd><dt class="field-even">Destination</dt><dd class="field-even">*LAN Address*
        
        </dd><dt class="field-odd">Destination Port Range</dt><dd class="field-odd">*DNS (53)*
        
        </dd><dt class="field-even">Description</dt><dd class="field-even">`<span class="pre">Pass</span> <span class="pre">DNS</span> <span class="pre">to</span> <span class="pre">the</span> <span class="pre">Firewall</span>`
        
        </dd></dl>
- Click ![fa-check](https://docs.netgate.com/pfsense/en/latest/_images/fa-check.png) **Apply Changes** to reload the ruleset

When complete, there will be two rule entries that look like the following picture:

![../_images/blockdns.png](https://docs.netgate.com/pfsense/en/latest/_images/blockdns.png)

Certain local PCs could be allowed to use other DNS servers by placing a pass rule for them above the block rule.

<div class="section" id="bkmrk--1"><span id="bkmrk--2"></span></div>## DNS over TLS

Another concern is that clients could use DNS over TLS to resolve hosts. DNS over TLS sends DNS requests over an encrypted channel on an alternate port, `<span class="pre">853</span>`.

This traffic can be blocked with a firewall rule for port `<span class="pre">853</span>` using the same procedure used for `<span class="pre">53</span>`. Though if the firewall will not be providing DNS over TLS service to clients, do not add the pass rule.

<div class="section" id="bkmrk--3"></div><div class="section" id="bkmrk--4"><span id="bkmrk--5"></span></div>## DNS over HTTPS

Similar to DNS over TLS, clients may also use DNS over HTTPS (DoH). This is harder to block as it uses port `<span class="pre">443</span>`. Blocking port `<span class="pre">443</span>` on common public DNS servers may help (e.g. `<span class="pre">1.1.1.1</span>`, `<span class="pre">8.8.8.8</span>`).

Some browsers automatically attempt to use DNS over HTTPS because they believe it to be more secure and better for privacy, though that is not always the case. Each browser may have its own methods of disabling this feature. Firefox uses a “canary” domain `<span class="pre">use-application-dns.net</span>` by default. If Firefox cannot resolve this name, Firefox disables DNS over HTTPS.

To prevent Firefox from using DNS over HTTPS, add the following to the DNS Resolver custom options:

```
server:
local-zone: "use-application-dns.net" always_nxdomain
```

# Pi-Hole

Pi-Hole is a DNS server that has built in ability to block queries. It does this by returning 0.0.0.0 for queries on the block list.

[Pi-Hole Home Page](https://pi-hole.net/)

For [installation instructions](https://github.com/pi-hole/pi-hole/#one-step-automated-install)

<table border="1" id="bkmrk-list-of-commands-cha" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 99.8765%;"></col></colgroup><tbody><tr><td>List of Commands</td></tr><tr><td>Change password: sudo pihole -a -p

Pi-Hole v6 updated command to

```
sudo pihole setpassword
```

Update: pihole -up

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

# Redirecting Client DNS Requests

# Redirecting Client DNS Requests

**Before you begin: Network level DNS must be set to use the pFsense firewall or DNS queries will fail. Attempting to redirect all DNS queries to your own DNS server, only to try and then send them off to Google or Cloudflared will fail.**

To restrict client DNS to only the DNS Resolver or Forwarder on pfSense® software, use a port forward to capture all client DNS requests.

Note

Either The DNS Resolver or DNS Forwarder must be active and it must bind to and answer queries on *Localhost*, or *All* interfaces.

See also

<div class="admonition seealso" id="bkmrk-blocking-external-cl">- [<span class="std std-ref">Blocking External Client DNS Queries</span>](https://docs.coltscomputer.services/books/networking/page/blocking-external-client-dns-queries "Blocking External Client DNS Queries")
- [<span class="std std-ref">Blocking Web Sites Using DNS</span>](https://docs.coltscomputer.services/books/networking/page/blocking-web-sites "Blocking Web Sites")

</div>The following example uses the LAN interface but the same technique will work with any local interface.

- Navigate to **Firewall &gt; NAT**, **Port Forward** tab
- Click ![fa-level-up](https://docs.netgate.com/pfsense/en/latest/_images/fa-level-up.png) **Add** to create a new rule
- Fill in the following fields on the port forward rule:
    
    <dl class="field-list simple"><dt class="field-odd">Interface</dt><dd class="field-odd">*LAN*
    
    </dd><dt class="field-even">Protocol</dt><dd class="field-even">*TCP/UDP*
    
    </dd><dt class="field-odd">Destination</dt><dd class="field-odd">**Invert Match** *checked*, *LAN Address*
    
    </dd><dt class="field-even">Destination Port Range</dt><dd class="field-even">*DNS (53)*
    
    </dd><dt class="field-odd">Redirect Target IP</dt><dd class="field-odd">`<span class="pre">127.0.0.1</span>`
    
    </dd><dt class="field-even">Redirect Target Port</dt><dd class="field-even">*DNS (53)*
    
    </dd><dt class="field-odd">Description</dt><dd class="field-odd">`<span class="pre">Redirect</span> <span class="pre">DNS</span>`
    
    </dd><dt class="field-even">NAT Reflection</dt><dd class="field-even">*Disable*
    
    </dd></dl>

When complete, the port forward must appear as follows:

![../_images/redirect_dns_port_forward.png](https://docs.netgate.com/pfsense/en/latest/_images/redirect_dns_port_forward.png)

Note

If DNS requests to other DNS servers are blocked, such as by following [<span class="doc">Blocking External Client DNS Queries</span>](https://docs.coltscomputer.services/books/networking/page/blocking-external-client-dns-queries "Blocking External Client DNS Queries"), ensure the rule to pass DNS to `<span class="pre">127.0.0.1</span>` is above any rule that blocks DNS.

With this port forward in place, DNS requests from local clients to **any** external IP address will result in the query being answered by the firewall itself. Access to other DNS servers on port 53 is impossible.

Tip

This can be adapted to allow access to only a specific set of DNS servers by changing the Destination network from “LAN Address” to an alias containing the allowed DNS servers. The **Invert match** box should remain checked.

Warning

Clients using DNS over TLS or DNS over HTTPS could circumvent this protection. Redirecting or blocking port `<span class="pre">853</span>` may help with DNS over TLS, depending on the clients.

See [<span class="doc">Blocking External Client DNS Queries</span>](https://docs.netgate.com/pfsense/en/latest/recipes/dns-block-external.html) for additional advice.

# Configure Conditional Forwarder on PiHole

[![image.png](https://docs.coltscomputer.services/uploads/images/gallery/2025-02/scaled-1680-/T4AjJeY1cC4KyhsW-image.png)](https://docs.coltscomputer.services/uploads/images/gallery/2025-02/T4AjJeY1cC4KyhsW-image.png)

Enter one entry per line like the above

# Redirect to a different domain - Cloudflared

[https://drive.google.com/file/d/1-uxqWlPEd4vYTOfqIfMYyf\_fkyS-vM8D/view?usp=drive\_link](https://drive.google.com/file/d/1-uxqWlPEd4vYTOfqIfMYyf_fkyS-vM8D/view?usp=drive_link)

[![image.png](https://docs.coltscomputer.services/uploads/images/gallery/2025-02/scaled-1680-/SI3BCrehH0EGhobl-image.png)](https://docs.coltscomputer.services/uploads/images/gallery/2025-02/SI3BCrehH0EGhobl-image.png)

# Redirect from root to WWW - cloudflared

[https://drive.google.com/file/d/1igk01QjlggVZXxe2pbHMNy\_MtNCZoxkC/view?usp=drive\_link](https://drive.google.com/file/d/1igk01QjlggVZXxe2pbHMNy_MtNCZoxkC/view?usp=drive_link)

[![image.png](https://docs.coltscomputer.services/uploads/images/gallery/2025-02/scaled-1680-/4L6ruQ3q1fV9Wu6f-image.png)](https://docs.coltscomputer.services/uploads/images/gallery/2025-02/4L6ruQ3q1fV9Wu6f-image.png)

# Redirect Domain to New Domain

This config should allow you to redirect source.example.com to destination.example.com using cloudflared and Odoo as examples

First setup HTTP 301 redirect rules from the source to the destination domain.

[![image.png](https://docs.coltscomputer.services/uploads/images/gallery/2025-02/scaled-1680-/COGjRjWk7DuN0S4O-image.png)](https://docs.coltscomputer.services/uploads/images/gallery/2025-02/COGjRjWk7DuN0S4O-image.png)

[![image.png](https://docs.coltscomputer.services/uploads/images/gallery/2025-02/scaled-1680-/tKxaWAiVIsSkezM0-image.png)](https://docs.coltscomputer.services/uploads/images/gallery/2025-02/tKxaWAiVIsSkezM0-image.png)

Next configure the DNS records

[![image.png](https://docs.coltscomputer.services/uploads/images/gallery/2025-02/scaled-1680-/K3wEZztiUd7pOOCl-image.png)](https://docs.coltscomputer.services/uploads/images/gallery/2025-02/K3wEZztiUd7pOOCl-image.png)

This should redirect [www.source.example.com](https://www.source.example.com) and source.example.com to [www.destination.example.com](https://www.destination.example.com).

\#Cloudflared #Odoo #DNS #Redirect

# DNS Scavenging

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">DNS Scavenging is a great answer to a problem that has been nagging everyone since RFC 2136 came out way back in 1997. Despite many clever methods of ensuring that clients and DHCP servers that perform dynamic updates clean up after themselves sometimes DNS can get messy. Remember that old test server that you built two years ago that caught fire before it could be used? Probably not. DNS still remembers it though. There are two big issues with DNS scavenging that seem to come up a lot:</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">"I'm hitting this 'scavenge now' button like a snare drum and nothing is happening. Why?"</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">or</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">"I woke up this morning, my DNS zones are nearly empty and Active Directory is sitting in a corner rocking back and forth crying. What happened?"</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">This post should help us figure out when the first issue will happen and completely avoid the second. We'll go through how scavenging is setup then I'll give you my best practices. </span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Scavenging setup</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Scavenging will help you clean up old unused records in DNS. Since "clean up" really means "delete stuff" a good understanding of what you are doing and a healthy respect for "delete stuff" will keep you out of the hot grease. Because deletion is involved there are quite a few safety valves built into scavenging that take a long time to pop. When enabling scavenging patience is required. It will work just fine, but not today!</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Note:</span></span><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080"> </span></span><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">For purposes of this discussion we are going to concentrate on the most common Windows DNS scenario: Windows Server 2003 DNS servers hosting AD integrated zones.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Scavenging is set in three places on a Windows Server:</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<div class="OutlineElement Ltr  BCX0 SCXO88076080" id="bkmrk-on-the-individual-re">1. <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">On the individual resource record to be scavenged.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
2. <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">On a zone to be scavenged.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
3. <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">At one or more servers performing scavenging.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

</div><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">It must be set in all three places or nothing happens.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Scavenging settings on a Resource Record</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">To see the scavenging setting on a record hit View | Advanced in the DNS MMC then bring up properties on a record. </span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<div class="OutlineElement Ltr  BCX0 SCXO88076080" id="bkmrk-"><div class="WACImageContainer Selected  BCX0 SCXO88076080" role="presentation"><span aria-hidden="true" class="WACAltTextDescribedBy  BCX0 SCXO88076080" id="bkmrk--1"></span>![image](http://bookstack.coltscomputer.services/uploads/images/gallery/2023-12/embedded-image-p6pghmao.png)</div></div><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Scavenging gets set on a resource record in one of three ways. The first is by someone coming in here, checking the "Delete this record when it becomes stale" checkbox and hitting apply. When you hit apply the time of day will be rounded down to the nearest hour and applied as the timestamp on the record. Static records have a timestamp of 0 indicating do not scavenge. </span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">The second is when a record gets created by a client machine registering using dynamic DNS. Windows clients will attempt to dynamically update DNS every 24 hours. All DDNS records get set to scavenge. When a record is first created by a client that has no existing record it is considered an "Update" and the timestamp is set. If the client has an existing host record and changes the IP of the host record this is also considered an "Update" and the timestamp is set. If the client has an existing host record with the same IP address then this is considered a "Refresh" and the timestamp may or may not get changed depending on zone settings. More on this later.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">The third way to set scavenging on records is by using DNScmd.exe with the /ageallrecords switch. Let's pause here for a few moments to consider a few important words: All, Records, Delete, Stuff. If you actually run this command against a zone it will truly set scavenging and a timestamp on all records in the zone including static records that you never want to be scavenged. Because of the time it takes scavenging to do it's thing people find this command and get tempted to give it a try. Do not. It will delete stuff. Have patience instead.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Once a timestamp is set on a record it will replicate around to all servers that host the zone. There is one caveat to this. If scavenging is not enabled on the zone that hosts the record then it will never scavenge so the timestamp is essentially irrelevant. The timestamp may get updated on the server where the client dynamically registers but it will not replicate around to the other servers in the zone.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Scavenging Settings at the Zone</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Before a server will even look at a record to see if it will be scavenged the zone must have scavenging enabled. To access the scavenging settings for a zone right click the zone, select properties then on the general tab hit the "Aging" button. This screen is universal for the zone. If you view it on any DNS server where this zone is replicated it will be the same.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<div class="OutlineElement Ltr  BCX0 SCXO88076080" id="bkmrk--2"><div class="WACImageContainer Selected  BCX0 SCXO88076080" role="presentation"><span aria-hidden="true" class="WACAltTextDescribedBy  BCX0 SCXO88076080" id="bkmrk--3"></span>![image](http://bookstack.coltscomputer.services/uploads/images/gallery/2023-12/embedded-image-soqetiiv.png)</div></div><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">When you first set scavenging on a zone the timestamp seen at the bottom (reload zone if you don't see it) will be set to the current time of day rounded down to the nearest hour plus the Refresh interval. This also gets reset any time the zone is loaded or any time dynamic updates get enabled on the zone. </span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">The "zone can be scavenged after" timestamp is the first of your safety valves. It gives clients time to get their record timestamp updated before the big axe swings. Since new record timestamps are not replicated while zone scavenging is disabled this also gives replication time to get things in order.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Refresh and No-Refresh intervals</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">The next safety valves are the Refresh and No-refresh intervals. </span></span><span class="TextRun Underlined  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Both</span></span><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080"> of these must elapse before a record can be deleted.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">The No-refresh interval is a period of time during which a resource record cannot be refreshed. Recall from earlier that a refresh is a dynamic update where we are not changing the host/IP of a resource record, just touching the timestamp. If a client changes the IP of a host record this is considered an "update" and is exempt from the No-refresh interval. The purpose of a No-refresh interval is simply to reduce replication traffic. A change to a record means a change that must be replicated.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">After the (Record Timestamp) + (No-refresh interval) elapses we enter the Refresh interval. The refresh interval is the time when refreshes to the timestamp are allowed. This is the time when good things must happen. The client is allowed to come in and update it's timestamp. This timestamp will be replicated around and the No-refresh interval begins again. If for some reason the client fails to update it's record during the refresh interval it becomes </span></span><span class="TextRun Underlined  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">eligible</span></span><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080"> to be scavenged. Will it disappear immediately? Probably not but it is certainly possible.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Note:</span></span><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080"> </span></span><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">When setting Refresh and No-Refresh intervals be sure to allow enough time for clients to get </span></span><span class="TextRun Underlined  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">several</span></span><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080"> registration attempts during a Refresh interval. Failure to do so could allow a record to become eligible for scavenging simply from a failed refresh attempt.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">One last thing before we leave the zone setting behind. If you right click on your server you will see the option to "Set Aging/Scavenging for All Zones...". Selecting this will take you to a screen similar to the one above. What does this do? This sets the default settings that will be used if a new zone is created by this server. Unless you check the subsequent box "Apply these settings to the existing Active Directory-integrated zones" it will not touch existing zones.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Scavenging settings on the Server</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">So you now have a resource resource record set to scavenge and a zone set to scavenge. All that is left is for somebody to come along, check all the timestamps and delete some stuff. This is done by any server that hosts the AD integrated zone. </span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Setting scavenging on the server is done by right clicking the server in the MMC, selecting properties, going to the advanced tab and checking the "Enable automatic scavenging of stale records" checkbox.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<div class="OutlineElement Ltr  BCX0 SCXO88076080" id="bkmrk--4"><div class="WACImageContainer Selected  BCX0 SCXO88076080" role="presentation"><span aria-hidden="true" class="WACAltTextDescribedBy  BCX0 SCXO88076080" id="bkmrk--5"></span>![image](http://bookstack.coltscomputer.services/uploads/images/gallery/2023-12/embedded-image-5d3pfrgt.png)</div></div><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">The Scavenging Period is how often this particular server will attempt to scavenge. When a server scavenges it will log a DNS event 2501 to indicate how many records were scavenged. An event 2502 will be logged if no records were scavenged. Only one server is required to scavenge since the zone data is replicated to all servers hosting the zone.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Tip: </span></span><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">You can tell exactly when a server will attempt to scavenge by taking the timestamp on the most recent 2501/2502 event and adding the Scavenging period to it.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Although you can set every server hosting the zone to scavenge I recommend just having one. The logic for this is simple: If the one server fails to scavenge the world won't end. You'll have one place to look for the culprit and one set of logs to check. If on the other hand you have many servers set to scavenge you have many logs to check if scavenging fails. Worse yet, if things start disappearing unexpectedly you don't want to go hopping from server to server looking for 2501 events.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">To facilitate strict control over which server is scavenging for a zone you can use DNSCmd.exe to specify exactly which servers may scavenge. For example the following command will make it so that only 192.168.1.1 and 192.168.1.2 DNS servers are allowed to scavenge on the contoso.com zone:</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">DNSCmd . /ZoneResetScavengeServers contoso.com 192.168.1.1 192.168.1.2</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">With the server now scavenging, zones enabled for scavenging, and resources records set what actually happens when the server does it's thing?</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">The scavenging process and final safety valves</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">When the last 2501/2052 event + the server scavenging period comes around the server is going to make a scavenging attempt. You can also manually initiate an attempt by right clicking the server and selecting "Scavenge Stale Resource Records". Note that manually making an attempt in no way bypasses the safety valves. These are the final safety valves before we "delete stuff":</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<div class="OutlineElement Ltr  BCX0 SCXO88076080" id="bkmrk-is-scavenging-enable">- <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Is scavenging enabled on the zone? Pretty self explanatory.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
- <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Is dynamic update enabled on the zone? If it's not there is a good chance timestamps will be old enough that mass deletions can occur.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
- <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Is the scavenging server listed as one of the "Scavenge Servers" for the zone?</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
- <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Are we past the "zone can be scavenged after" timestamp on the zone? This gives the clients and AD replication to get things squared away before we start. </span></span><span class="EOP  BCX0 SCXO88076080"> </span>
- <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Has it been longer than a refresh interval since this zone was last replicated in Active Directory? If scavenging gets enabled on a server that has replication issues this will prevent it from tombstoning a bunch of records that may be perfectly fine on other servers.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

</div><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">If all of the above checks are good then the zone is ready to be scavenged. At this point the scavenging server checks the timestamp on each individual resource record. If the current date/time is greater than the timestamp + No-refresh + Refresh then the record is deleted.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">My best practices</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Here is how I set scavenging up on a preexisting zone. This procedure is designed for maximum safety. Using default settings this process can take as long as 4-5 weeks (2 weeks Sanity phase, 2-3 weeks for Enable phase)</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Setup phase</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<div class="OutlineElement Ltr  BCX0 SCXO88076080" id="bkmrk-turn-off-scavenging-">1. <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Turn off scavenging on all servers. To confirm scavenging won't inadvertently run use the DNSCmd /ZoneResetScavengeServers to confine scavenging to a single server then ensure this server has scavenging disabled.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
2. <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Turn on scavenging on the zones you wish to scavenge. Set the refresh and No-refresh intervals as desired. If you want things to scavenge more aggressively I would recommend lowering the No-refresh interval at the cost of some replication traffic. Leave the refresh at the default.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
3. <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Add today's date plus the Refresh and No-Refresh intervals. Come back in a few weeks when this time has elapsed. Seriously you can't rush this.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

</div><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Sanity check phase</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Sift through your DNS records looking for any records older than the Refresh + No-Refresh interval. If you see any then something has gone wrong with the dynamic registration process and it must be corrected before proceeding. </span></span><span class="TextRun Underlined  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">A thorough check at this point is the most important step</span></span><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080"> in setup</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Things to check if you find old records:</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<div class="OutlineElement Ltr  BCX0 SCXO88076080" id="bkmrk-does-an-ipconfig-%2Fre">- <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Does an IPConfig /registerdns work?</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
- <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Who is the owner of the record (see security tab in the record properties)?</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
- <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Was the record statically created by an admin then later enabled for scavenging? If so you may need to delete the record to clear ownership and run an IPConfig /registerdns to get it updated.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
- <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Is the server replicating OK with AD?</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

</div><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Do not proceed unless you can explain any outdated records. In the next phase they will be deleted.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Enable phase</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">The final step is to actually enable scavenging. Enable scavenging on the single server you used the /ZoneResetScavengServers command on.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Once enabled create a new test record and enable it for scavenging. Then map out the point in time when this record will disappear. Here is how:</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<div class="OutlineElement Ltr  BCX0 SCXO88076080" id="bkmrk-start-with-the-times">1. <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Start with the timestamp on the record</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
2. <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Add the refresh interval</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
3. <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Add the no refresh interval</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
4. <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">The result will be your "eligible to scavenge" time. The record will not disappear at this time though. It's just eligible.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
5. <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Check your DNS event logs for 2501 and 2502 events to find what hour the DNS server is doing a scavenging run.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
6. <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Take your "eligible to scavenge" time, find the most recent 2501/2502 event and add the server's Scavenging Period (from server properties | advanced tab) to it. This is the point in time when the test record you just created will disappear.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

</div><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Lets look at an example with the following assumptions:</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<div class="OutlineElement Ltr  BCX0 SCXO88076080" id="bkmrk-zone-is-set-to-a-3-d">- <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Zone is set to a 3 day Refresh and a 3 day No-Refresh interval</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
- <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Server Scavenging period is set to 3 days</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
- <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Last DNS Event id 2501 or 2502 occurred at 6am on 1/1/2008</span></span><span class="EOP  BCX0 SCXO88076080"> </span>
- <span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">We have a record with a timestamp of 1/1/2008 at 12:00 noon</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

</div><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Given these assumptions you can rub your temples for a bit and predict that the record will be deleted at approximately 6am on 1/10/2008.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<div class="OutlineElement Ltr  BCX0 SCXO88076080" id="bkmrk--6"><div class="WACImageContainer Selected  BCX0 SCXO88076080" role="presentation"><span aria-hidden="true" class="WACAltTextDescribedBy  BCX0 SCXO88076080" id="bkmrk--7"></span>![image](http://bookstack.coltscomputer.services/uploads/images/gallery/2023-12/embedded-image-ism52vfe.png)</div></div><span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">Once scavenging is enabled you can check back periodically to look for the 2501 and 2502 events to see how things are going. You can also come back at the predicted date and time and see if your test record disappeared.</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">That's it!</span></span><span class="EOP  BCX0 SCXO88076080"> </span>

<span class="EOP  BCX0 SCXO88076080"> </span>

<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">From &lt;</span></span>[<span class="TextRun  BCX0 SCXO88076080" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">http://blogs.technet.com/b/networking/archive/2008/03/19/don-t-be-afraid-of-dns-scavenging-just-be-patient.aspx</span></span>](http://blogs.technet.com/b/networking/archive/2008/03/19/don-t-be-afraid-of-dns-scavenging-just-be-patient.aspx)<span class="TextRun  BCX0 SCXO88076080" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO88076080">&gt; </span></span><span class="EOP  BCX0 SCXO88076080"></span>

# Generate SSL Cert using Command Line

Install openssl on Windows:

In cmd.exe: C:\\&gt; winget install openssl

Then from its folder go with C:\\&gt; openssl req -newkey rsa:2048 -nodes -x509 -keyout server.key -out server.crt

Linux sudo apt install openssl

```
openssl ecparam -list_curves
```

```
openssl ecparam -out ec_key.pem -name secp256r1 -genkey 
```

```
openssl req -new -key ec_key.pem -x509 -nodes -days 365 -out cert.pem
```

# Network Monitoring PRTG



# Integrate PRTG with Active Directory

By default, PRTG uses its own internal user account database to authenticate users. For many PRTG  
customers, particularly those with smaller networks, this local authentication meets all their needs.

But for PRTG customers who have more complex environments and infrastructures or who want to reduce the number of authentication mechanisms in their networks, PRTG offers Active Directory (AD) integration as well.

This way, all members of the AD user groups that are mapped to user groups in PRTG during the integration can log in to PRTG with their AD domain credentials afterward.

<div class="pageelement active color-white fullwidth" id="bkmrk-"><div class="groupsegment-body"><div class="segments-not-tabs"><div class="pageelement active col-08" id="bkmrk--1"></div></div><div class="clear">  
</div></div></div><div class="pageelement active color-black-blue fullwidth" id="bkmrk--2"><div class="arrow">  
</div><div class="groupsegment-body"><a name="prepare"></a><div class="tabsegment"></div></div></div><a name="database"></a>

## 1. Prepare your Active Directory for PRTG integration

<div class="pageelement active color-black-blue fullwidth" id="bkmrk--4"><div class="groupsegment-body"><div class="segments-not-tabs"><div class="pageelement active col-12" id="bkmrk--5"></div></div><div class="clear">  
</div></div></div><div class="pageelement active color-grey-10 arrow-black-blue color-white fullwidth" id="bkmrk-%C2%A0"><div class="arrow"> </div><div class="groupsegment-body"><div class="tabsegment"><div class="tabsegment-tabs">  
</div></div><div class="segments-not-tabs"><div class="pageelement active col-12" id="bkmrk--6"></div><div class="pageelement active col-06" id="bkmrk--7"><div class="imageelement lightbox">[![Active Directory users and computers](https://hlassets.paessler.com/common/files/screenshots/prtg-v17-4/how-to-guides/02_active-directory/new_ad-prepare.jpg)](https://hlassets.paessler.com/common/files/screenshots/prtg-v17-4/how-to-guides/02_active-directory/new_ad-prepare.jpg)</div></div><div class="pageelement active col-06">  
</div></div></div></div>In the AD, make sure that users who require the same [access rights](https://www.paessler.com/manuals/prtg/user_access_rights) for PRTG are in the same AD user group.

In our example, the AD user group *PRTG\_ADM* contains the two administrator user accounts that later have administrative rights in PRTG and that can also manage access rights and cluster setups and change the monitoring configuration of PRTG. The AD user group *PRTG\_RO* contains the four user accounts that later have only read access rights in PRTG.

<div class="pageelement active color-grey-10 arrow-black-blue color-white fullwidth" id="bkmrk--8"><div class="groupsegment-body"><div class="segments-not-tabs"><div class="pageelement active col-06" id="bkmrk--9"></div></div><div class="clear">  
</div></div></div><div class="pageelement active color-black-blue fullwidth" id="bkmrk-%C2%A0-1"><div class="arrow"> </div><div class="groupsegment-body"><a name="prepareserver"></a><div class="tabsegment"><div class="tabsegment-tabs">  
</div></div><div class="segments-not-tabs"><div class="pageelement active col-12">  
</div></div></div></div><a name="prepareserver"></a>

## 2. Prepare your PRTG core server system

<div class="pageelement active color-black-blue fullwidth" id="bkmrk--11"><div class="groupsegment-body"><div class="segments-not-tabs"><div class="pageelement active col-12" id="bkmrk--12"></div></div><div class="clear">  
</div></div></div><div class="pageelement active color-white arrow-black-blue fullwidth" id="bkmrk-%C2%A0-2"><div class="arrow"> </div><div class="groupsegment-body"><div class="tabsegment"><div class="tabsegment-tabs">  
</div></div><div class="segments-not-tabs"><div class="pageelement active col-03" id="bkmrk--13"></div><div class="pageelement active col-06">  
</div></div></div></div>Make sure that the PRTG core server system is a member of the AD domain with which you want to integrate it. You can check and, if necessary, change this setting via the Windows **Control Panel**:

<div class="pageelement active color-white arrow-black-blue fullwidth" id="bkmrk-navigate-to%C2%A0system.-"><div class="groupsegment-body"><div class="segments-not-tabs"><div class="pageelement active col-06" id="bkmrk-navigate-to%C2%A0system.--1">1. Navigate to **System**.
2. Go to section **Computer name, domain, and workgroup settings**.
3. Check the settings **Full computer name** and **Domain**.

</div></div><div class="clear">  
</div></div></div><div class="pageelement active color-black-blue fullwidth" id="bkmrk-%C2%A0-3"><div class="arrow"> </div><div class="groupsegment-body"><div class="tabsegment"><div class="tabsegment-tabs">  
</div></div><div class="segments-not-tabs"><div class="pageelement active col-12">  
</div></div></div></div><a name="database"></a>

## 3. Add Active Directory domain details to PRTG

<div class="pageelement active color-black-blue fullwidth" id="bkmrk--15"><div class="groupsegment-body"><div class="segments-not-tabs"><div class="pageelement active col-12" id="bkmrk--16"></div></div><div class="clear">  
</div></div></div><div class="pageelement active color-grey-10 arrow-black-blue fullwidth" id="bkmrk-%C2%A0-4"><div class="arrow"> </div><div class="groupsegment-body"><div class="tabsegment"><div class="tabsegment-tabs">  
</div></div><div class="segments-not-tabs"><div class="pageelement active col-06" id="bkmrk--17"><div class="imageelement lightbox">[![Active Directory domain details](https://hlassets.paessler.com/common/files/screenshots/prtg-v17-4/how-to-guides/02_active-directory/review082021/newer_ad-domain-details.jpg)](https://hlassets.paessler.com/common/files/screenshots/prtg-v17-4/how-to-guides/02_active-directory/review082021/newer_ad-domain-details.jpg)</div></div><div class="pageelement active col-06"><div>  
</div></div></div></div></div>In the next step, you need to provide your local AD domain details in PRTG:

<div class="pageelement active color-grey-10 arrow-black-blue fullwidth" id="bkmrk-open-the-prtg-web-in"><div class="groupsegment-body"><div class="segments-not-tabs"><div class="pageelement active col-06" id="bkmrk-open-the-prtg-web-in-1"><div>1. Open the PRTG web interface and select **Setup** | **System Administration** |  
    **Core &amp; Probes** from the main menu.
2. Go to section **Active Directory Integration** and enter your local AD domain name in the **Domain Name** field.
3. Choose your preferred **LDAP Connection Security**
4. Under **Access Type**, select **Use explicit credentials** to define the Windows service account that PRTG uses to authenticate against the AD.  
    ![additional info manual](https://hlassets.paessler.com/common/files/screenshots/prtg-v17-4/how-to-guides/backups/additional-info_manual.svg) The service account must have the **Read permissions**, **Read all properties**, and **List contents** permissions for all your AD user groups.
5. Under **User Name**, enter the service account name that PRTG uses to access the AD.
6. Under **Password**, enter the respective password of the service account.
7. Click **Save**.

</div></div></div><div class="clear">  
</div></div></div><div class="pageelement active color-black-blue fullwidth" id="bkmrk-%C2%A0-5"><div class="arrow"> </div><div class="groupsegment-body"><a name="usergroup"></a><div class="tabsegment"><div class="tabsegment-tabs">  
</div></div><div class="segments-not-tabs"><div class="pageelement active col-12">  
</div></div></div></div><a name="database"></a>

## 4. Add new user groups in PRTG

<div class="pageelement active color-black-blue fullwidth" id="bkmrk--19"><div class="groupsegment-body"><div class="segments-not-tabs"><div class="pageelement active col-12" id="bkmrk--20"></div></div><div class="clear">  
</div></div></div><div class="pageelement active color-white arrow-black-blue fullwidth" id="bkmrk-%C2%A0-6"><div class="arrow"> </div><div class="groupsegment-body"><div class="tabsegment"><div class="tabsegment-tabs">  
</div></div><div class="segments-not-tabs"><div class="pageelement active col-12">  
</div></div></div></div><div class="pageelement active color-white arrow-black-blue fullwidth" id="bkmrk-in-the-prtg-web-inte"><div class="groupsegment-body"><div class="segments-not-tabs"><div class="pageelement active col-12" id="bkmrk--21"></div><div class="pageelement active divider3" id="bkmrk--22"><div class="divider-top">  
</div><div class="divider-bottom">  
</div></div><div class="pageelement active col-06"><div>1. In the PRTG web interface, select **Setup** | **System Administration** | **User Groups** from the main menu.
2. Hover over ![step2 pluszeichenflietext](https://hlassets.paessler.com/common/files/screenshots/prtg-v17-4/how-to-guides/msp/step2-pluszeichenflietext.jpg) and select **Add User Group**.
3. Provide a meaningful **User Group Name**.
4. Under **Administrative Rights**, select **Give user group members administrative rights**.
5. Under **Active Directory or Single Sign-On Integration**, select **Use Active Directory integration**.
6. Under **Active Directory Group**, select the AD user group whose members later have access to PRTG. For our example, we chose the *PRTG\_ADM* user group.  
    ![additional info manual](https://hlassets.paessler.com/common/files/screenshots/prtg-v17-4/how-to-guides/backups/additional-info_manual.svg) For very large ADs, you see an input field instead of a dropdown list when you add or modify a user group. In this case, you can only enter the AD user group name. PRTG automatically adds the prefix.

</div></div></div></div></div>Repeat these steps for the *PRTG\_RO* user group to create a second group of users that have only read access rights for PRTG. In this case, leave the default setting under **Administrative Rights**.

Now, members of the defined AD groups can log in to PRTG with the respective access rights.

<div class="pageelement active color-white arrow-black-blue fullwidth" id="bkmrk--23"><div class="groupsegment-body"><div class="segments-not-tabs"><div class="pageelement active col-06" id="bkmrk--24"><div>  
</div></div><div class="pageelement active col-06" id="bkmrk--25"><div class="imageelement lightbox">[![Add new user group](https://hlassets.paessler.com/common/files/screenshots/prtg-v17-4/how-to-guides/02_active-directory/review082021/newer_ad-new-user-group.jpg)](https://hlassets.paessler.com/common/files/screenshots/prtg-v17-4/how-to-guides/02_active-directory/review082021/newer_ad-new-user-group.jpg)</div></div><div class="pageelement active divider3" id="bkmrk--26"><div class="divider-top">  
</div><div class="divider-bottom">  
</div></div><div class="pageelement active col-06">  
</div></div></div></div>In the device tree, PRTG automatically creates new groups with the name *\[group\_name\] home* for each of the integrated AD user groups.

Do not forget to set [group access rights](https://www.paessler.com/manuals/prtg/user_access_rights#group_overview) that apply to device tree objects as well as to libraries, maps, and reports. You can do so in an object’s settings in section **Access Rights**.

The easiest way is to set group access rights in the settings of the root group.

<div class="pageelement active color-white arrow-black-blue fullwidth" id="bkmrk-prtg-active-director"><div class="groupsegment-body"><div class="segments-not-tabs"><div class="pageelement active col-06" id="bkmrk--27"><div class="imageelement lightbox">[![New ](https://hlassets.paessler.com/common/files/screenshots/prtg-v17-4/how-to-guides/02_active-directory/new_ad-home-group.jpg)](https://hlassets.paessler.com/common/files/screenshots/prtg-v17-4/how-to-guides/02_active-directory/new_ad-home-group.jpg)</div></div></div></div><div class="imageelement lightbox">PRTG Active Directory Network</div></div>

# PRTG Server is running but all probes are down

[![image.png](https://docs.coltscomputer.services/uploads/images/gallery/2024-01/scaled-1680-/XW1hbjfMJgbgthET-image.png)](https://docs.coltscomputer.services/uploads/images/gallery/2024-01/XW1hbjfMJgbgthET-image.png)

Both highlighted services need to be running

[![image.png](https://docs.coltscomputer.services/uploads/images/gallery/2024-01/scaled-1680-/V8X3YWrvtkboQURE-image.png)](https://docs.coltscomputer.services/uploads/images/gallery/2024-01/V8X3YWrvtkboQURE-image.png)

# pFsense



# Aliases

# Aliases

Aliases define a group ports, hosts, or networks. Aliases can be referenced by firewall rules, port forwards, outbound NAT rules, and other places in the firewall. Using aliases results in rulesets that are significantly shorter, self-documenting, and more manageable.

Note

Firewall aliases are collections of entries for use by the firewall. Despite the similar names, this is different than interface IP aliases, which are a means of adding additional IP addresses to a network interface ([<span class="doc">Virtual IP Addresses</span>](https://docs.netgate.com/pfsense/en/latest/firewall/virtual-ip-addresses.html)).

Aliases are located at **Firewall &gt; Aliases**. The page is divided into separate tabs for each type of alias: **IP**, **Ports**, **URLs**, and the **All** tab which shows every alias in one large list. When creating an alias, add it to any tab and it will be sorted to the correct location based on the type chosen.

## Nesting Aliases

Most aliases can be nested inside of other aliases to collect many entries into larger groups. For example, one alias can nest an alias containing web servers, an alias containing mail servers, and a servers alias that contains both the web and mail server aliases all together in one larger `<span class="pre">Servers</span>` alias.

To nest, aliases must be either the same or compatible types. For example, a network type alias cannot nest a port alias since they are not the same type of alias. However, host and network aliases can nest each other since they are compatible. URL table aliases can nest other URL table aliases, and URL aliases can nest other URL aliases.

<div class="document" id="bkmrk-" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section" id="bkmrk--1"></div><div class="section">  
</div></div></div></div>## Using Hostnames in Aliases

Host and network type aliases support entries consisting of fully qualified domain name (FQDN) style hostnames (e.g. `<span class="pre">host.domain.com</span>`) in regular or IDN format. The firewall must be able to resolve the hostname as-is using A or AAAA type DNS queries in order for these entries to function. This means that the firewall must have working DNS, and the FQDN must exist in the DNS servers used by the firewall.

Warning

This process only supports forward name resolution of FQDNs using A and AAAA records such as `<span class="pre">host.domain.com</span>`. Aliases **do not** support pattern matches, wildcard matches (e.g. `<span class="pre">*.domain.com</span>`), or any other style of record comparison.

If the DNS query for a hostname returns multiple IP addresses, all of the IP addresses returned in the result at the time the query is made are added to the alias.

Note

This feature is *not* useful for allowing or disallowing users to large public web sites such as those served by content delivery network (CDN) providers. Such sites tend to have constantly rotating or random responses to DNS queries so the contents of the alias on the firewall do not necessarily match up with the response a user will receive when they resolve the same site name. It can work for smaller sites that have only a few servers and do not include incomplete sets of addresses in their DNS responses.

A hostname entry in a host or network type alias is periodically resolved and updated by the firewall every few minutes. The default interval is `<span class="pre">300</span>` seconds (5 minutes), and can be changed by adjusting the value of **Aliases Hostnames Resolve Interval** on **System &gt; Advanced**, **Firewall &amp; NAT** tab. This is useful for tracking dynamic DNS entries to allow specific users into services from dynamic IP addresses.

<div class="document" id="bkmrk--2" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section" id="bkmrk--3"></div><div class="section">  
</div></div></div></div>## Mixing IPv4 and IPv6 Addresses in Aliases

IPv4 and IPv6 addresses can be mixed inside an alias. The firewall will use the appropriate type of addresses when the alias is referenced in a specific rule.

<div class="document" id="bkmrk--4" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section" id="bkmrk--5"></div><div class="section">  
</div></div></div></div>## Alias Sizing Concerns

The total size of all tables must fit in roughly **half** the amount of **Firewall Maximum Table Entries**, which defaults to `<span class="pre">400000</span>`. If the maximum number of table entries is not large enough to contain all of the entries, the rules may fail to load. See [<span class="std std-ref">Firewall Maximum Table Entries</span>](https://docs.netgate.com/pfsense/en/latest/config/advanced-firewall-nat.html#config-advanced-firewall-table-entries) for information on changing that value. The aliases must fit in twice in the total area because of the way aliases are loaded and reloaded; The new list is loaded alongside the old list and then the old one is removed.

This value can be increased as much required provided that the firewall contains sufficient RAM to hold the entries. The RAM usage is similar to, but less than, the state table but it is still safe to assume approximately 1K of memory per entry to be conservative.

<div class="document" id="bkmrk--6" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section" id="bkmrk--7"></div><div class="section"><span id="bkmrk--8"></span></div></div></div></div>## Alias Settings

When editing an Alias entry, the following settings are available:

<div class="document" id="bkmrk-name-a%C2%A0name%C2%A0for-the-" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><dl class="field-list"><dt class="field-odd">Name</dt><dd class="field-odd">A **Name** for the alias. The name may only consist of the characters `<span class="pre">a-z</span>`, `<span class="pre">A-Z</span>`, `<span class="pre">0-9</span>` and `<span class="pre">_</span>`.

</dd><dt class="field-even">Description</dt><dd class="field-even">A **Description** for the alias.

</dd><dt class="field-odd">Type</dt><dd class="field-odd">The **Type** for the alias, which alters the behavior of the alias and tells the firewall which types of entries can be added to the alias.

The following types are available:

<dl class="field-list simple"><dt class="field-odd">Host</dt><dd class="field-odd">Aliases containing single IP addresses or FQDN hostnames

</dd><dt class="field-even">Network</dt><dd class="field-even">Aliases containing CIDR-masked lists of networks, FQDN hostnames, IP address ranges, or single IP addresses

</dd><dt class="field-odd">Port</dt><dd class="field-odd">These aliases contain lists of port numbers or ranges of ports for TCP or UDP.

</dd><dt class="field-even">URL (IP or Port)</dt><dd class="field-even">The alias is built from the content returned by the specified URL, but is read only a single time. Once added, it becomes a normal network or port type alias.

</dd><dt class="field-odd">URL Table (IP or Port)</dt><dd class="field-odd">The alias is built from the content returned by the specified URL but is updated by fetching the list from the URL periodically.

</dd></dl></dd><dt class="field-even">Entries</dt><dd class="field-even">The lower section of the alias page contains the entries for the alias. The behavior of this section varies based on the selected alias type.

</dd></dl></div></div></div></div>The next sections describe the behavior of each type in more detail.

### Host Aliases

Host type aliases contain groups of IP addresses. For *Host* type aliases, entries are specified by IP address or fully qualified domain name (FQDN).

If an IP address range such as `<span class="pre">192.168.1.1-192.168.1.10</span>` or a small subnet such as `<span class="pre">192.168.1.16/28</span>` is entered in this field, the firewall will translate it into a list of individual IP addresses when saving the alias.

Figure [<span class="std std-ref">Example Hosts Alias</span>](https://docs.netgate.com/pfsense/en/latest/firewall/aliases.html#figure-example-hosts-alias) shows an example of a host type alias used to contain a list of public web servers.

<div class="document" id="bkmrk--9" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="section"><div class="align-center figure align-default"><span id="bkmrk--10"></span>![../_images/firewall-example-hosts-alias.png](https://docs.netgate.com/pfsense/en/latest/_images/firewall-example-hosts-alias.png)</div></div></div></div></div></div><span class="caption-text">Example Hosts Alias</span>

<div class="document" id="bkmrk--11" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="section"><div class="align-center figure align-default" id="bkmrk--12"></div></div></div></div></div></div>Other host type aliases can be nested inside this entry. Hostnames may also be used as entries, as explained previously.

<div class="document" id="bkmrk--13" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="section" id="bkmrk--14"></div><div class="section">  
</div></div></div></div></div>### Network Aliases

For *Network* type aliases, entries are specified in CIDR format for subnets or fully qualified domain names (FQDN) for single addresses.

For subnets, select the CIDR mask that pertains to each entry. `<span class="pre">/32</span>` specifies a single IPv4 host, `<span class="pre">/128</span>` specifies a single IPv6 host, `<span class="pre">/24</span>` specifies `<span class="pre">255.255.255.0</span>`, `<span class="pre">/64</span>` specifies a normal IPv6 network, etc.

Hostnames (FQDNs) may also be specified, using a `<span class="pre">/32</span>` mask for IPv4 or `<span class="pre">/128</span>` for IPv6.

Figure [<span class="std std-ref">Example Network Alias</span>](https://docs.netgate.com/pfsense/en/latest/firewall/aliases.html#figure-example-network-alias) shows an example of a network alias that is used later in this chapter.

<div class="document" id="bkmrk--15" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="section"><div class="align-center figure align-default"><span id="bkmrk--16"></span>![../_images/management-hosts-alias.png](https://docs.netgate.com/pfsense/en/latest/_images/management-hosts-alias.png)</div></div></div></div></div></div><span class="caption-text">Example Network Alias</span>

<div class="document" id="bkmrk--17" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="section"><div class="align-center figure align-default" id="bkmrk--18"></div></div></div></div></div></div>Other host or network aliases can be nested inside this entry. Hostnames may also be used as entries, as explained previously.

When an alias entry contains an IPv4 range it is automatically translated by the firewall to an equivalent set of IPv4 CIDR networks that will exactly contain the provided range. As shown in Figure [<span class="std std-ref">Example IP Range After</span>](https://docs.netgate.com/pfsense/en/latest/firewall/aliases.html#figure-example-ip-range-after), the range is expanded when the alias is saved, and the resulting list of IPv4 CIDR networks will match exactly the requested range.

<div class="document" id="bkmrk--19" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="section"><div class="align-center figure align-default"><span id="bkmrk--20"></span>![../_images/firewall-alias-iprange-example-before.png](https://docs.netgate.com/pfsense/en/latest/_images/firewall-alias-iprange-example-before.png)</div></div></div></div></div></div><span class="caption-text">Example IP Range Before</span>

<div class="document" id="bkmrk--21" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="section"><div class="align-center figure align-default" id="bkmrk--22"></div><div class="align-center figure align-default"><span id="bkmrk--23"></span>![../_images/firewall-alias-iprange-example-after.png](https://docs.netgate.com/pfsense/en/latest/_images/firewall-alias-iprange-example-after.png)</div></div></div></div></div></div><span class="caption-text">Example IP Range After</span>

<div class="document" id="bkmrk--24" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="section" id="bkmrk--25"><div class="align-center figure align-default" id="bkmrk--26"></div></div><div class="section">  
</div></div></div></div></div>### Port Aliases

Port type aliases contain groups of ports and port ranges. A single port is an integer from `<span class="pre">1-65535</span>`. A port range is two ports separated by a colon (`<span class="pre">:</span>`), for example, `<span class="pre">1194:1199</span>` and matches the specified ports and any ports in between.

The protocol is not specified in the alias; The firewall rule where the alias is used will define the protocol as TCP, UDP, or both. Figure [<span class="std std-ref">Example Ports Alias</span>](https://docs.netgate.com/pfsense/en/latest/firewall/aliases.html#figure-example-ports-alias) shows an example of a port type alias.

<div class="document" id="bkmrk--27" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="section"><div class="align-center figure align-default"><span id="bkmrk--28"></span>![../_images/firewall-example-ports-alias.png](https://docs.netgate.com/pfsense/en/latest/_images/firewall-example-ports-alias.png)</div></div></div></div></div></div><span class="caption-text">Example Ports Alias</span>

<div class="document" id="bkmrk--29" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="section"><div class="align-center figure align-default" id="bkmrk--30"></div></div></div></div></div></div>Enter another port-type alias name into the **Port** field to nest other port-type aliases inside this alias.

<div class="document" id="bkmrk--31" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="section" id="bkmrk--32"></div><div class="section">  
</div></div></div></div></div>### URL Aliases

With a URL type alias, each entry contains a URL which returns text content containing a list of entries. Multiple URLs may be entered.

When **Save** is clicked, up to 3,000 entries from each URL are read from the file and imported into a network type alias.

If *URL (IPs)* is selected, then the URLs must contain IP address, CIDR masked network entries, or FQDNs, and the firewall creates a network type alias from the contents.

If *URL (Ports)* is selected, then the URL must contain only port numbers or ranges, and the firewall creates a port type alias from the contents.

For a URL type alias, the contents of the alias are re-fetched every 24 hours from the stored URL by the firewall.

<div class="document" id="bkmrk--33" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="section" id="bkmrk--34"></div><div class="section">  
</div></div></div></div></div>### URL Table Aliases

A URL Table alias behaves in a significantly different way than the URL alias. For starters, it does not import the contents of the file into a normal alias. It downloads the contents of the URL into a special location on the firewall and uses the contents for what is called a `<span class="pre">persist</span>` table, also known as a file-based alias. The full contents of the alias are not directly editable in the GUI, but can be viewed in the **Tables** viewer (See [<span class="doc">Firewall Table Contents</span>](https://docs.netgate.com/pfsense/en/latest/monitoring/status/firewall-tables.html)).

For a URL Table alias, the drop-down list after the **/** controls how many days must pass before the contents of the alias are re-fetched from the stored URL by the firewall. When the time comes, the alias contents will be updated overnight by a script which re-fetches the data.

URL Table aliases can be quite large, containing many thousands of entries. Some customers use them to hold lists of all IP blocks in a given country or region, which can easily surpass 40,000 entries. The pfBlockerNG package uses this type of alias when handling country lists and other similar actions.

If *URL Table (IPs)* is selected, then the URLs must contain IP address, CIDR masked network entries, or FQDNs, and the firewall creates a network type alias from the contents.

If *URL Table (Ports)* is selected, then the URL must contain only port numbers or ranges, and the firewall creates a port type alias from the contents.

<div class="document" id="bkmrk--35" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section" id="bkmrk--36"><div class="section" id="bkmrk--37"></div></div><div class="section">  
</div></div></div></div>## Configuring Aliases

To add an alias:

<div class="document" id="bkmrk-navigate-to%C2%A0firewall" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section">- Navigate to **Firewall &gt; Aliases**
- Click ![fa-plus](https://docs.netgate.com/pfsense/en/latest/_images/fa-plus.png) **Add**
- Enter settings as described in [<span class="std std-ref">Alias Settings</span>](https://docs.netgate.com/pfsense/en/latest/firewall/aliases.html#alias-settings)
- Enter the type-specific information as needed. Each type has an data field and a description field for each entry.

</div></div></div></div>To add new members to an alias, click ![fa-plus](https://docs.netgate.com/pfsense/en/latest/_images/fa-plus.png) **Add** at the bottom of the list of entries.

To remove members from an alias, click ![fa-trash](https://docs.netgate.com/pfsense/en/latest/_images/fa-trash.png) **Delete** at the end of the row to remove.

When the alias is complete, click **Save** to store the alias contents.

Each manually entered alias is limited to 5,000 members, but some browsers have trouble displaying or using the page with more than around 3,000 entries. For large numbers of entries, use a *URL Table* type alias which is capable of handling larger lists.

<div class="document" id="bkmrk--38" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section" id="bkmrk--39"></div><div class="section">  
</div></div></div></div>## Bulk Import Network Aliases

Another method of importing multiple entries into an alias is to use the bulk import feature.

To use the import feature:

<div class="document" id="bkmrk-navigate-to%C2%A0firewall-1" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section">- Navigate to **Firewall &gt; Aliases**
- Click ![fa-upload](https://docs.netgate.com/pfsense/en/latest/_images/fa-upload.png) **Import**
- Fill in the **Alias Name** and **Description**
- Enter the alias contents into the **Aliases to import** text area, one entry per line.
- Click **Save**

</div></div></div></div>Common usage examples for this page include lists of IP addresses, networks, and blacklists. The list may contain IP addresses, CIDR masked networks, IP ranges, or port numbers. The firewall will attempt to determine the target alias type automatically.

The firewall imports items into a normal alias which can be edited later.

<div class="document" id="bkmrk--40" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section" id="bkmrk--41"></div><div class="section">  
</div></div></div></div>## Using Aliases

When a letter is typed into an input box which supports aliases, the GUI displays a list of matching aliases. Select the desired alias from the list, or type its name out completely.

Note

Alias autocompletion is not case sensitive but it is restricted by type. For example, a Network or Host type alias will be listed in autocomplete for a Network field, but a Port alias will not; A port alias can be used in a port field, but a Network alias will not be in the list.

Figure [<span class="std std-ref">Autocompletion of Hosts Alias</span>](https://docs.netgate.com/pfsense/en/latest/firewall/aliases.html#figure-autocompletion-of-hosts-alias) shows how the `<span class="pre">WebServers</span>` alias, configured as shown in Figure [<span class="std std-ref">Example Hosts Alias</span>](https://docs.netgate.com/pfsense/en/latest/firewall/aliases.html#figure-example-hosts-alias), can be used in the **Destination** field when adding or editing a firewall rule.

<div class="document" id="bkmrk-edit-the-firewall-ru" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section">- Edit the firewall rule
- Select *Address or Alias*
- Then type the first letter of the desired alias: Enter `<span class="pre">W</span>` and the alias appears as shown.

<div class="align-center figure align-default"><span id="bkmrk--42"></span>![../_images/firewall-webservers-dst-alias.png](https://docs.netgate.com/pfsense/en/latest/_images/firewall-webservers-dst-alias.png)</div></div></div></div></div><span class="caption-text">Autocompletion of Hosts Alias</span>

<div class="document" id="bkmrk--43" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="align-center figure align-default" id="bkmrk--44"></div></div></div></div></div>Figure [<span class="std std-ref">Autocompletion of Ports Alias</span>](https://docs.netgate.com/pfsense/en/latest/firewall/aliases.html#figure-autocompletion-of-ports-alias) shows the autocompletion of the ports alias configured as shown in Figure [<span class="std std-ref">Example Ports Alias</span>](https://docs.netgate.com/pfsense/en/latest/firewall/aliases.html#figure-example-ports-alias). If multiple aliases match the letter entered, all matching aliases of the appropriate type are listed. Click on the desired alias to select it.

<div class="document" id="bkmrk--45" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="align-center figure align-default"><span id="bkmrk--46"></span>![../_images/firewall-webports-dstport-alias.png](https://docs.netgate.com/pfsense/en/latest/_images/firewall-webports-dstport-alias.png)</div></div></div></div></div><span class="caption-text">Autocompletion of Ports Alias</span>

<div class="document" id="bkmrk--47" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="align-center figure align-default" id="bkmrk--48"></div></div></div></div></div>Figure [<span class="std std-ref">Example Rule Using Aliases</span>](https://docs.netgate.com/pfsense/en/latest/firewall/aliases.html#figure-example-rule-using-aliases) shows the rule created using the `<span class="pre">WebServers</span>` and `<span class="pre">WebPorts</span>` aliases. This rule is on WAN, and allows any source to the IP addresses defined in the `<span class="pre">WebServers</span>` alias when using the ports defined in the `<span class="pre">WebPorts</span>` alias.

<div class="document" id="bkmrk--49" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="align-center figure align-default"><span id="bkmrk--50"></span>![../_images/firewall-alias-example-rule.png](https://docs.netgate.com/pfsense/en/latest/_images/firewall-alias-example-rule.png)</div></div></div></div></div><span class="caption-text">Example Rule Using Aliases</span>

<div class="document" id="bkmrk--51" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="align-center figure align-default" id="bkmrk--52"></div></div></div></div></div>Hovering the mouse cursor over an alias on the **Firewall &gt; Rules** page shows a tooltip displaying the contents of the alias with the descriptions included in the alias. Figure [<span class="std std-ref">Hovering Shows Hosts Contents</span>](https://docs.netgate.com/pfsense/en/latest/firewall/aliases.html#figure-hovering-shows-hosts-contents) shows this for the `<span class="pre">WebServers</span>` alias and Figure [<span class="std std-ref">Hovering Shows Ports Contents</span>](https://docs.netgate.com/pfsense/en/latest/firewall/aliases.html#figure-hovering-shows-ports-contents) for the ports alias.

<div class="document" id="bkmrk--53" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="align-center figure align-default"><span id="bkmrk--54"></span>![../_images/firewall-webservers-alias-hover.png](https://docs.netgate.com/pfsense/en/latest/_images/firewall-webservers-alias-hover.png)</div></div></div></div></div><span class="caption-text">Hovering Shows Hosts Contents</span>

<div class="document" id="bkmrk--55" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="align-center figure align-default" id="bkmrk--56"></div><div class="align-center figure align-default"><span id="bkmrk--57"></span>![../_images/firewall-webports-alias-hover.png](https://docs.netgate.com/pfsense/en/latest/_images/firewall-webports-alias-hover.png)</div></div></div></div></div><span class="caption-text">Hovering Shows Ports Contents</span>

<div class="document" id="bkmrk--58" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section" id="bkmrk--59"><div class="section" id="bkmrk--60"><div class="align-center figure align-default" id="bkmrk--61"></div></div></div></div></div>

# Basic Firewall Configuration Example

# Basic Firewall Configuration Example

This article is designed to describe how pfSense® software performs rule matching and a basic strict set of rules. The approach described in this document is not the most secure, but will help show how rules are setup.

Rules on the **Interface** tabs are matched on the **incoming** interface.

See also

Read the [<span class="doc">Aliases</span>](https://docs.netgate.com/pfsense/en/latest/firewall/aliases.html) article as it will make management of rules easier.

## Basic lock down of the LAN and DMZ outgoing rules

### Outbound LAN

Make sure the **Default LAN &gt; any** rule is either disabled or removed.

<div class="document" id="bkmrk-allowing-dns-access%3A" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="section" id="bkmrk-allowing-dns-access%3A-1">1. Allowing DNS access:
    
    
    - If pfSense is the DNS server:
        
        
        - Allow **TCP/UDP 53** (DNS) from LAN subnet to **LAN Address**.
    - If using Upstream DNS Servers:
        
        
        - Allow **TCP/UDP 53** (DNS) from LAN subnet to **Upstream DNS Servers**.
    - Otherwise:
        
        
        - Allow **TCP/UDP 53** (DNS) from LAN subnet to **anywhere**.
2. Allowing all users to browse web pages anywhere:
    
    
    - Allow **TCP 80** (HTTP) from LAN subnet to **anywhere**.
3. Allowing users to browse secure web pages anywhere:
    
    
    - Allow **TCP 443** (HTTPS) from LAN subnet to **anywhere**.
4. Allowing users to access FTP sites anywhere:
    
    
    - Allow **TCP 21** (FTP) from LAN subnet to **anywhere**.
5. Allowing users to access SMTP on a mail server somewhere:
    
    
    - Allow **TCP 25** (SMTP) from LAN subnet to **anywhere**.
6. Allowing users to access POP3 on a mail server somewhere:
    
    
    - Allow **TCP 110** (POP3) from LAN subnet to **anywhere**.
7. Allowing users to access IMAP on a mail server somewhere:
    
    
    - Allow **TCP 143** (IMAP) from LAN subnet to **anywhere**.
8. Allowing remote connections to an outside windows server for remote administration:
    
    
    - Allow **TCP/UDP 3389** (Terminal server) from LAN subnet to **IP address of remote server**.
9. Allowing LAN to access windows shares on the DMZ, via NETBIOS/Microsoft-DS:
    
    
    - Allow **TCP/UDP 137** from LAN subnet (NETBIOS) to **DMZ subnet**.
    - Allow **TCP/UDP 138** from LAN subnet (NETBIOS) to **DMZ subnet**.
    - Allow **TCP/UDP 139** from LAN subnet (NETBIOS) to **DMZ subnet**.
    - Allow **TCP 445** from LAN subnet (NETBIOS) to **DMZ subnet**.

</div><div class="section">  
</div></div></div></div></div>### Outbound DMZ

By default, there are no rules on **OPT** interfaces.

<div class="document" id="bkmrk-allowing-servers-to-" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section" id="bkmrk-allowing-servers-to--1"><div class="section" id="bkmrk-allowing-servers-to--2">1. Allowing servers to use Windows update or browse the **WAN**:
    
    
    - Allow **TCP 80** from DMZ subnet (HTTP) to **anywhere**.
    - Allow **TCP 443** from DMZ subnet (HTTP) to **anywhere**.
2. Allow users to connect to an external DNS server:
    
    
    - Allow **TCP/UDP 53** from DMZ subnet (DNS) to **IP address of the upstream DNS server(s)**
3. Allowing servers to use a remote time server:
    
    
    - If using an upstream remote time server:
        
        
        - Allow **UDP 123** from DMZ subnet (NTP) to **IP address of remote time server**.
    - Otherwise:
        
        
        - Allow **UDP 123** from DMZ subnet (NTP) to **any**.

</div></div><div class="section">  
</div></div></div></div>## Setup isolating LAN and DMZ, each with unrestricted Internet access

The following setup can be used instead if outbound access is more lenient, but still controlled between local interfaces. This assumes all local networks are privately numbered, and that interfaces have already been configured.

Create an alias, **Firewall &gt; Aliases** from the main menu, called `<span class="pre">RFC1918</span>` containing `<span class="pre">192.168.0.0/16</span>`, `<span class="pre">172.16.0.0/12</span>`, and `<span class="pre">10.0.0.0/8</span>`.

### LAN Configuration

<div class="document" id="bkmrk-for-dns-from-the-fir" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="section" id="bkmrk-for-dns-from-the-fir-1">1. For DNS from the firewall:
    
    
    - Allow **TCP/UDP** from LAN subnet to **LAN Address port 53**.
2. For accessing the GUI:
    
    
    - Allow **TCP** from LAN subnet to **LAN address port 443**.
3. To ping the firewall from the LAN:
    
    
    - Allow **ICMP** from LAN subnet to **LAN address**.
4. If there is any traffic required from LAN to DMZ:
    
    
    - Allow any traffic required from **LAN** to **DMZ**.
5. Do not allow LAN to reach DMZ or other private networks:
    
    
    - Reject **Any** from LAN subnet to **RFC1918**.
6. For internet access:
    
    
    - Allow **Any** from LAN subnet to **any**.

</div><div class="section">  
</div></div></div></div></div>### DMZ Configuration

<div class="document" id="bkmrk-for-dns-from-the-fir-2" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section"><div class="section"><div class="section" id="bkmrk-for-dns-from-the-fir-3">1. For DNS from the firewall:
    
    
    - Allow **TCP/UDP** from DMZ subnet to **DMZ Address port 53**.
2. For accessing the GUI (optional):
    
    
    - Allow **TCP** from DMZ subnet to **DMZ address port 443**.
3. To ping the firewall from the DMZ:
    
    
    - Allow **ICMP** from DMZ subnet to **DMZ address**.
4. If there is any traffic required from DMZ to LAN:
    
    
    - Allow any traffic required from **DMZ** to **LAN**.
5. Do not allow DMZ to reach LAN or other private networks:
    
    
    - Reject **Any** from DMZ subnet to **RFC1918**.
6. For Internet access:
    
    
    - Allow **Any** from DMZ subnet to **any**.

</div><div class="section">  
</div></div></div></div></div>### Additional Interfaces

Repeat the above pattern as needed.

<div class="document" id="bkmrk-" itemscope="itemscope" itemtype="http://schema.org/Article" role="main"><div itemprop="articleBody"><div class="section" id="bkmrk--1"><div class="section" id="bkmrk--2"><div class="section" id="bkmrk--3"></div></div></div></div></div>

# Blocking Web Sites

# Blocking Web Sites

There are several options for blocking websites with pfSense® software, some of which are described on this article. This is not an exact science, but these solutions typically function well enough for a majority of use cases.

See also

The pfBlockerNG package ([<span class="doc">pfBlocker-NG Package</span>](https://docs.netgate.com/pfsense/en/latest/packages/pfblocker.html)) offers mechanisms which can be useful in this area, such as DNSBL, geographic IP address blocking, and automation of AS lookups.

<div class="section" id="bkmrk-"><span id="bkmrk--1"></span></div>## Using DNS

If the built in DNS Resolver or Forwarder are active an override can be entered there to resolve the unwanted website to an invalid IP address such as `<span class="pre">127.0.0.1</span>`.

Warning

Do not use DNS override functionality as the only means of blocking access to sites.

Blocking via DNS requires that local clients utilize the firewall as their only DNS source. See [<span class="doc">Redirecting Client DNS Requests</span>](https://docs.netgate.com/pfsense/en/latest/recipes/dns-redirect.html) and [<span class="std std-ref">Blocking External Client DNS Queries</span>](https://docs.netgate.com/pfsense/en/latest/recipes/dns-block-external.html#dns-block-external) for suggestions on ensuring clients get their DNS responses from the firewall. It will stop non-technical users, but it is easy to circumvent for those with more technical aptitude.

With the DNS Resolver, additional methods are possible via custom options.

This first example will prevent any host under the given zone from being resolved by clients:

```
server:
local-zone: "movie.edu" static
```

When the firewall enforces DNS resolution in this way, the firewall must also force clients to resolve DNS using the firewall. Otherwise, clients could bypass the restrictions by using alternate DNS servers. See [<span class="doc">Redirecting Client DNS Requests</span>](https://docs.netgate.com/pfsense/en/latest/recipes/dns-redirect.html) for details.

This can be limited in scope using custom views. This example is similar to the above, but only blocks access for `<span class="pre">10.6.0.100</span>`:

```
server:
access-control-view: 10.6.0.100/32 blocksites

view:
name: "blocksites"
local-zone: "movie.edu" static
```

## Using Firewall Rules

If a website rarely changes IP addresses, then it can be blocked by an alias. Create an alias containing its IP addresses and then use this alias in firewall rules.

Warning

This is not a feasible solution for sites that return low TTLs and spread the load across many servers and/or datacenters, such as Google and similar large sites. Most small to mid sized websites can be effectively blocked using this method as they rarely change IP addresses.

A hostname can also be inside a network alias. The firewall will resolve the hostname periodically and update the alias as needed. This is more effective than manually looking up the IP addresses, but will still fall short if the site returns DNS records in a way that changes rapidly or randomizes results from a pool of servers on each query, which is common for large sites.

Another option is finding all of the IP subnet allocations for a site. Create an alias with those networks and block traffic to those destinations. This is especially useful with sites such as Facebook that spread large amounts of IP space, but are constrained within a few net blocks. Using regional registry sites such as ARIN can help track down those networks. For example, all of the networks used by Facebook in the region covered by ARIN can be found at [http://whois.arin.net/rest/org/THEFA-3.html](http://whois.arin.net/rest/org/THEFA-3.html) under “Related Networks”. Companies may have other addresses in different regions, so check other regional sites as well, such as RIPE, APNIC, etc.

As an alternative to looking up the IP blocks manually, locate the BGP Autonomous System (AS) number for the target company by doing a `<span class="pre">whois</span>` lookup on one of their IP addresses. For example, the AS number for Facebook is `<span class="pre">AS32934</span>` and the following command will locate all of their allocations:

```
# whois -h whois.radb.net -- '-i origin AS32934' | awk '/^route:/ {print $2;}' | sort | uniq
```

Copy the results of that command into a new alias and it will cover all of their currently allocated networks. Check the results periodically for updates.

<div class="section" id="bkmrk--2"></div>## Using a Proxy

In modern environments a client proxy is not effective. HTTPS can sometimes be filtered via peek/splice to inspect SNI and similar aspects of connections, but even that fails with modern security practices like encrypted SNI. Using proxies for these tasks is no longer a recommended practice.

<div class="section" id="bkmrk--3"></div>## Prevent Bypassing Restrictions

With any of the above methods, there are many ways to get around the defined blocks. The easiest and likely most prevalent is using any number of proxy websites. Finding and blocking all of these individually and keeping the list up to date is impossible. The best way to ensure these sites are not accessible is using an external proxy or content filtering capable of blocking by category.

To further maintain control, use a restrictive egress ruleset and only allow traffic out to specific services and/or hosts. For example, only allow DNS access to the firewall or the DNS servers specifically used for LAN clients ([<span class="doc">Redirecting Client DNS Requests</span>](https://docs.netgate.com/pfsense/en/latest/recipes/dns-redirect.html)). Also, if a proxy is in use on the network, make sure to disallow direct access to HTTP and HTTPS through the firewall and only allow traffic to and/or from the proxy server.

<div class="section" id="bkmrk--4"></div>

# SSL Certificates

[https://ongkhaiwei.medium.com/generate-lets-encrypt-certificate-with-dns-challenge-and-namecheap-e5999a040708](https://ongkhaiwei.medium.com/generate-lets-encrypt-certificate-with-dns-challenge-and-namecheap-e5999a040708)

[https://www.digitalocean.com/community/tutorials/how-to-use-certbot-standalone-mode-to-retrieve-let-s-encrypt-ssl-certificates-on-ubuntu-16-04](https://www.digitalocean.com/community/tutorials/how-to-use-certbot-standalone-mode-to-retrieve-let-s-encrypt-ssl-certificates-on-ubuntu-16-04)

[https://onepagezen.com/free-ssl-certificate-wordpress-google-cloud-click-to-deploy/](https://onepagezen.com/free-ssl-certificate-wordpress-google-cloud-click-to-deploy/)

[https://www.onepagezen.com/letsencrypt-auto-renew-certbot-apache/](https://www.onepagezen.com/letsencrypt-auto-renew-certbot-apache/)

# T568B Pinout

[![image.png](https://44.214.88.72/uploads/images/gallery/2023-12/scaled-1680-/ckMimage.png)](https://44.214.88.72/uploads/images/gallery/2023-12/ckMimage.png)

# Unifi



# Migrating to new Controller

1. Take a backup of the old server
2. Restore the backup onto the new server
3. on the old server set the override inform host option to point at the new controller
4. verify the devices have shown up in the new controller
5. shutdown the old controller

# Setting up the UniFi Network Controller using Docker

[https://pimylifeup.com/unifi-docker/](https://pimylifeup.com/unifi-docker/)

[https://community.ui.com/questions/How-To-Unifi-Contoller-Docker-home-network/fc6a9441-94b0-48b0-801a-6f38e2d4bb21](https://community.ui.com/questions/How-To-Unifi-Contoller-Docker-home-network/fc6a9441-94b0-48b0-801a-6f38e2d4bb21)

Once you have Docker installed, our next step is to prepare your system to run the UniFi Network Controller container.

The main thing we need to do here is create a directory to store the UniFi containers Compose file and all of its data.

You can create this directory by running the following command within the terminal.

```
```bash
sudo mkdir -p /opt/stacks/unifi
```<a class="copy-code-block fa-copy" href="https://pimylifeup.com/unifi-docker/#copy">Copy</a>
```

By utilizing the “`-p`” option, this command will create any missing directories in the given path.

**5.** After creating a directory to store our Compose file, we can change to the directory [by using the cd command](https://pimylifeup.com/cd-command/).

```
```bash
cd /opt/stacks/unifi
```<a class="copy-code-block fa-copy" href="https://pimylifeup.com/unifi-docker/#copy">Copy</a>
```

### Writing a Compose file for the UniFi Docker Container

**6.** Our next step is writing the Compose file for the UniFi docker container. This Compose file will instruct Docker what image to download and the environment variables to pass through to it.

You can begin writing this file by typing in the following command.

```
```bash
sudo nano compose.yaml
```<a class="copy-code-block fa-copy" href="https://pimylifeup.com/unifi-docker/#copy">Copy</a>
```

**7.** Within this file, you will want to type in the following lines.

You must replace “`<TIMEZONE>`” with a valid TZ Identifier. You can find a list of [time zone identifiers from Wikipedia](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).

For example, we would use “`Australia/Hobart`” for our time zone.

```
```yaml
services:
  unifi:
    user: unifi
    image: ghcr.io/jacobalberty/unifi-docker
    container_name: unifi-controller
    restart: unless-stopped
    ports:
      - "8080:8080"
      - "8443:8443"
      - "3478:3478/udp"
      - "10001:10001/udp"
    environment:
      TZ: "<TIMEZONE>"
    volumes:
      - ./data:/unifi
```<a class="copy-code-block fa-copy" href="https://pimylifeup.com/unifi-docker/#copy">Copy</a>
```

**8.** Once you have written the lines above, save and quit by pressing <kbd>CTRL</kbd> + <kbd>X</kbd>, followed by <kbd>Y</kbd>, and then the <kbd>ENTER</kbd> key.

### Starting the UniFi Docker Container

**9.** With the Compose file written, all you need to do to bring the UniFi network controller Docker container online is to use the following command.

We use the “`-d`” option to detach from the current terminal session once the container has started.

```
```bash
docker compose up -d
```<a class="copy-code-block fa-copy" href="https://pimylifeup.com/unifi-docker/#copy">Copy</a>
```

### Accessing the UniFi Network Controller Web Interface

**10.** Now that you have the Docker container for the UniFi network controller running, you will want to access its web interface. You will also need to know the IP address later in this guide.

If you don’t know the local IP address of your machine, you can get it by running the following command.

```
```bash
hostname -I
```<a class="copy-code-block fa-copy" href="https://pimylifeup.com/unifi-docker/#copy">Copy</a>
```

Ensure you set up your device with a static IP address before proceeding further. You do not want your UniFi controller to be assigned a dynamic IP address.

**11.** Once you know the IP address of your device, go to the following address in your favourite web browser.

Ensure that you replace “`<IPADDRESS>`” with your IP.

```
https://<IPADDRESS>:8443
```

### Initial Set Up of the UniFi Network Controller

**12.** When you first access your new Docker-based UniFi Network controller, you must complete some initial set up steps.

If you are setting up this controller as a brand new one, give it a server name, select your country, and accept the terms and conditions (**1.**).

After filling out your servers details, <kbd>click</kbd> the “`Next`” button (**3.**) to continue.

However, if you are restoring this from an older UniFi backup, <kbd>click</kbd> the “`Restore Server from a Backup`” link (**2.**)

<figure class="wp-block-image aligncenter size-full" id="bkmrk-">![Name your Docker UniFi Network Controller or Restore from Backup](https://pimylifeup.com/wp-content/uploads/2024/01/UniFi-Network-Controller-Docker-Container-01-Name-your-UniFI-Network-controller.jpg)</figure>**13.** If you are setting this controller up from scratch, you will now be asked to sign in to your Ubiquiti account (1.).

After filling out an email and password you can <kbd>click</kbd> the “`Create a UI Account`” button to create a new account, or you can <kbd>click</kbd> the “`Sign In`” button (**3.**) if you already have an account.

If you prefer not to use a Ubiquiti account on your controller, <kbd>click</kbd> the “`Advanced Setup`” link and follow the prompts (**2.**).

<figure class="wp-block-image aligncenter size-full" id="bkmrk--1">![Sign in to UI Account](https://pimylifeup.com/wp-content/uploads/2024/01/UniFi-Network-Controller-Docker-Container-02-Sign-in-to-UI-Account-or-Create-Local.jpg)</figure>**14.** At this point, you should now have access to the UniFi network controller web interface.

However, before you can start adopting your Ubiquiti network devices, there is an option you must enable.

<figure class="wp-block-image aligncenter size-full" id="bkmrk--2">![UniFi Network Controller Running in Docker Container](https://pimylifeup.com/wp-content/uploads/2024/01/UniFi-Network-Controller-Docker-Container-03-Network-Controller-Running.jpg)</figure>### Enabling the Inform Host Option

**15.** For your Ubiquiti devices to detect your Docker-based UniFi network controller, we must enable the “`Inform Host`” option.

This option lets us tell the IP address the controller should broadcast to available devices. Currently, it will be using the Dockers internal IP rather than the host IP.

To set this option, you must first switch to the settings page by <kbd>clicking</kbd> the cog in the sidebar.

<figure class="wp-block-image aligncenter size-full" id="bkmrk--3">![Open Settings page](https://pimylifeup.com/wp-content/uploads/2024/01/UniFi-Network-Controller-Docker-Container-04-Open-Settings-Page.jpg)</figure>**16.** Once you are on the settings screen, change to the “`System`” menu (**1.**).

After changing to the system settings page, swap to the “`Advanced`” tab (**2.**).

<figure class="wp-block-image aligncenter size-full" id="bkmrk--4">![Change to Advanced Settings](https://pimylifeup.com/wp-content/uploads/2024/01/UniFi-Network-Controller-Docker-Container-05-Change-to-Advanced-Settings.jpg)</figure>**17.** On this page, you should find an option labeled “`Inform Host`“.

<kbd>Click</kbd> the checkbox to allow us to begin overriding the host IP.

<figure class="wp-block-image aligncenter size-full" id="bkmrk--5">![Toggle on Inform Host](https://pimylifeup.com/wp-content/uploads/2024/01/UniFi-Network-Controller-Docker-Container-06-Enable-Inform-Host-Option.jpg)</figure>**18.** Before you can override the inform host value, you will get a warning that misconfiguring this option can cause you to lose access to your devices. You may have to physically reset your Ubiquiti devices if something goes wrong.

You need to ensure that the IP address of your host is correct and reachable. If you are happy to proceed, <kbd>click</kbd> the “`Confirm`” button.

<figure class="wp-block-image aligncenter size-full" id="bkmrk--6">![Confirm you want to Inform Host](https://pimylifeup.com/wp-content/uploads/2024/01/UniFi-Network-Controller-Docker-Container-07-Confirm-Override-Inform-Host.jpg)</figure>**19.** A text box will now appear below the “`Inform Host`” option. Type in the local IP address (**1.**) of the machine on which you are running the UniFi network controller using Docker.

Once you are happy that you have typed in the correct IP address, <kbd>click</kbd> the “`Apply Changes`” button (**2.**).

<figure class="wp-block-image aligncenter size-full" id="bkmrk--7">![Type in HOST IP For UniFi Docker Container Machine](https://pimylifeup.com/wp-content/uploads/2024/01/UniFi-Network-Controller-Docker-Container-08-Add-New-IP-for-Inform-Host.jpg)</figure>**20.** Once you have applied your settings, you must restart the UniFi Docker container.

Back in the terminal, you can bring the UniFi container down by using the following command

```
```bash
docker compose down
```<a class="copy-code-block fa-copy" href="https://pimylifeup.com/unifi-docker/#copy">Copy</a>
```

**21.** Start UniFi back up on your device by running the following command within the terminal.

```
```bash
docker compose up -d
```<a class="copy-code-block fa-copy" href="https://pimylifeup.com/unifi-docker/#copy">Copy</a>
```

## Updating your UniFi Docker Container

One massive advantage of using the UniFi network controller through a Docker container is that updating it is straightforward.

The following steps will walk you through the effortless way of updating to the latest version. You can see what versions are available by [visiting the GitHub page for this project](https://github.com/jacobalberty/unifi-docker/releases).

**1.** To update the UniFI container, we must change to the directory we created earlier in this guide.

We need to use the Compose file we wrote to pull the latest version of the image.

```
```bash
cd /opt/stacks/unifi
```<a class="copy-code-block fa-copy" href="https://pimylifeup.com/unifi-docker/#copy">Copy</a>
```

**2.** After swapping to the directory where we wrote the Compose file, you can use the command below to download the latest version of the UniFi container.

```
```bash
docker compose pull
```<a class="copy-code-block fa-copy" href="https://pimylifeup.com/unifi-docker/#copy">Copy</a>
```

**3.** Finally, if a new version is found, you can get Docker to move over to it using the command below in the terminal.

Docker will detect the new image and restart the container using it.

```bash
docker compose up -d
```

# Unifi Console Commands

[![image.png](https://docs.coltscomputer.services/uploads/images/gallery/2023-12/scaled-1680-/9kxzHIpRVSjbLed2-WQcimage.png)](https://docs.coltscomputer.services/uploads/images/gallery/2023-12/9kxzHIpRVSjbLed2-WQcimage.png)

[![image.png](https://docs.coltscomputer.services/uploads/images/gallery/2023-12/scaled-1680-/6332pJWcAx6cbJBR-8Viimage.png)](https://docs.coltscomputer.services/uploads/images/gallery/2023-12/6332pJWcAx6cbJBR-8Viimage.png)

[![image.png](https://docs.coltscomputer.services/uploads/images/gallery/2023-12/scaled-1680-/BfhplrAy9N03Y21v-iFXimage.png)](https://docs.coltscomputer.services/uploads/images/gallery/2023-12/BfhplrAy9N03Y21v-iFXimage.png)

[![image.png](https://docs.coltscomputer.services/uploads/images/gallery/2023-12/scaled-1680-/aZ7WqtPKMGuSPHw1-iiaimage.png)](https://docs.coltscomputer.services/uploads/images/gallery/2023-12/aZ7WqtPKMGuSPHw1-iiaimage.png)

Unifi SSH

# Unifi Controller as a Windows Service

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">How to Set Up the UniFi Network Controller as a Windows Service</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">1. Close any instances of the UniFi software on the computer. If the UniFi Network Controller was just installed, make sure to open the controller software manually at least once, or let it run at the end of the wizard. Once you see the message UniFi Controller (a.b.c) started, the controller may be closed.</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">2. Launch the Command Prompt as an Administrator. On Windows 10 this would entail right-clicking and selecting "Run as administrator". Please see Windows documentation to identify the appropriate method for your specific Windows version.</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">3. Change directory to the location of UniFi in the computer using the following command (exactly as it is here, no need to substitute anything):</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">cd "%UserProfile%\\Ubiquiti UniFi\\"</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">4. Once in the root of the UniFi folder, issue the following command to install the UniFi Network Controller service:</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">java -jar lib\\ace.jar installsvc</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">5. Once you're at a new command prompt line, after it says “Complete Installation…”, issue the following:</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">java -jar lib\\ace.jar startsvc</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">6. Close the command prompt window either by entering the exit command, or clicking the X.</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">7. To access the UniFi Network Controller now open a browser and go to https://localhost:8443. Alternatively, the desired interface IP, or FQDN that is mapped to that host (in place of “localhost”) may be used.</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">NOTE: We recommend using Oracle Java JRE 8, which can be downloaded in Oracle's website. For the UniFi Cloud Access portal (</span></span>[<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">https://network.unifi.ui.com/</span></span>](https://network.unifi.ui.com/)<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">) to work properly, only use x64 Java.</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">How to Upgrade a UniFi Network Controller that is Running as a Windows Service</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">1. Open the UniFi Network Controller and make a backup.</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">2. Launch the Command Prompt as an Administrator. On Windows 10 this would entail right-clicking and selecting "Run as administrator". Please see Windows documentation to identify the appropriate method for your specific Windows version.</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">3. Change directory to the location of UniFi in the computer using the following command (exactly as it is here, no need to substitute anything):</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">cd "%UserProfile%\\Ubiquiti UniFi\\"</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">4. Once in the root of the UniFi folder, issue the following to stop and uninstall the UniFi Network Controller service:</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">java -jar lib\\ace.jar stopsvc</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">java -jar lib\\ace.jar uninstallsvc</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">5. Once a new command prompt line is presented, that means uninstalling the service was successful. Update the UniFi Network Controller application's version with any of the regular methods. Go to Settings &gt; Maintenance in the Controller to upgrade to the latest public released version, or alternatively download the UniFi Network Controller installation package for Windows from the Downloads page or the Releases section of the Community.</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">6. Once the software update is successful, close the UniFi Network Controller application before going back to the Command Prompt.</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">7. In the Command Prompt issue the following to install the UniFi Network Controller service once again:</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">java -jar lib\\ace.jar installsvc</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">8. Once you're at a new command prompt line, after seeing the "Complete Installation…" message, issue the following:</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">java -jar lib\\ace.jar startsvc</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">9. Close the Command Prompt window either by entering the exit command, or clicking the X.</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543"> </span>

<span class="TextRun  BCX0 SCXO163085543" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun  BCX0 SCXO163085543">10.To access the UniFi Network Controller now open a browser and go to https://localhost:8443. Alternatively, the desired interface IP, or FQDN that is mapped to that host (in place of “localhost”) may be used.</span></span><span class="EOP  BCX0 SCXO163085543"> </span>

<span class="EOP  BCX0 SCXO163085543">Unifi</span>

# Windows



# Windows

<div class="OutlineElement Ltr  BCX0 SCXO201415819" id="bkmrk-wireless-troubleshoo"><div class="TableContainer  BCX0 SCXO201415819"><table border="1" class="Table Border BCX0 SCXO201415819"><tbody class="BCX0 SCXO201415819"><tr class="TableRow  BCX0 SCXO201415819" role="row"><td class="BCX0 SCXO201415819" role="rowheader"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">Wireless troubleshooting</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td><td class="BCX0 SCXO201415819" role="columnheader"><span class="TextRun SCXO201415819 BCX0" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">netsh wlan show wlanreport</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td></tr><tr class="TableRow  BCX0 SCXO201415819" role="row"><td class="BCX0 SCXO201415819" role="rowheader"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">Shows wifi profiles</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td><td class="BCX0 SCXO201415819"><span class="TextRun SCXO201415819 BCX0" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">netsh wlan show profiles</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td></tr><tr class="TableRow  BCX0 SCXO201415819" role="row"><td class="BCX0 SCXO201415819" role="rowheader"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">Delete wifi profile</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td><td class="BCX0 SCXO201415819"><span class="TextRun SCXO201415819 BCX0" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">netsh WLAN delete profile name="Profile\_Name"</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td></tr><tr class="TableRow  BCX0 SCXO201415819" role="row"><td class="BCX0 SCXO201415819" role="rowheader"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">Connect to wifi</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td><td class="BCX0 SCXO201415819"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">netsh wlan connect ssid=YOUR\_WIFI\_SSID name=PROFILE\_NAME</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td></tr><tr class="TableRow  BCX0 SCXO201415819" role="row"><td class="BCX0 SCXO201415819" role="rowheader"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">List network interfaces</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td><td class="BCX0 SCXO201415819"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">netsh interface show interface</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td></tr><tr class="TableRow  BCX0 SCXO201415819" role="row"><td class="BCX0 SCXO201415819" role="rowheader"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">Disable an interface</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td><td class="BCX0 SCXO201415819"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">netsh interface set interface "Wi-Fi" disable</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td></tr><tr class="TableRow  BCX0 SCXO201415819" role="row"><td class="BCX0 SCXO201415819" role="rowheader"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">Purge kerberos tickets - use before gpudate to pull new computer groups</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td><td class="BCX0 SCXO201415819"><span class="TextRun SCXO201415819 BCX0" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">klist -lh 0 -li 0x3e7 purge</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td></tr><tr class="TableRow  BCX0 SCXO201415819" role="row"><td class="BCX0 SCXO201415819" role="rowheader"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">PS continuous ping with timestamps and output to file</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td><td class="BCX0 SCXO201415819"><span class="TextRun SCXO201415819 BCX0" data-contrast="none" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">Ping.exe -t wei-01-pc27 | ForEach {“{0} – {1}” -f (Get-Date),$\_} | Tee C:\\Accent\\pingtest.txt</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td></tr><tr class="TableRow  BCX0 SCXO201415819" role="row"><td class="BCX0 SCXO201415819" role="rowheader"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">Search ARP table by MAC Addr with Powershell</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td><td class="BCX0 SCXO201415819"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">Get-NetNeighbor | ? { $\_.LinkLayerAddress -eq "88-6F-D4-B8-1D-AD" }</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td></tr><tr class="TableRow  BCX0 SCXO201415819" role="row"><td class="BCX0 SCXO201415819" role="rowheader"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">Get link speed and duplex of NIC</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td><td class="BCX0 SCXO201415819"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">Get-NetAdapter | SELECT name, LinkSpeed, fullduplex | ft -autosize</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td></tr><tr class="TableRow  BCX0 SCXO201415819" role="row"><td class="BCX0 SCXO201415819" role="rowheader"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">Get firewall active profile</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td><td class="BCX0 SCXO201415819"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">Get-NetConnectionProfile</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td></tr><tr class="TableRow  BCX0 SCXO201415819" role="row"><td class="BCX0 SCXO201415819" role="rowheader"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">Set firewall active profile</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td><td class="BCX0 SCXO201415819"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">Set-NetConnectionProfile -InterfaceAlias Ethernet1 -NetworkCategory "Public"</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td></tr><tr class="TableRow  BCX0 SCXO201415819" role="row"><td class="BCX0 SCXO201415819" role="rowheader"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">qwinsta /server:&lt;servername&gt; or query session</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td><td class="BCX0 SCXO201415819"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">Find RdP sessions</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td></tr><tr class="TableRow  BCX0 SCXO201415819" role="row"><td class="BCX0 SCXO201415819" role="rowheader"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">rwinsta /server:&lt;servername&gt; &lt;session ID&gt;</span></span><span class="EOP SCXO201415819 BCX0"> </span>

</td><td class="BCX0 SCXO201415819"><span class="TextRun SCXO201415819 BCX0" data-contrast="auto" lang="EN-US" xml:lang="EN-US"><span class="NormalTextRun SCXO201415819 BCX0">End RDP session</span></span><span class="EOP SCXO201415819 BCX0"> </span>

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

</div></div><span class="EOP SCXO201415819 BCX0"> </span>

<span class="EOP SCXO201415819 BCX0"> </span>

<span class="EOP SCXO201415819 BCX0"> </span>

<span class="EOP SCXO201415819 BCX0"> </span>

<span class="EOP SCXO201415819 BCX0"> </span>

<span class="EOP SCXO201415819 BCX0"> </span>

<span class="EOP SCXO201415819 BCX0"> </span>

<span class="EOP SCXO201415819 BCX0"></span>

# OpenSSL generate .PFX file

` openssl pkcs12 -inkey STAR.example.com_key.txt -in STAR.example.com.crt -export -out example_pfx.pfx`

OPENSSL PFX

On Windows server to properly import you may need to specify encryption

`openssl pkcs12 -macalg SHA1 -keypbe PBE-SHA1-3DES -certpbe PBE-SHA1-3DES -export -out website.pfx -inkey private.key -in a01f36fe692456.crt -certfile gd_bundle-g2-g1.crt`