Using say: ssh -D8080 user@remoteserver.com

to create an SSH tunnel to a remote server and use it as a SOCKS proxy, etc.,

how would one go about to wrap it into a VPN server (PPTP, L2TP or OpenVPN), if possible, in order to have devices that do not support tunneling but support VPN (like the iPad or DD-WRT routers) be able to log in to the VPN which will then transparently funnel everything through the SSH tunnel?

  • I can't quite figure out what you are intending here. You want one device to ssh to a remote server to establish the tunnel, but then accept VPN connections to itself for other devices? – Paul Nov 29 '11 at 12:43
  • That's right, and then to funnel all packets from devices connected to it by VPN to the ssh tunnel. I think one way of doing this besides setting up a VPN around the tunnel is to use iptables on a router that forwards everything to the ssh tunnel. Not an expert in this by any means though, just guessing. – the979kid Nov 29 '11 at 12:52
  • But the ssh tunnel as described is still a socks proxy, are all the devices internal and you are just trying to get them to the point where the tunnel is? They would still need to have a proxy defined. – Paul Nov 29 '11 at 12:53
  • 1
    Actually I'm trying to get them to use the tunnel. So for instance, when using Safari on my iPhone it'll access the web through the SOCKS proxy/ssh tunnel setup on my Mac. Is this possible? – the979kid Nov 29 '11 at 15:19
  • 1
    @flow: Putting a bounty on someone else's question is confusing. Please detail your configuration: The devices involved and their operating systems. – harrymc Apr 27 '13 at 15:05

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.