Binding client socket to device (e.g. using dig)
aleksander at aleksander.es
Wed May 23 21:04:37 UTC 2018
>> I tried to use the "-b IP#PORT" option in dig to bind the queries to
>> the IP addresses of either eth0 or wwan0, but that is only making the
>> source packets bind to a specific IP address, the actual packet gets
>> still routed via the default route with lowest metric.
>> Is there any other way to achieve the same thing? (without adding
>> additional explicit routes to the DNS servers...)
> Hi, Aleksander:
> I have this working nicely using the kernel's routing policy database. I
> use a multipath default route but I think it should work fine with
> multiple default routes with different metrics.
> See the LARTC HOWTO for details, e.g.
Yes, this kind of setup was exactly what I was trying to avoid ;)
I believe I'm too used to "ping -I wwan0...", and just thought dig
could benefit from something so easy to use.
More information about the bind-workers