vpn conection to raspberry over pppd
cl at isbd.net
Mon Dec 8 14:59:53 UTC 2014
On Mon, Dec 08, 2014 at 02:57:36PM +0100, robert rottermann wrote:
> Thanks Karl
> On 07.12.2014 22:25, Karl Auer wrote:
> >On Sun, 2014-12-07 at 21:56 +0100, robert rottermann wrote:
> >>Now I would like to set up a vpn between my ubuntu box and the remote
> >>raspberry of which I do not know the io addres.
> >Does your Ubuntu box have a public address? In that case simply have the
> >Raspberry "phone home".
> this is in deed what I would like to do.
> However, I would like to have a remote shell running on my home
> computer, so I can work on the raspberry.
> As the rasperry does not have a valid ip (it is behind NAT) I look
> for a way that the raspy initiates the connection.
> But the shell should run localy.
I do this from a BeagleBone Black (similar in many ways to a Pi).
What you need is ssh reverse tunnelling, a google search will bring up
lots of hits on how to do it.
In principle you automate an ssh connection from the Pi to somewhere
(that you have shell access) but instead of using this for an
interactive session initiated from the Pi you 'piggyback' a connection
in the other direction *to* the Pi.
On the Pi you will run something like:-
ssh -R 50022:localhost:22 -N <user>@<someserver>.co.uk
Then, when you are logged in as <user> on <someserver>.co.uk you can:-
ssh -p 50022 localhost
... and you will connect to the remote Pi.
More information about the ubuntu-users