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;
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).
Create the outbounds
Go to Outbounds and create these two entries:
-
Create a new outbound named
vpnwith the following options:type = interfaceinterface = <your_vpn_interface_name>gateway = <your_vpn_gateway_ip>if your VPN requires an explicit IPv4 gatewaygateway6 = <your_vpn_gateway6_ip>if your VPN requires an explicit IPv6 gateway
-
Create another outbound named
defaultwith the following options:type = Routing tableTable 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:
-
Create a DNS server named
vpn_dnswith the following options:address = <your_vpn_dns_server_ip>outbound = vpnif you want DNS queries for this server to go through the VPN
-
Create another DNS server named
default_dnswith 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
- Go to Routing rules and route
my_sitesthrough thevpnoutbound. - Go to DNS Rules and send
my_sitesto your VPN DNS server. - Set the primary DNS server to the
default_dns.
Verification
- Apply the configuration and wait until “draft config” notification disappear.
- 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.
- For Windows PC, open Command Prompt and run
- 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:
keen-pbr test-routing ifconfig.coIf the result shows your VPN outbound in both the expected and actual columns, the setup is working.