Gentoo Archives: gentoo-user

From: Kevin Brandstatter <kjbrandstatter@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] {OT} A simple routing problem
Date: Tue, 18 Dec 2012 18:11:30
Message-Id: 50D0B174.90705@gmail.com
In Reply to: Re: [gentoo-user] {OT} A simple routing problem by Nilesh Govindrajan
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 On 12/18/2012 09:38 AM, Nilesh Govindrajan wrote:
5 > On Tuesday 18 December 2012 10:59:41 PM IST, Kevin Brandstatter
6 > wrote: On 12/18/2012 09:14 AM, Nilesh Govindrajan wrote:
7 >>>> On Tuesday 18 December 2012 10:39:43 PM IST, Kevin
8 >>>> Brandstatter wrote: On 12/18/2012 05:27 AM, Nilesh
9 >>>> Govindrajan wrote:
10 >>>>>>> On Tuesday 18 December 2012 03:41:44 PM IST, J.
11 >>>>>>> Roeleveld wrote:
12 >>>>>>>> On Tue, December 18, 2012 04:44, Nilesh Govindrajan
13 >>>>>>>> wrote:
14 >>>>>>>>
15 >>>>>>>> <SNIP>
16 >>>>>>>>
17 >>>>>>>>> Actually my fiber connection has a smaller limit
18 >>>>>>>>> than the ADSL connection. I am trying to use the
19 >>>>>>>>> fiber connection for all activities except some
20 >>>>>>>>> torrent downloading for which I want to use my ADSL
21 >>>>>>>>> connection. Once I'm able to route through the ADSL
22 >>>>>>>>> gateway, it would be easy for me to setup another
23 >>>>>>>>> ip on eth0 on my machine on which transmission
24 >>>>>>>>> could listen. All traffic on that ip would be
25 >>>>>>>>> routed through ADSL and otherwise the fiber.
26 >>>>>>>>
27 >>>>>>>> Nilesh,
28 >>>>>>>>
29 >>>>>>>> I read that you managed to fix it, but for
30 >>>>>>>> completenes and, if applicable, a different solution
31 >>>>>>>> would be a router with 2 or more WAN-ports that can
32 >>>>>>>> do the routing for you. Added benefit there would be
33 >>>>>>>> that if the fiber connection dies, it would be able
34 >>>>>>>> to automatically route everything through the ADSL.
35 >>>>>>>>
36 >>>>>>>> -- Joost
37 >>>>>>>>
38 >>>>>>>>
39 >>>>>>>
40 >>>>>>> Yeah that solution is always there, but I'm not going
41 >>>>>>> for that since I'm evaluating the fiber connection (a
42 >>>>>>> new ISP in my locality). Won't need the ADSL may be
43 >>>>>>> after a month or so when I'll have unlimited plan on
44 >>>>>>> fiber.
45 >>>>>>>
46 >>>>>>> @Pandu, or may be the DSL ISP was down yesterday when I
47 >>>>>>> was trying.
48 >>>>>>>
49 >>>>>>> The problem is not exactly fixed yet, although I'm able
50 >>>>>>> to add static routes on the DDWRT router using route
51 >>>>>>> command (and it is working), there's no way to route
52 >>>>>>> all traffic from a source via the other router. It
53 >>>>>>> doesn't have iptables ROUTE target neither iproute2
54 >>>>>>> support.. is there some other method do to this using
55 >>>>>>> iptables?
56 >>>>>>>
57 >>>>>>> The whole problem would be solved if I could add routes
58 >>>>>>> on my local machine, but that doesn't seem to work. It
59 >>>>>>> always goes via fiber which is the default route.
60 >>>>>>>
61 >>>>>>> The final solution to this problem would be putting in
62 >>>>>>> a Linux machine there. I'm trying to build Gentoo for
63 >>>>>>> the Raspberry Pi which can be used for this task, but
64 >>>>>>> stuck at Python since it won't cross compile. Anyway
65 >>>>>>> that's another topic.
66 >>>>>>>
67 >>>>>>> -- Nilesh Govindarajan http://nileshgr.com
68 >>>>>>>
69 >>>> you actually can add routes on a local machine. the real
70 >>>> trick would be to have them pushed from the dd-wrt box so
71 >>>> that they dont have to be manually set each time
72 >>>>
73 >>>> -Kevin
74 >>>>>
75 >>>>
76 >>>> How??
77 >>>>
78 >>>> -- Nilesh Govindarajan http://nileshgr.com
79 >>>>
80 >
81 > with the route add command. obviously not as clean as an iptables
82 > forward rule which is also an option
83 >>
84 >
85 > I'm presently ssh'ing into the DDWRT router and doing this:
86 >
87 > route add -host <hostname> gw 192.168.0.32
88 >
89 > and it's pretty much working, except that I've to add a route to
90 > every host for which I want to use the ADSL connection.
91 >
92 > If I do the same on my local machine, it doesn't work and packets
93 > still end up going through my fiber connection.
94 >
95 > Would iptables ROUTE target help if I use that on my local
96 > machine?
97 >
98 > -- Nilesh Govindarajan http://nileshgr.com
99 >
100 I think you want the forward chain, im not sure what tools dd-wrt and
101 iptables has for it as more of my experience is pf and pfsense, but
102 their should be a way to forward packets headed for certain ports or
103 networks to the ADSL gateway. just have the rule listen on the
104 internal interface and redirect certain traffic to the other gateway
105
106 - -Kevin
107 -----BEGIN PGP SIGNATURE-----
108 Version: GnuPG v1.4.11 (GNU/Linux)
109 Comment: Using GnuPG with undefined - http://www.enigmail.net/
110
111 iQEcBAEBAgAGBQJQ0LFzAAoJEAwpfz/ORQZC5CcIALTqfU43j54PADVeQnjH2O+W
112 T8hzYT7jpD6llBhm2ApTHiROlWJmTnKo2VksDDyRE7GMDmocqvU9CWR9XvrOD8lF
113 RMi+G2A6aTGqWPFNzmhrcbxxYEijsVtUehmkPTGqWqIdkFFy7qK0Mv/gU+nUjqzR
114 bKxozG9MqByowHBmbFYbXf+fBoWDDlkrm7j0HgOe808mBGRMuiCBaKSB5SDyBGze
115 lCVMsQ7GsZasys4cqhPqUbS/jmGxUvpIK4SBzcVGM3HpT3SowuRZhyeP3qbeFg/4
116 u6Mq9WwpLi1d89zKM65BSEsZJFwLWmoml112Wt+zLoOJidsXp7XovUDUYSLiu8A=
117 =oL1a
118 -----END PGP SIGNATURE-----

Replies

Subject Author
[gentoo-user] Re: {OT} A simple routing problem James <wireless@×××××××××××.com>