Koozali.org: home of the SME Server

Proxy port through vpn connection

Offline JoshuaR

  • ***
  • 125
  • +0/-0
    • Tech-Eze
Proxy port through vpn connection
« on: May 27, 2009, 02:59:07 AM »
Hi,
I was looking at this post:  http://forums.contribs.org/index.php/topic,43974.msg210590.html#msg210590
And I'd like to do pretty much the same thing.
eg, VPN to my SME server and pass traffic from certain source ports on my remote machine over the vpn connection and out. However, I'm not sure where to start. So (as always) any help would be appreciated!  :grin:

Thanks,
Josh
Life's tragedy is that we get old too soon, and wise too late...

Offline JoshuaR

  • ***
  • 125
  • +0/-0
    • Tech-Eze
Re: Proxy port through vpn connection
« Reply #1 on: June 03, 2009, 01:44:00 PM »
anyone?
Life's tragedy is that we get old too soon, and wise too late...

Offline mmccarn

  • *
  • 2,647
  • +10/-0
Re: Proxy port through vpn connection
« Reply #2 on: June 03, 2009, 02:26:44 PM »
The Windows PPTP client uses the VPN server as the default gateway by default.

Thus, if:
* you haven't changed the default value of "use default gateway on remote network" in your VPN connection settings
* you can still browse the internet after establishing your VPN connection

then:
you *are* browsing "through" your SME server (browse to "http://whatismyipaddress.com" to verify).

Or, if you're just trying to browse, the instructions in the link you referenced will work.

Otherwise (if you're not using a Windows client, or you want to do more than browse) it would help if you share some more details with us about what you're trying to accomplish.


Offline JoshuaR

  • ***
  • 125
  • +0/-0
    • Tech-Eze
Re: Proxy port through vpn connection
« Reply #3 on: June 08, 2009, 07:39:22 AM »
Hi mmcarn,
I've had to uncheck that option in the vpn connection to use the default gateway on the remote network, as my vpn connection would constanly disconnect when it was checked.

The main thing is I wanted to understand what was happening in that post:
Quote
my putty is setup like this
ssh -> tunnels
     L80 <home address>:80
     L443 <home address>:443

and in firefox i set proxy manually and under the socks area i put localhost and 80
It's a noob question, but how is putty being set up to pass the traffic?

Thanks,
Josh
Life's tragedy is that we get old too soon, and wise too late...

Offline mmccarn

  • *
  • 2,647
  • +10/-0
Re: Proxy port through vpn connection
« Reply #4 on: June 08, 2009, 04:30:39 PM »
If all you need to do is browse the internet using your SME as a proxy, then the answer was in http://forums.contribs.org/index.php/topic,43974.msg210590.html#msg210590: you don't want to tunnel ports 80 and 443, you only want to tunnel port 3128.

I do this by:
1) downloading putty.exe into c:\windows, so that I can run it using "Start", "Run"
2) click "Start", "Run" putty my.home.sme -L 3128:127.0.0.1:3128 -l root
3) Configure my browser to use localhost:3128 as a proxy server.

You can find several "howtos" for setting up Putty tunnels using the putty GUI by searching Google for 'putty tunnels' or 'ssh tunnels putty' or 'putty tunnel proxy'
« Last Edit: June 08, 2009, 04:34:42 PM by mmccarn »

Offline JoshuaR

  • ***
  • 125
  • +0/-0
    • Tech-Eze
Re: Proxy port through vpn connection
« Reply #5 on: June 09, 2009, 01:26:53 AM »
Thanks for the reply mmccarn,
to run that putty command, do you have a vpn tunnel set up, or so you have to enable ssh from remote networks in SME?
Life's tragedy is that we get old too soon, and wise too late...

Offline mmccarn

  • *
  • 2,647
  • +10/-0
Re: Proxy port through vpn connection
« Reply #6 on: June 09, 2009, 01:38:48 PM »
Putty/ssh tunnels do not depend on or require a VPN connection.

If you want to use a VPN instead of using a putty tunnel, just set up your browser to use port 3128 and the LOCAL ip of your SME as the proxy server (this should work but I haven't tested it).

Offline JoshuaR

  • ***
  • 125
  • +0/-0
    • Tech-Eze
Re: Proxy port through vpn connection
« Reply #7 on: June 10, 2009, 02:33:10 AM »
Thanks mmccarn, I'll give that a go.
Life's tragedy is that we get old too soon, and wise too late...