[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Routing which depends on source address?



ip rule add from 192.168.1.11 table 10
ip route add default via xxx.xxx.xxx.xxx table 10

ip rule add from 192.168.1.12 table 11
ip route add default via xxx.xxx.xxx.xxx table 11

pretty easy really.  The ip command is in the iproute2 package.


Markus Garscha wrote:
> 
> hi!
> 
> I've the following problem:
> 
> i have a private network with lets say two workstations an one router
> ws1 : 192.168.1.11
> ws2 : 192.168.1.12
> gw  : 192.168.1.1
> 
> the gw is running debian. the goal is to use two different dialups depending
> on the source address, e.g use default route over ppp0 device when data
> comes from 192.168.1.11 and use default route over ppp0 device when data
> comes from 192.168.1.12.
> 
> i heard that iptables can do this, examples?
> 
> any further sugestions?
> 
> cu
> markus
> 
> --
> -------------------------------------------------------------------------------
>  Markus Garscha                        email: mg@gama.de
>  Hartmannstr. 129                        fon: 09131/626715
>  91058 Erlangen                          fax: +49 89 244356966
>                                    pgp-keyid: 0xEE18AF3B
> -------------------------------------------------------------------------------
> 
>   ----------------------------------------------------------------------
>    Part 1.2Type: application/pgp-signature

-- 
Regards,
Robert Davidson.
http://www.mlug.org.au/



Reply to: