What is the name of the domain?
What is the issue you’re encountering
I am encountering an issue when using Cloudflare WARP and WireGuard VPN concurrently on Ubuntu. I need all traffic to the IP address x.x.x.x to go through WireGuard, while all other traffic should pass through Cloudflare WARP.
What steps have you taken to resolve the issue?
The problem arises when I first connect WireGuard, and the RDP connection to x.x.x.x is successfully established. However, once I connect Cloudflare WARP, I get disconnected, and the route to x.x.x.x starts going through WARP, even though it should remain on WireGuard. Meanwhile, cat /etc/resolv.conf shows that Cloudflare is rewriting the DNS settings:
This file was generated by cloudflare-warp.
nameserver 127.0.2.2
nameserver 127.0.2.3
What are the steps to reproduce the issue?
I need to configure the system so that traffic to x.x.x.x always goes through WireGuard, even when Cloudflare WARP is connected. What I have already tried:
Used the command
sudo ip rule add to x.x.x.x table main prio 100
to set the routing priority through WireGuard. I restarted WireGuard and WARP interfaces in different orders to check the impact on routing. Tried the following commands:
sudo wg-quick up wg0
sudo ip rule add to x.x.x.x table main prio 100
sudo resolvectl dns wg0 1.1.1.1 8.8.8.8
sudo resolvectl domain wg0 ‘~.’
sudo warp-cli connect
This all had no effect. I suspect that Cloudflare WARP is changing the DNS and routing settings for all traffic, including that which should go through WireGuard. This causes a problem with route prioritization and potentially a conflict in the DNS system settings.
Is there a way to configure Cloudflare WARP so that it does not change the routing and DNS for certain IP addresses? Does anyone have a solution to ensure stable operation of both VPNs simultaneously? I would appreciate any advice and recommendations.