Wrap a PPTP/L2TP/OpenVPN VPN server that forwards everything through an SSH Tunnel

3

0

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?

the979kid

Posted 2011-11-29T11:34:47.197

Reputation: 131

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 – 2011-11-29T12:43:28.070

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 – 2011-11-29T12:52:02.290

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 – 2011-11-29T12:53:43.940

1Actually 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 – 2011-11-29T15:19:24.873

1@flow: Putting a bounty on someone else's question is confusing. Please detail your configuration: The devices involved and their operating systems. – harrymc – 2013-04-27T15:05:08.473

No answers