I have a VPN which I want to route traffic for specific websites through. I know how to do it I just don't know which utilities to use and how to configure.

The proposed solution:

Firefox -> Foxyproxy (filtering on regex) -> HTTP proxy configured to send data to ppp0 -> VPN interface (ppp0).

I have Foxyproxy set up to use the HTTP proxy when it matches a pattern. The bit where I am stuck is getting a HTTP proxy that will send request out on a specific interface. I have tried 'tinyproxy' but it does not seem to take notice of the 'bind 192.168.100.170' which is the IP address of my ppp0 VPN interface.

Can someone suggest a HTTP proxy that will allow this on Linux.

link|improve this question
feedback

3 Answers

Squid will allow you to do this with the tcp_outgoing_address directive

Of course squid is not really small footprint and can be daunting to configure, but the default config should be more then adequate for most uses.

link|improve this answer
Ok, sounds good, however at the moment each time I start the VPN tunnel it has a different IP address. Hence the desire to forward to an interface rather than an IP address. Is it possible to get the VPN tunnel to always have the same IP? – JRT Sep 18 '09 at 15:52
feedback

I don't know if it would be suitable to you, but here's how I set up a http proxy for myself:

I'm assuming you use Linux on your desktop and also on remote server.

  1. Setup key-based (passwordless) authentication with the server. This way ssh should not ask for passowrd when you connect to the server.
  2. Get autossh (it will ensure stable tunnel).
  3. Setup a socks5 proxy:

    autossh -M [port used to monitor connection] -D [local port used for forwarding] -nN -l [username] [server]

Example:

autossh -M 55777 -D 3333 -nN -l minder my.secret.server.net

Now go to FoxyProxy settings and configure it to use localhost:3333 as your proxy server. Voila! You can also use -D option to setup port-forwarding through the tunnel.

Works perfectly on my machine.

link|improve this answer
feedback

The squid recommendation is best, because what you need is a program that allows setting the outbound interface usage.

Absent that, if you have another HTTP/web proxy server available at the other end of the PPP connection, set up your proxy to forward all requests that that proxy-on-VPN server. That will cause all the connections to open across the PPP interface.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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