Multiple NIC on Ubuntu Box - Isolating traffic to specific interfaces
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.
Multiple NIC on Ubuntu Box - Isolating traffic to specific interfaces
Hello Community,
I have two custom built ubuntu boxes running 9.04 Server edition on them. Both these boxes have two gigabit NIC cards. They are connected to a 24 port layer 2 switch which is connected to my wireless router.
Router (192.168.0.1)
|
24 port Gigabit switch
| |
| |-- Ubuntu 9.04 Server (192.168.0.23) 100 Mbps NIC
| |-- Ubuntu 9.04 Server (192.168.0.32) 1 Gbps NIC
|
|-- Ubuntu 9.04 Server (192.168.0.24) 100 Mbps NIC
|-- Ubuntu 9.04 Server (192.168.0.42) 1 Gbps NIC
The network card configuration files have the default gw set to 192.168.0.1 for both the NICs in the two machines.
My objective is to have certain services listen to specific address only while the general traffic (SSH, apt-get etc) use the other interface. The problem I am facing is that I am able to get into the box from outside. My SSH, DNS, MySQL and Tomcat servers are visible from other machines on my network but I am not able to see the internet from within these boxes. For instance, I can SSH into 192.168.0.23 or 192.168.0.32 but I cannot ping google.com from within these boxes.
However, If I do route add default gw 192.168.0.1 the problem goes away but then I am not able to divert the internal traffic to a specific card.
The idea here is to use the gigabit cards for my services (SMB/ DB) and the 100Mbps cards for running update check or browing the internet etc.
What should I change in my iptables to get what I want?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.