LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-15-2009, 03:53 PM   #1
whitehawk
LQ Newbie
 
Registered: Dec 2004
Distribution: Ubuntu
Posts: 18

Rep: Reputation: 0
Question 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?
 
Old 10-16-2009, 09:03 AM   #2
rizhun
Member
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu, SLES, AIX
Posts: 268

Rep: Reputation: 47
Hi whitehawk,

You shouldn't need to get iptables involved.
This should be possible with proper routing.

Please post the output from a 'netstat -rn' and 'ifconfig -a'.

Are you using network config files for individual cards?
If so, please post the content of these files.

Thanks.
 
  


Reply

Tags
dedicated, ip, multiple, networking, nic, ubuntu



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple interfaces - All traffic flows through just one... crazyivan Linux - Networking 16 03-05-2012 05:02 AM
how to redirect squid traffic to a specific nic card scream Linux - Newbie 0 03-08-2009 03:57 AM
NFS - How can I direct traffic to a specific nic? gislil Linux - Networking 2 10-25-2006 04:59 AM
Multiple Interfaces + Cisco 515 and default NIC streamalot Linux - Networking 0 06-12-2006 01:43 PM
Need to route traffic through specific nic cards... Thaidog Linux - Networking 4 07-01-2005 07:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration