Simple (?) routing question

Simple (?) routing question

Secure Home | Search | About
 Networking Firewalls    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content add this group's latest topics to your Google content
Subject Author Date
Simple (?) routing question Dario 11-23-2004
Posted by Dario on November 23, 2004, 12:36 am
If you were  Registered and logged in, you could reply and use other advanced thread options
Hi Community,
I setup a Debian Gnu/Linux box as a firewall with a public IP address
on the eth0 and a private IP address on the eth1 just for local
access/administration: 10.0.0.1/8.
I tried to access the box remotely on the eth0 (public IP) with a not
'natted' private address 10.174.190.0/24 from our NOC network (and
keep staying inside of our AS). IPTables rules were ok, but since the
box had an interface (eth1) directely connected with ip address
10.0.0.1/8, it tried to respond with the eth1 to traffic coming in on
the eth0 as 10.174.190.0.
I believed that the default 'public' route was a more important
information, but that's not the case.
Is this a general/elementary routing issue, or is the Gnu/Linux box
that behaves this way?

Thanks a lot in advance for you comments


Dario


Posted by Mike Jagdis on November 23, 2004, 1:51 pm
If you were  Registered and logged in, you could reply and use other advanced thread options
Dario wrote:

> Hi Community,
> I setup a Debian Gnu/Linux box as a firewall with a public IP address
> on the eth0 and a private IP address on the eth1 just for local
> access/administration: 10.0.0.1/8.
> I tried to access the box remotely on the eth0 (public IP) with a not
> 'natted' private address 10.174.190.0/24 from our NOC network (and
> keep staying inside of our AS). IPTables rules were ok, but since the
> box had an interface (eth1) directely connected with ip address
> 10.0.0.1/8, it tried to respond with the eth1 to traffic coming in on
> the eth0 as 10.174.190.0.
> I believed that the default 'public' route was a more important
> information, but that's not the case.
> Is this a general/elementary routing issue, or is the Gnu/Linux box
> that behaves this way?
>
> Thanks a lot in advance for you comments
>
>
> Dario

That's correct. Routing prefers the longest match. If 10/8 is
routed to eth1 then that is where it goes - not via the 0/0
(aka default) rule to eth0. That's kinda fundamental to IP...

If you _want_ 10.174.90.0 on the public side (cable/ADSL/WiFi
router?) you either need to add a more specific route to eth0
(e.g. "iproute add 10.174/16 dev eth0") or use a subnet on
eth1 that doesn't include the 10.174.90.0 space you need
(e.g. 10.0/16)

Mike

--
Mike Jagdis Web: http://www.eris-associates.co.uk
Eris Associates Limited Tel: +44 7780 608 368
Reading, England Fax: +44 118 926 6974


Similar ThreadsPosted
Routing question.. October 25, 2005, 2:00 pm
TCP Routing/IPTABLES question. February 23, 2005, 10:00 am
netscreen 25 routing question May 11, 2005, 6:00 pm
routing between vpn sites question August 13, 2007, 1:24 pm
probably a simple pinhole / deployment question... April 27, 2006, 12:08 pm
routing March 1, 2005, 7:38 pm
VPN and routing between branches July 21, 2005, 10:59 am
Routing on Netscreen 5XP July 29, 2005, 11:57 am
Checkpoint routing May 17, 2006, 11:28 am
Netscreen 25 DMZ Routing August 25, 2007, 1:38 pm

The site map in XML format XML site map

Contact Us | Privacy Policy