LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux > 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

Tags used in this thread
Popular LQ Tags , , , , ,

Reply
 
Thread Tools
Old 10-15-2009, 04:53 PM   #1
whitehawk
LQ Newbie
 
Registered: Dec 2004
Distribution: Ubuntu
Posts: 18
Thanked: 0
Question Multiple NIC on Ubuntu Box - Isolating traffic to specific interfaces


[Log in to get rid of this advertisement]
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?
windows_xp_2003 whitehawk is offline  
Tag This Post , , , , ,
Reply With Quote
Old 10-16-2009, 10:03 AM   #2
rizhun
Member
 
Registered: Jun 2005
Location: England
Distribution: Ubuntu, SLES, AIX
Posts: 206
Thanked: 20
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.
windows_xp_2003 rizhun is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
how to redirect squid traffic to a specific nic card scream Linux - Newbie 0 03-09-2009 01:44 PM
Multiple interfaces - All traffic flows through just one... crazyivan Linux - Networking 14 04-06-2007 01:41 PM
NFS - How can I direct traffic to a specific nic? gislil Linux - Networking 2 10-25-2006 05:59 AM
Multiple Interfaces + Cisco 515 and default NIC streamalot Linux - Networking 0 06-12-2006 02:43 PM
Need to route traffic through specific nic cards... Thaidog Linux - Networking 4 07-01-2005 08:31 PM


All times are GMT -5. The time now is 09:38 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration