LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-25-2009, 11:42 AM   #1
new2linux2009
LQ Newbie
 
Registered: May 2009
Posts: 3

Rep: Reputation: 0
How to configure Ubuntu using 2 NICs?


Hi All

I am very green on the Linux stuffs.

I have 2 NICs in my PC2 and I am trying to setup the following:

INCOMING ---------------------------------------------OUTGOING
[PC1 say IP 192.168.1.5]----> [PC2 eth0] and forward to [PC 2 eth1] ----> [PC3].

Meaning that [PC2 eth0] received traffic from [PC1 IP 192.168.1.5] and forward the traffic out to [PC2 eth1] to [PC3]

Is this possible ? If so, how do I do this.

Thanks in advance.

Last edited by new2linux2009; 05-25-2009 at 11:45 AM.
 
Old 05-25-2009, 11:46 AM   #2
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
If I understand what you're trying to do correctly, give this a go:
http://ubuntuforums.org/showthread.php?t=207701
 
Old 05-25-2009, 12:14 PM   #3
new2linux2009
LQ Newbie
 
Registered: May 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jamescondron View Post
If I understand what you're trying to do correctly, give this a go:
http://ubuntuforums.org/showthread.php?t=207701
Thanks James

One more related question, to make this permamently, is this correct.
vi /etc/sysctl.conf

::
::
::
::

# Uncomment the next line to enable packet forwarding for IPv4.
net.ipv4.ip_forward=1

Even if both "eth0 & eth1" are configured "DHCP automacitally" and "eth0" know how to foward tracffic out to "eth1" ?
 
Old 05-25-2009, 12:26 PM   #4
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
I'll be honest with you, I have no clue on that one; try it, see what happens
 
Old 05-25-2009, 12:48 PM   #5
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,274

Rep: Reputation: 148Reputation: 148
Hai what is your expectation? just forward your traffic from one interface to another(like route the traffic), if yes iptable is suitable.
OR
if you setup linux-bridge on your pc2,it is acting as a transparent system(actually bridge is layer2 so this will allow all the traffic)
 
Old 05-27-2009, 10:17 AM   #6
new2linux2009
LQ Newbie
 
Registered: May 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Hi kirukan

Thanks for your help.

Yes, I just want to forward traffic to PC3.

Is there a way pervent PC3 to coming back out? I am trying to setup a one way (forward) to PC3 only and not allowing PC3 to come back out to PC2.

Please advise

Thanks

Last edited by new2linux2009; 05-27-2009 at 10:18 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Configure 3 NICs (2 EXT, 1 INT): Can't access both EXTs Myrion Linux - Networking 1 06-11-2008 02:13 PM
I want to configure RHEL5 as a router using two NICs vijay.gulge Linux - Networking 3 04-10-2008 08:50 AM
configure 2 NICs on linux firewall ooorah Linux - Networking 17 12-20-2007 07:59 AM
How to configure Netfilter with multiple NICs Myrion Linux - Networking 3 08-22-2007 02:17 PM
Can't configure my NICs Tekime Linux - Networking 3 02-10-2002 11:20 AM


All times are GMT -5. The time now is 05:06 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration