This could be considered a continuation of this earlier SO question.
Ideally, I\'d like to jail a process into only using a certain interface, no matter what. It will be
you could try limiting process' network namespace to one single interface. You need a kernel build with CONFIG_NETNS (most kernels of modern distros) and some script to do the assignment for you. Sample configuration