Results 1 to 4 of 4

Thread: Use custom interface to connect to some IPs.

  1. #1
    Join Date
    Oct 2013
    Beans
    5

    Use custom interface to connect to some IPs.

    I have two interfaces: wlan0 and eth0 connected to a different networks. I would like to use one interface (eth0) to work as a default most of the time (it is used all of the time right now) and sometimes (to some IPs, some webpages, and mostly to irc channels) I want to use the other interface wlan0.

    How can I achieve it? Is it possible? I was looking for a setting in irssi, which iface to use, but I have found nothing.

  2. #2
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,520

    Re: Use custom interface to connect to some IPs.

    You can use the route command to map specific IP addresses to an interface.
    All applications that contact that IP address will use the specified interface. No exceptions.

    Since systems can have any kind of interfaces, and since routing packets across interfaces is a system-level task, applications generally won't have an interface setting.

  3. #3
    Join Date
    Oct 2013
    Beans
    5

    Re: Use custom interface to connect to some IPs.

    route works great, I wasn't aware of this command. It works with webpages etc. But it doesn't work with IRC.
    With IRC servers like freenode unfortunately it doesn't work.

  4. #4
    Join Date
    Jul 2013
    Location
    Wisconsin
    Beans
    4,520

    Re: Use custom interface to connect to some IPs.

    The route command does indeed work with IRC.
    Perhaps your IRC client is connecting to a different server than you expect.
    Freenode, for example, uses a globally-distributed network of servers. When your IRC client connects to chat.freenode.net, it can connect to any of those servers (looking right now, I see 12 online). You either must define a route for all of those servers, or you must specify the server to connect to (like cameron.freenode.net).
    Last edited by ian-weisser; December 31st, 2013 at 05:48 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •