Was configuring a WireGuard interface to be solely for split-tunneling qBittorrent and it took me a day to figure out how to actually set it up 💔

So you just turn off route table setting that wg-quick did automatically with Table = off
and create a new route table on PostUp

Example configuration to be pasted in [Interface] section
the table ID here is 100, change it to whatever you want ig
with 10.0.0.2 being your WireGuard interface IP
Table = off
PostUp = ip route add default dev %i table 100
PostUp = ip rule add from 10.0.0.2 table 100
PostDown = ip rule del from 10.0.0.2 table 100

Leave a Reply

Your email address will not be published. Required fields are marked *

To respond on your own website, enter the URL of your response which should contain a link to this post’s permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post’s URL again. (Find out more about Webmentions.)