Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is there a simple way to tunnel specific apps only through wireguard?


WG exposes a point to point / l3 network interface like any other to userspace, so an answer would not be specific to wireguard but about networking and routing in general.

Network Namespaces and VRFs are the correct way to approach this I think: https://www.kernel.org/doc/Documentation/networking/vrf.txt


On linux you’d probably want to use network namespaces to accomplish this, there’s an example at https://www.wireguard.com/netns/


You can choose to only have certain IP address ranges accessible through Wireguard, it also creates a wg0 interface that you should be able to bind software to: https://superuser.com/questions/241178/how-to-use-different-...


Should be possible to accomplish something like this using namespaces, under Linux.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: