Please note that LinuxExchange will be shutting down on December 31st, 2016. Visit this thread for additional information and to provide feedback.

Let's say I have two network interfaces, eth0 and eth1, and I want to route traffic from different applications to either one or the other on demand.

How would one do this?

asked 30 Aug '10, 05:19

Joehillen's gravatar image

Joehillen
1462512
accept rate: 40%

What application and port are you using?

(30 Aug '10, 13:23) Kevin M

I don't have specifics because this is mostly something I have been wondering, but basically I imagine using port 80 for both interfaces.

(31 Aug '10, 21:11) Joehillen



You can direct different traffic to o different interfaces via iptables, however, iif you're going to use the same port going to the same destination, how then would iptables know which interface to use and when?

To me, it seems you're more in need of load balancing, which is what it sounds like you're seeking vs. using etho0 for this and eth1 for that.

link

answered 27 Sep '10, 14:26

Ron's gravatar image

Ron ♦
9361718
accept rate: 13%

We def. need more info, which applications, why do you need to do this, etc.

Without that info it's kind of a crap shoot, load balancing, private network/dmz, there are dozens of reason why one would conceivably do this, and the proper ways of doing so differ for quite a few of them.

link

answered 28 Sep '10, 13:23

rfelsburg's gravatar image

rfelsburg ♦
6061618
accept rate: 25%

you need iptables NAT which destro u u ran anyway????

link

answered 04 Apr '11, 16:39

rtabhu's gravatar image

rtabhu
1
accept rate: 0%

hi what destro do u run i would suggest that you need iptables and may be squid to add some soup and flavors

link

answered 04 Apr '11, 16:40

rtabhu's gravatar image

rtabhu
1
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×23

Asked: 30 Aug '10, 05:19

Seen: 3,093 times

Last updated: 04 Apr '11, 16:40

powered by OSQA