[Chester LUG] Routing a specific IP through a non-default interface

Les Pritchard les.pritchard at gmail.com
Thu Mar 6 16:16:35 UTC 2014


Have you tried just doing something like this?

route add -net 222.222.222.222 netmask 255.255.255.255 gw 1.1.1.1
If you're going for a whole range of IPs via there, you'd just need to
alter the subnet mask

If that works then you'll just need to add it to your interfaces file
prefixing it with 'post-up'


On 6 March 2014 16:12, Ben Arnold <BenArnold at fsfe.org> wrote:

> Afternoon Les,
>
>
> On 6 March 2014 15:35, you wrote:
>
>> Would the gateway of 1.1.1.1 only be available via your wlan? If you
>> added a static route for the destination IP as going via 1.1.1.1 that it
>> should take that route when your wifi is connected. The only issue is that
>> when you don't have your wifi connected it may route to your destination IP
>> via the eth, would that be an issue?
>>
>
> Yes, 1.1.1.1 is only available through the wlan0.
>
> I should probably mention that the first command fails; "No such process"
> it complains when adding a second gateway and specifying an interface,
> which I believe is because the "via 1.1.1.1" doesn't know *how* to go via
> that IP.
>
>
> Cheers,
> Ben
>
> --
> *Ben Arnold*
> *Liverpool, UK*
>
> *Free Software Foundation (Europe)*
> *e: benarnold at fsfe.org <http://fsfe.org>  |  **ben at
> seawolfsanctuary.com <http://seawolfsanctuary.com>*
> *w: seawolfsanctuary.com <http://seawolfsanctuary.com>  |  chat: benarnold
> at jabber.fsfe.org <http://jabber.fsfe.org>*
>
> _______________________________________________
> Chester mailing list
> Chester at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/chester
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/chester/attachments/20140306/a77d7ef2/attachment.html>


More information about the Chester mailing list