Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- May 2004
Trouble setting Ubuntu box up as router
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 address 192.168.1.60 netmask 255.255.255.0 gateway 192.168.1.1 auto eth1 iface eth1 inet static address 192.168.1.5 network 192.168.1.0 netmask 255.255.255.0 broadcast 192.168.1.255
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: help.ubuntu.com/community/Router 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.
- Join Date
- Apr 2011
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,