[CentOS] how to force outbound ssh through one network card

Wed Mar 9 16:10:32 UTC 2016
Marcelo Ricardo Leitner <marcelo.leitner at gmail.com>

Em 09-03-2016 01:54, John R Pierce escreveu:
> On 3/8/2016 8:47 PM, Clint Dilks wrote:
>> Here is documentation that may help
>> http://lartc.org/howto/lartc.rpdb.multiple-links.html  but as John
>> mentions
>> it is painful to get right.
>
>
> sadly, that document is like 15 years old, and hasn't been updated. the
> basics are still valid, but things like how to integrate that with RHEL
> startup scripts?  nada, you're on your own.

That's actually beyond that document scope.

Anyway, /usr/share/initscripts-*/sysconfig.txt has the info you need to 
integrate those comments on RHEL. Like, for the ip rule commands:

/etc/sysconfig/network-scripts/rule-<interface-name>
/etc/sysconfig/network-scripts/rule6-<interface-name>

   Contains lines that specify additional routing rules that should be added
   when the associated interface is brought up.

   Each non-comment line is used directly as an argument to "/sbin/ip 
rule add"
   or "/sbin/ip -6 rule add" for rule6 files.


YMMV if you want to use NetworkManager/firewalld, of course.

   Marcelo