I recently setup my mullvad vpn via wire guard protocol. Right now it route all traffic through tunnel, but can’t figure out how to send only specific traffic (example.com, example2.com, etc…) through wire guard tunnel.
What I’ve done:
Сreate a WireGuard interface
Add new IP address (mullvad) and bind to WG interface
Add WG peer configuration
Set DNS server to DNS settings
Add route - 0.0.0.0/0 with gateway mullvad
Add NAT rule to masquerade all on WG interface.
I’ve read many articles and forum topics, somewhere they say that I can add “Address List” to my route - but I can see any options about it in my route, another try walk me through firewall “layer 7” protocol - but I still wasn’t successful. So would you please give me some advices/instruction/articles/wiki how to send specific traffic through WG tunnel, btw, if it make any sense I have ROS 7.6.
@anav is not completely correct, you can route traffic to selected destinations identified by hostnames, it’s just that reliability depends on other factors.
It’s easy if you have specific hostname (www.example.net) with static or mostly static IP address, the site hosts everything on www.example.net and doesn’t load stuff from .example.net, or from completely different and unpredictable external domains. Simple case like this, just add hostname(s) in address list and use mangle rules to assign routing marks based on this list. But when it’s less predictable (so opposite of the previous), it’s anywhere between problematic and impossible.