From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nuno Miguel Pais Fernandes Date: Tue, 12 Nov 2002 15:13:27 +0000 Subject: [LARTC] problem in routing MIME-Version: 1 Content-Type: multipart/mixed; boundary="=-OrTfAQ/YG9qBZXg5VkWv" Message-Id: List-Id: To: lartc@vger.kernel.org --=-OrTfAQ/YG9qBZXg5VkWv Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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=20 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=20 0: from all lookup local=20 32765: from all fwmark 21 lookup over=20 32766: from all lookup main=20 32767: from all lookup default=20 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 --=20 Nuno Miguel Pais Fernandes Eurotux S.A. --=-OrTfAQ/YG9qBZXg5VkWv Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQA90RqWbJtoPy2XRQkRAgFqAKCj/r6gO2O6A7/u8bO/Wz+lzB6p0ACfa8EE 6GUCcyJF6n8GuJPrFnMqb/A= =uXoA -----END PGP SIGNATURE----- --=-OrTfAQ/YG9qBZXg5VkWv-- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/