Skip to content

Quick Start

This guide helps you finish a first working setup that sends selected sites through a VPN while everything else keeps using the normal connection.

If you installed the full package, the Web UI is the easiest place to start. If you installed keen-pbr-headless or prefer editing files directly, use the JSON / CLI tab.

To complete your minimal installation you will need to configure the following things:

    
graph LR;
    classDef default font-size:16pt;

    A["1. Add outbounds"]
    B["`2. Add lists
(optional)`"]
    C["3. Configure DNS servers"]
    D["4. Add routing rules"]

    A==>B;
    B==>C;
    C==>D;
  
If you have installed keen-pbr-headless, see JSON configuration method.

Open the Web UI

Open http://<router-ip>:12121/ in your browser (replace <router-ip> with your router IP address).

Tip: On Keenetic / NetCraze you can also open http://my.keenetic.net:12121/.

Create the outbounds

Go to Outbounds and create these two entries:

  1. Create a new outbound named vpn with the following options:

    • type = interface
    • interface = <your_vpn_interface_name>
    • gateway = <your_vpn_gateway_ip> if your VPN requires an explicit IPv4 gateway
    • gateway6 = <your_vpn_gateway6_ip> if your VPN requires an explicit IPv6 gateway
  2. Create another outbound named default with the following options:

    • type = Routing table
    • Table ID = 254

Why default?

This example uses the main Linux routing table as the fallback path, so default should point to routing table 254.

Add the DNS servers

Go to DNS Servers and create these entries:

  1. Create a DNS server named vpn_dns with the following options:

    • address = <your_vpn_dns_server_ip>
    • outbound = vpn if you want DNS queries for this server to go through the VPN
  2. Create another DNS server named default_dns with the following options:

    • address = <your_regular_dns_server_ip>

Create a test list

Go to Lists and create a list such as my_sites with type Domains / IPs, then add a test domain like ifconfig.co.

Add routing and DNS rules

  1. Go to Routing rules and route my_sites through the vpn outbound.
  2. Go to DNS Rules and send my_sites to your VPN DNS server.
  3. Set the primary DNS server to the default_dns.

Verification

  1. Apply the configuration and wait until “draft config” notification disappear.
  2. Clear DNS cache on your device:
    • For Windows PC, open Command Prompt and run ipconfig /flushdns.
    • For Linux PC, open Terminal and run sudo resolvectl flush-caches.
    • For mobile devices just reconnect to your WiFi.
  3. Open a website from your list (ipconfig.co) and check that IP is differs from the other “my IP” website (e.g. wtfismyip.com)

To verify the setup, open a site from your list and make sure it works through the VPN. If you want a command-line check, run:

bash
keen-pbr test-routing ifconfig.co

If the result shows your VPN outbound in both the expected and actual columns, the setup is working.

For the full reference, start with Configuration or jump straight to Full Reference Config. If something does not work yet, see Troubleshooting.