Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a program that connects to the internet that I would like to route through one of my secondary network interfaces. I need one specific port routed to eth1 instead of eth0. I believe that I should be using iptables for that, but I don't really know how to do it. Any suggestions?
iptables -t nat -A OUTPUT -p tcp --dport 51413 -j DNAT --to-destination 134.82.164.212
or may be like this:
iptables -t nat -A OUTPUT -p tcp --dport 51413 -j DNAT --to-destination 134.82.164.212:51413
I actually not really sure that will work, as by this rule we ask iptable to send traffic to eth0 IP address.
It is possible also to send it to GW, but as all ethernet in same network it is useless.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
It's pretty much impossible that the bandwidth of a single NIC is lower than your Internet bandwidth. As long as this is the case there's simply no need to split Internet-bound traffic between different cards.
It's pretty much impossible that the bandwidth of a single NIC is lower than your Internet bandwidth. As long as this is the case there's simply no need to split Internet-bound traffic between different cards.
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660
Rep:
Well they're all on the same subnet, so I doubt that... It's best to find out the why before the what. Knowing the first can dramatically change the second.
Each connection to the router has a 2Mbit bandwidth limit. By routing my server traffic over a secondary NIC I can free up the main one for internet browsing and downloading stuff, which is dramatically slowed when the server is being used.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.