Results 1 to 9 of 9

Thread: How to connect two pc with lan for internet access

  1. #1
    Join Date
    Jan 2012
    Beans
    5

    Exclamation How to connect two pc with lan for internet access

    I have two computers, the first computer (PC1) have two network cards, the first network card (ethernet 0) is connected to a broadband(DSL). The second network card (ethernet 1) is connected to the second computer (PC2). My problem is, how to configure the two computers (PC1 & PC2) that PC2 can access the internet? Please help. Thanks.

  2. #2
    Join Date
    Aug 2011
    Location
    Berlin, Germany
    Beans
    5,652
    Distro
    Ubuntu Gnome 14.04 Trusty Tahr

    Re: How to connect two pc with lan for internet access

    Create a new profile in the network-manager of the first PC naming it somehow. For the regular eth0 interface choose "Automatic DHCP" for the second profile for eth1 "together with other ...". For the second profile you need the MAC address of the interface:
    Code:
    ifconfig eth1
    Add it, too.

    On PC2 choose "Automatic DHCP"

  3. #3
    Join Date
    Sep 2011
    Beans
    48
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to connect two pc with lan for internet access

    Quote Originally Posted by shadhin View Post
    I have two computers, the first computer (PC1) have two network cards, the first network card (ethernet 0) is connected to a broadband(DSL). The second network card (ethernet 1) is connected to the second computer (PC2). My problem is, how to configure the two computers (PC1 & PC2) that PC2 can access the internet? Please help. Thanks.
    You have not mentioned which operating system you are using. It could be MS / Linux/ Mac etc etc.
    Anyhow, For

    Windows:

    You need to enable routing services through Control Panel---->>Administrative Tools---->>> Services
    Then you need to share the connection that is connected to the DSL modem.

    Linux:

    You need to use IP Tables to redirect traffic from one Ethernet (Connected to DSL modem) to the other ethernet (connected to the PC2) and the other way round. Also you will be required to use NAT translations to get the traffic from Ethernet 2( connected to PC2) to Eth-1 (connected to DSL) and to get it back.

    This is the basic idea of doing it. Please search for actual commands to accomplish this depending on your OS.
    Last edited by anspectrum; July 20th, 2013 at 06:30 PM.

  4. #4
    Join Date
    Jan 2012
    Beans
    5

    Re: How to connect two pc with lan for internet access

    thanks. I'm using Ubuntu 13.04 64 Bit.

  5. #5
    Join Date
    Dec 2008
    Beans
    10

    Re: How to connect two pc with lan for internet access

    Isn't it better to place a router in between?
    In this situation pc1 should always be powered on to get internet towards pc2

  6. #6
    Join Date
    Dec 2008
    Beans
    10

    Re: How to connect two pc with lan for internet access

    Isn't it better to place a router in between?
    In this situation pc1 should always be powered on to get internet towards pc2

  7. #7
    Join Date
    Feb 2008
    Beans
    4,279
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to connect two pc with lan for internet access

    +1 for the router. Last week I bought a router at Goodwill, for $0.80. It's not state of the art, but it's a better and simpler solution than PC2 going through PC1 to the Internet.

  8. #8
    Join Date
    Sep 2011
    Location
    Pennsylvania, U.S.A.
    Beans
    1,891
    Distro
    Ubuntu Development Release

    Re: How to connect two pc with lan for internet access

    +2 for a router, there are several advantages. Gordon, stressing the budget are we?

  9. #9
    Join Date
    Jul 2008
    Location
    Canada
    Beans
    2,022
    Distro
    Ubuntu Development Release

    Re: How to connect two pc with lan for internet access

    +3 for a router, saves a little work and a little on power as only one computer needs to be on.
    UsingTheTerminal and PopularPages

    Smile today, cry tomorrow!
    ( Read this everyday )

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •