Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Trouble setting Ubuntu box up as router

    I have multiple devices in my garage that need internet connectivity. I have my main Netgear router inside the house. I have a computer running Ubuntu in the garage with dual NICs.

    Here's a map of how I have it setup now:
    (can't post URLs yet... so there's the link to the picture)

    Here's my /etc/network/interfaces:

    auto lo
    iface lo inet loopback
    auto eth0
    iface eth0 inet static
    auto eth1
    iface eth1 inet static
    I was trying to keep everything on the same subnet.

    eth0 is the external NIC, connected to the router in the house. eth1 is the internet NIC, which would go out to the devices in the garage.

    Now, I know it would be easiest to just connect a switch up and run all the devices in the garage off that switch. But the switch I have is a 10/100, and my network in the house is gigabit, and I want the PC in the garage to have gigabit access... which is why I'm doing this dual NIC setup and using the PC as a router, then the other devices in the garage will be 10/100.

    In addition, I used the shell script as described in this article: to setup iptables. I also uncommented the net.ipv4.ip_forward=1 line in /etc/sysctl.conf.

    What am I doing wrong here? None of the devices in the garage that I connect up to the Ubuntu PC are getting connectivity. None are getting a DHCP lease from the main router in the house. The Ubuntu PC itself has internet access just fine though.

  2. #2

    Ok, I think its not good to have the same ip range on both NIC'S of your server. As it will get confused and will not know where to forward packets when it looks up the routing table.

    From the point of what you are trying to do i think you should be bridging the 2 NIC'S together. That way you can have the same IP range on both cards.

    Hope this helps,


Posting Permissions

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