Linux: How do I force a specific network interface to be used?

后端 未结 4 1127
被撕碎了的回忆
被撕碎了的回忆 2021-01-31 10:55

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

4条回答
  •  难免孤独
    2021-01-31 11:17

    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

提交回复
热议问题