I have two network interfaces.
One wired (eth0) which is filtered by proxy.
One is wireless (wlan0) which is free.
I need to route specific URLs via the wireless interface to avoid the proxy.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
Add a route with a lower cost (e.g. lower hop-count or other appropriate metric)
route add -host 22.214.171.124 dev wlan0 metric 1 (untested)
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:
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.