All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] problem in routing
@ 2002-11-12 15:13 Nuno Miguel Pais Fernandes
  2002-11-12 15:51 ` Martin A. Brown
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Nuno Miguel Pais Fernandes @ 2002-11-12 15:13 UTC (permalink / raw)
  To: lartc

[-- Attachment #1: Type: text/plain, Size: 1484 bytes --]

Hello

I'm implementing Advanced Routing in my redhat linux pc like this:

                                ------------------------
                          ------| provider1 (with dhcp)
-------------             |     ------------------------
HOME NETWORK|--Linux1--ROUTER
-------------             |     ------------------------
                          ------| provider2 (fixed ip) |
                                ------------------------

My home network has private ips like 10.10.1.0/24 and linux1 is SNATing
all accesses to a public ip like 198.198.198.198 and marking packets
like

iptables -t mangle -A POSTROUTING -d SOME.IP.IN.INTERNET -j MARK
--set-mark 21

In my ROUTER i want to redirect packets according to MARK and i'm doing:

root@euroter(~)# more /etc/iproute2/rt_tables 
255	local
254	main
253	default

200	over
root@euroter(~)# ip route ls table over
default via XXX.XXX.XXX.XXX dev eth1

where XXX.XXX.XXX.XXX is the gateway of the provider 1.


Doing ip rule ls, i can see that all packets with mark 21 go to table
over.
root@euroter(~)# ip rule ls 
0:	from all lookup local 
32765:	from all fwmark       21 lookup over 
32766:	from all lookup main 
32767:	from all lookup default 

And table over only has default gw, but when i do a
ping XXX.XXX.XXX.XXX it goes throw proveider2 and not provider1.




Thanks for everything
Nuno Fernandes

-- 
Nuno Miguel Pais Fernandes <npf@eurotux.com>
Eurotux S.A.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-11-12 17:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-12 15:13 [LARTC] problem in routing Nuno Miguel Pais Fernandes
2002-11-12 15:51 ` Martin A. Brown
2002-11-12 16:13 ` Nuno Miguel Pais Fernandes
2002-11-12 16:19 ` Martin A. Brown
2002-11-12 17:53 ` Nuno Miguel Pais Fernandes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.