How to configure Ubuntu using 2 NICs?

Discussion in 'HOWTO-Related Questions' started by new2linux2, May 25, 2009.

  1. new2linux2

    new2linux2 New Member

    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]----> [PC2 eth0] and forward to [PC 2 eth1] ----> [PC3].

    Meaning that [PC2 eth0] received traffic from [PC1 IP] 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: May 25, 2009
  2. id10t

    id10t Member

    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.
  3. new2linux2

    new2linux2 New Member

    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/" ?

    How do you setup the firewall under Ubuntu?

    Many thanks for your help.
  4. falko

    falko Super Moderator ISPConfig Developer

    Open /etc/sysctl.conf and add the line
    Then run
    sysctl -p

Share This Page