LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Configuring two NICS to be used based on port number used for communication (https://www.linuxquestions.org/questions/linux-networking-3/configuring-two-nics-to-be-used-based-on-port-number-used-for-communication-4175505551/)

BhushanPathak 05-20-2014 06:32 AM

Configuring two NICS to be used based on port number used for communication
 
Hello,

I have CentOS deployed with 2 NIC cards, both have different IPv4 addresses.

I also have a JBOSS AS instance running with multiple apps deployed in it.

The requirement that I have is that based on the port being used for communication, the traffic should flow through different network interfaces, for ex -
eth0 should be used -
1. Accept & respond to requests coming over port 80, 443, 8080
2. When the server wants to start communication outside on these ports

eth1 should be used -
1. Accept & respond to requests coming over port 1099, 1399
2. When the server wants to start communication outside on these ports

Right now, the server is using only eth0 for all its communication. The individual apps in the JBOSS are not intelligent enough to identify & use different interfaces when communicating over different ports.


Is there someway of creating a virtual bridge or virtual tunnel or the like which would allow to segregate the traffic at the OS level based on ports used? I can then try to bind the JBOSS AS to use the virtual bridge/tunnel/etc. to use for communication.

Thanks
Bhushan

MensaWater 05-20-2014 08:20 AM

Haven't done it myself but this post looks like it might have the way to go:

http://www.linuxquestions.org/questi...not-ip-486823/


All times are GMT -5. The time now is 06:32 AM.