LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Ubuntu Server route issues? (https://www.linuxquestions.org/questions/linux-server-73/ubuntu-server-route-issues-773086/)

rubberducky 12-02-2009 09:12 PM

Ubuntu Server route issues?
 
I'm setting up a gateway/firewall, something I've done a thousand times before, this time using Ubuntu Server 9.10. When I have just one interface active (eth0), I can surf the internet easily. However, when I enable eth1 in /etc/network/interfaces, suddenly I cant access the internet either from the server, or any computers behind it.

before I enable eth1:

thinkbig@rubberducky:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.1.1 0.0.0.0 UG 100 0 0 eth0

after:

thinkbig@rubberducky:~$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
default 192.168.0.1 0.0.0.0 UG 100 0 0 eth1
default 192.168.1.1 0.0.0.0 UG 100 0 0 eth0

also, a copy of my /etc/network/interfaces file

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1

auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
gateway 192.168.0.1

Any help would be awesome. :)

rkski 12-02-2009 11:02 PM

Hi
The 2 default gateways are the problem.

Remove this line:
Quote:

default 192.168.0.1 0.0.0.0 UG 100 0 0 eth1
Is port forwarding and masquerading set up so machine acts as firewall.

How is the internet connection/router set up?

rubberducky 12-02-2009 11:49 PM

Thanks for the reply :)

How do I remove that line?

It is, I'm running Shorewall, which is configured with the two-interfaces setup.

My network is: Local - Ubuntu box - Modem.

Thanks!

rkski 12-03-2009 03:43 PM

Code:

route del default gw 192.168.0.1

rubberducky 12-04-2009 01:27 PM

Worked like a charm. Thanks!


All times are GMT -5. The time now is 10:17 PM.