I have two network interface wired (eth0) which is filterd by proxy the other one is wireless (wlan0) which is free I need to make specific url's to wireless interface to avoid the proxy.

link|improve this question
feedback

2 Answers

Add a route with a lower cost (e.g. lower hop-count or other appropriate metric)

E.g. route add -host 1.2.3.4 dev eth1 metric 1 (untested)

link|improve this answer
feedback

I suppose that you want that all your request to lan goes to eth0, and all other requests (internet addresses) are for wlan0.

Everything depend on the configuration of your network. You need to know the ip of your lan gateway. You can obtain it with the following command:

route

You must play with your route table. My solution for the same problem (eth0/ppp0) is: 1. Delete default gateway:

route del default gw

2. Add a default gw that point to wlan0:

route add default gw youripwlan0

3. Add a route rule that send all lan requests to eth0:

route add -net 192.168.1.0 netmask 255.255.255.0 dev eth0

Where you must replace -net and netmask with values that fit your lan configuration. 4. Then add another gateway that is used for the requests done inside the lan:

route add -net 192.168.1.0 netmask 255.255.255.0  gw 192.168.1.1

Again -net netmask and gw must be changed according to your configuration. And maybe you want to edit the /etc/resolv.conf file to add a DNS server reachable from the wlan network.

link|improve this answer
A small hint: not my all lan . I need eth0 still the default but with some exceptions. – Ahmed Aswani Jan 10 at 12:34
what kind of exceptions? – Ivan Jan 10 at 12:43
some addresses are blocked I want to route them to the wlan – Ahmed Aswani Jan 10 at 12:45
You can do something similar, for example you can add ip based routes. My solution try to separate the internet addresses to the lan addressess. But if you want that only 2 or 3 sites be redirected to wlan, then get the ip of these sites, and simply modify my routes, probably you don't need the step 1 and 2 but you need step 3 and 4, replacing -net with -host – Ivan Jan 10 at 12:48
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.