Peplink Router Setup
Router with Static IP address configuration
1. Go to SafeDNS Dashboard > Settings > Devices and copy your IP address to the "IP addresses / DynDNS" box, choose a policy, and click "Add".
2. Change your router’s DNS servers to SafeDNS addresses - 195.46.39.39 and 195.46.39.40:
- Log in to the Peplink Web Admin interface.
- Navigate to Network > WAN and click on your active WAN connection.
- Under DNS Servers, set the DNS assignment mode to custom/manual.
- Enter the primary and secondary SafeDNS server addresses:
Primary DNS: 195.46.39.39
Secondary DNS: 195.46.39.40
- Click Save and Apply Changes.
You have successfully configured your router.
Please note that settings take 5-7 minutes to apply.
Stats and filtering status update every 10 minutes.
Router with Dynamic IP address configuration
Peplink routers have the built-in feature of the Dynamic DNS setup named Find My Peplink.
It can be activated easily from the router with no configuration needed on any DDNS service.
5. Go to SafeDNS Dashboard > Settings > Devices and copy your DynDNS hostname to the "IP addresses / DynDNS" box, choose a policy, and click "Add".
Once added, you will see it in the DynDNS section of the Dashboard.
6. Change your router’s DNS servers to SafeDNS addresses - 195.46.39.39 and 195.46.39.40
- Log in to the Peplink Web Admin interface.
- Navigate to Network > WAN and click on your active WAN connection.
- Under DNS Servers, set the DNS assignment mode to custom/manual.
- Enter the primary and secondary SafeDNS server addresses:
Primary DNS: 195.46.39.39
Secondary DNS: 195.46.39.40
- Click Save and Apply Changes.
You have successfully configured your router.
Please note that settings take 5-7 minutes to apply.
Stats and filtering status update every 10 minutes.
DoH setup
DoH is supported on all paid plans.
DoH links with policy are available on Education & Non-Profit, Pro, and Pro Plus plans only.
MikroTik router allows setting up the DoH connection to SafeDNS.
DoH link without policy
With this setup, all devices connected to the network with the IP address added in the SafeDNS Dashboard will be filtered with the selected policy. If the IP address of the router is changed, you need to add a new IP address in the SafeDNS Dashboard.
Configure the internal LAN interface and the DHCP service:
- In Peplink Web Admin, navigate to Network > LAN and select your client LAN or VLAN.
- Locate DNS Proxy Settings and check the box to Enable DNS Proxy. Leave Include Google Public DNS Servers unchecked.
- If Peplink manages DHCP for the network, locate DHCP Server Settings and set DNS Servers > Assign DNS server automatically. This advertises the Peplink LAN IP address as the default DNS server to DHCP clients.
- If an external device manages DHCP, set DHCP Option 6 (DNS servers) on that server to the reachable Peplink LAN IP address.
- Save and apply changes, then renew client network leases.
With the LAN proxy active, configure the Peplink DoH engine to connect to your SafeDNS custom URL:
- In Peplink Web Admin, navigate to Network > WAN > DNS over HTTPS.
- Enable the DNS over HTTPS feature.
- Set Server to Custom URL.
- In the URL field, paste your copied SafeDNS token link
https://doh.safedns.com/ - In the IP Address field, enter
195.46.39.41. - Click Save and Apply Changes.
DoH link with policy
With this setup, all devices connected to the router will be filtered with the selected policy.
The Router is identified by the policy token in the link. If the IP address of the router changes, it will not affect the filtering.
Click Copy Link to retrieve your unique DoH URL. The default link format appears as https://<token>.doh.safedns.com/
Configure the internal LAN interface and the DHCP service:
- In Peplink Web Admin, navigate to Network > LAN and select your client LAN or VLAN.
- Locate DNS Proxy Settings and check the box to Enable DNS Proxy. Leave Include Google Public DNS Servers unchecked.
- If Peplink manages DHCP for the network, locate DHCP Server Settings and set DNS Servers > Assign DNS server automatically. This advertises the Peplink LAN IP address as the default DNS server to DHCP clients.
- If an external device manages DHCP, set DHCP Option 6 (DNS servers) on that server to the reachable Peplink LAN IP address.
- Save and apply changes, then renew client network leases.
With the LAN proxy active, configure the Peplink DoH engine to connect to your SafeDNS custom URL:
- In Peplink Web Admin, navigate to Network > WAN > DNS over HTTPS.
- Enable the DNS over HTTPS feature.
- Set Server to Custom URL.
- In the URL field, paste your copied SafeDNS token link
https://doh.safedns.com/ - In the IP Address field, enter
195.46.39.41. - Click Save and Apply Changes.
Bypass Prevention
To prevent unmanaged clients or network users from bypassing SafeDNS filtering policies, enforce additional security rules within Peplink Web Admin and the SafeDNS Dashboard.
Redirect Traditional DNS Requests
Configure Peplink to intercept standard DNS queries sent directly to external resolvers (such as 8.8.8.8 or 1.1.1.1 on port 53):
- Open Advanced > Misc. Settings > Service Forwarding > DNS Forwarding.
- Enable Forward Outgoing DNS Requests to Local DNS Proxy.
- Save and apply changes. Standard UDP/TCP port 53 requests are automatically redirected to the local Peplink DNS proxy.
Block Outbound DNS-over-TLS (DoT)
Prevent devices from establishing encrypted DNS-over-TLS sessions to third-party resolvers:
- Open Advanced > Firewall > Access Rules > Outbound Firewall Rules.
- Add a new outbound rule positioned above general allow rules:
- Rule Name / Action: Block Outbound DoT / Deny
- Protocol: TCP
- Destination Port:
853 - Source Subnet: Client Wi-Fi LAN / VLAN subnets
- Destination: Any external address
- Save and apply rules to drop outbound TCP port 853 traffic.
Block Public Encrypted Resolvers in SafeDNS AppBlocker
Restrict browser-based DoH fallback options inside the SafeDNS Dashboard:
- In SafeDNS Dashboard, edit the filtering policy assigned to your Peplink device.
- Under AppBlocker > VPN and Proxy, block Chrome/Firefox Secure DNS and Apple Private Relay.
- As appropriate, enable blocking for the Proxies & Anonymizers category and add known public DoH bootstrap hostnames to the policy Denylist.
- Save the policy settings.



