Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th May 2009, 19:12
new2linux2 new2linux2 is offline
Junior Member
 
Join Date: May 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default How to configure Ubuntu using 2 NICs?

Hi All

I am very green on the Linux stuffs.

I have 2 NICs in my PC 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 new2linux2; 25th May 2009 at 19:50.
Reply With Quote
Sponsored Links
  #2  
Old 26th May 2009, 15:52
id10t id10t is offline
Senior Member
 
Join Date: Nov 2008
Posts: 242
Thanks: 2
Thanked 22 Times in 22 Posts
Default

Yup. First you'll want to play with the udev persistent rules for net devices and make sure eth0 stays eth0 (done via MAC address) and eth1 stays eth1.

Then you'll need to enable IP forwarding.

Then you'll need to probably set up a firewall, etc.
Reply With Quote
  #3  
Old 27th May 2009, 18:10
new2linux2 new2linux2 is offline
Junior Member
 
Join Date: May 2009
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Thumbs up

Thanks id10t,

I checked the "/ect/udev/rules.d/persistent-net.lues, the MAC addresses are corresponded to the proper eth.

To enable the IP forwording, do I do it under the "/etc/init.d/iptables.sh" ?

How do you setup the firewall under Ubuntu?


Many thanks for your help.
Reply With Quote
  #4  
Old 28th May 2009, 12:53
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
 
Default

Quote:
Originally Posted by new2linux2 View Post
To enable the IP forwording, do I do it under the "/etc/init.d/iptables.sh" ?
Open /etc/sysctl.conf and add the line
Code:
net.ipv4.ip_forward=1
Then run
Code:
sysctl -p
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
new2linux2 (28th May 2009)
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure grub for ubuntu tripple boot littlewizard HOWTO-Related Questions 0 24th May 2009 15:10
Unbale to login to Postfix from webmail wasimriz HOWTO-Related Questions 5 6th April 2009 14:49
ubuntu configure dns-nameserver pointer on eth0 bellbuk Installation/Configuration 2 3rd June 2008 15:57
Problem on restart bind9 satimis Server Operation 6 30th October 2007 03:01
Log for Debugging jwan Installation/Configuration 5 27th October 2006 15:34


All times are GMT +2. The time now is 04:32.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.