# How can I choose the interface of webbrowser using?

## leiking

the eth0 and wlan0 is all good.

I want chrome uses wlan0. How can I do that? 

thanks

NOT USING 

```

ifconfig eth0 down

```

----------

## Mad Merlin

Chrome will (actually, the kernel will on behalf of Chrome) consult your routing tables and pick the interface with the first applicable route, which is probably the default route. You can't really say "Chrome, use wlan0" and "Firefox, use eth0" without getting into some crazy iptables packet mangling.

If what you want is your default route to be wlan0 when both eth0 and wlan0 are up, there's a number of ways to do that, but the easiest way is to make sure that you have only 1 default route and it's through the correct interface for the time.

----------

## leiking

 *Mad Merlin wrote:*   

> Chrome will (actually, the kernel will on behalf of Chrome) consult your routing tables and pick the interface with the first applicable route, which is probably the default route. You can't really say "Chrome, use wlan0" and "Firefox, use eth0" without getting into some crazy iptables packet mangling.
> 
> If what you want is your default route to be wlan0 when both eth0 and wlan0 are up, there's a number of ways to do that, but the easiest way is to make sure that you have only 1 default route and it's through the correct interface for the time.

 

Can your highness give some detail info or links ?

I only know use `ifconfig eth0 down` .... 

Thanks alot

----------

## Mad Merlin

 *leiking wrote:*   

>  *Mad Merlin wrote:*   Chrome will (actually, the kernel will on behalf of Chrome) consult your routing tables and pick the interface with the first applicable route, which is probably the default route. You can't really say "Chrome, use wlan0" and "Firefox, use eth0" without getting into some crazy iptables packet mangling.
> 
> If what you want is your default route to be wlan0 when both eth0 and wlan0 are up, there's a number of ways to do that, but the easiest way is to make sure that you have only 1 default route and it's through the correct interface for the time. 
> 
> Can your highness give some detail info or links ?
> ...

 

Not without knowing what exactly it is you want. Do you want application specific routing, or do you want a specific order to use interfaces in?

----------

## leiking

 *Mad Merlin wrote:*   

>  *leiking wrote:*    *Mad Merlin wrote:*   Chrome will (actually, the kernel will on behalf of Chrome) consult your routing tables and pick the interface with the first applicable route, which is probably the default route. You can't really say "Chrome, use wlan0" and "Firefox, use eth0" without getting into some crazy iptables packet mangling.
> 
> If what you want is your default route to be wlan0 when both eth0 and wlan0 are up, there's a number of ways to do that, but the easiest way is to make sure that you have only 1 default route and it's through the correct interface for the time. 
> 
> Can your highness give some detail info or links ?
> ...

 

I want all the programs use the interface I chose .

```you want a specific order to use interfaces in``` --- Yes.

----------

## Mistwolf

So, you want something like Network Manager (http://en.wikipedia.org/wiki/NetworkManager)?

----------

## leiking

 *Mistwolf wrote:*   

> So, you want something like Network Manager (http://en.wikipedia.org/wiki/NetworkManager)?

 

Can your mastery suggest a tool using command line ??? thanks.

----------

