I want to be able to make request through a specific network interface, like this:
ping -I eth0.1 google.be ping -I eth0.2 google.be
This example works on my multihomed OpenWRT router.
I now want to do something similar on my computer.
The catch is: it's not a real interface, but a VPN interface.
Right now I have set up OpenVPN, which has created a
TUN device. I currently chose that because it's the default. I don't mind switching to
PPTP if that makes this easier.
So what I want to do is do something similar as the first command, but then:
ping -I tun0 google.be
Right now, this just does not work and times out.
I've also tried it with a
TAP interface, and that gives me network unreachable errors.
I guess I need to add some
iproute entries, or something alike.
Important: I do not know which servers/IPs I need to contact through the vpn device, that's a variable, so I can't just set a route for that.