Thursday, July 30, 2009

Will an application written in Java or Perl know if there are two network cards on a machine?

I'm interested in Linux particularly. If I want one application only to communicate over a private LAN through one network card, and another to communicate over the WAN through another network card, do I make them listen on different ports and use iptables to route incoming and outgoing traffic from the right networks to the right ports (with the right application listening on each port)?

Will an application written in Java or Perl know if there are two network cards on a machine?
the correct way is to set up routing.





some addresses are automatically set to go to the local net and others are defaulted to the main router and off to the internet.





I know Perl%26amp;Java can handle the routes but neither deals with actively routing to particular address on different ethernet cards.


No comments:

Post a Comment