| Author |
Message |
cattani
Joined: 01 Jan 2008
Posts: 34
|
| Posted: Sun Aug 28, 2011 4:24 am Post subject: NAT with OpenVpn instead of using Squid, Client Setup? |
|
|
Hello!
If I set up iptables to NAT my Vpn traffic throug the linode, how do i manage to point my browser to send traffic through the vpn? - I know, I could use "redirect-gateway" in Openvpn, but that would redirect all my traffic and I only want traffic from i.e. Firefox to be nat-ed. I imagine setting up a local proxy (Windows-machine) would be a possibility, but I have no concrete idea?
Could someone point me to to some tutorial or else about that?
Thanks! |
|
| Back to top |
|
Internat
Joined: 17 Aug 2004
Posts: 254
Location: Brisbane, Australia
|
| Posted: Sun Aug 28, 2011 5:37 am Post subject: |
|
|
if all you want to do is subject your firefox traffic through your linode, you dont need to worry about a vpn.
A simple proxy server will do your needs. |
|
| Back to top |
|
chesty
Joined: 19 Feb 2008
Posts: 52
|
| Posted: Sun Aug 28, 2011 5:38 am Post subject: |
|
|
you could use ssh socks proxy, or a tiny non caching proxy on your linode, it doesn't have to be squid.
I would use the socks proxy with firefox configured to use socks to proxy the dns, too. |
|
| Back to top |
|
cattani
Joined: 01 Jan 2008
Posts: 34
|
| Posted: Sun Aug 28, 2011 5:43 am Post subject: |
|
|
| @chesty: ssh-socks is a good idea. which proxy servers do you mean, i only know squid, thx! |
|
| Back to top |
|
otherbbs
Joined: 30 Oct 2005
Posts: 97
Location: 37.274,-97.393 (KEGT)
|
| Posted: Sun Aug 28, 2011 7:08 pm Post subject: |
|
|
Take a look at tinyproxy.
--
Travis |
|
| Back to top |
|
Guspaz
Joined: 26 May 2009
Posts: 1150
Location: Montreal, QC
|
| Posted: Mon Aug 29, 2011 10:01 am Post subject: |
|
|
If your OpenVPN server is set to forward traffic, then simply connecting with the OpenVPN client should automatically forward all traffic through the VPN.
If you'd like a trivial-to-set-up VPN solution, the OpenVPN guys make "OpenVPN Access Server". It's semi-commercial, but does come with 2 free simultaneous logins (extra logins cost $5 each, one-time fee). Deploying it is pretty simple (no configuration on your end), so you basically just need to install it and create some user accounts and you're golden. I'd recommend switching from the default TCP+UDP mode to UDP-only, though. |
|
| Back to top |
|
chesty
Joined: 19 Feb 2008
Posts: 52
|
| Posted: Mon Aug 29, 2011 10:27 am Post subject: |
|
|
cattani wrote: @chesty: ssh-socks is a good idea. which proxy servers do you mean, i only know squid, thx!
If you use ssh socks proxy, you don't need any other proxy. You don't really need the vpn, but either way works. On windows putty is the go for ssh socks proxy, if you google putty socks proxy you should get tutorials. |
|
| Back to top |
|
cattani
Joined: 01 Jan 2008
Posts: 34
|
| Posted: Mon Aug 29, 2011 11:30 am Post subject: |
|
|
ok, thanks, I tested ssh-proxy and vpn+squid - both have dismal speed, maybe its because i am over the ocean, cant get over 150kb/sek, but thats another story
gtz |
|
| Back to top |
|
iml
Joined: 10 Dec 2010
Posts: 57
|
| Posted: Mon Aug 29, 2011 2:17 pm Post subject: |
|
|
| Squid proxy is for caching stuff, so just connect to the VPN server. I doubt that has anything to do with your bandwidth, however. |
|
| Back to top |
|
hoopycat
Joined: 30 Aug 2008
Posts: 1294
Location: Rochester, New York
|
| Posted: Mon Aug 29, 2011 3:33 pm Post subject: |
|
|
Encrypting your traffic and tunneling it to another server usually does not improve performance. It can make it much worse, especially when the server is far away.
(That said, a hotel I stayed at in California only rate-limited TCP traffic on the "free 512 kb/sec wireless." OpenVPN uses UDP by default. Pretty sure the hotel had a T1, and I'm pretty sure I was saturating it accidentally.) |
|
| Back to top |
|
cattani
Joined: 01 Jan 2008
Posts: 34
|
| Posted: Tue Aug 30, 2011 1:46 am Post subject: |
|
|
| thx all, maybe its the long distance+tunneling which slows down everything, scp gives me ca 300kb/sek, half for http over ssh proxy or vpn+squid. |
|
| Back to top |
|
Guspaz
Joined: 26 May 2009
Posts: 1150
Location: Montreal, QC
|
| Posted: Tue Aug 30, 2011 9:28 am Post subject: |
|
|
| SSH tunneling is TCP-over-TCP, so unless I'm mistaken, even the smallest packetloss or jitter is going to cause two layers of TCP to fight eachother. Congestion control on top of congestion control... |
|
| Back to top |
|
cattani
Joined: 01 Jan 2008
Posts: 34
|
| Posted: Sat Oct 01, 2011 3:57 am Post subject: |
|
|
| @guspaz: Thanks for your input, that is the solution! I changed openvpn to UDP and voila: near line speed of my internet connection - amazing! |
|
| Back to top |
|
| |