I'd like to submit a different approach ( but just to show how this could work with board tools)
First of all I'd like to walk my way threw an NAT ( because maybe I can't set port forwadings or something like that
Second, I would really like to know the global IP of my pi
and Third I wanna connect to the pi via ssh and have some fun there
First I want to make my way threw the NAT on Port 30000 (this is outgoing Port)
On the Pi:
Code: Select all
ssh -R remote-server:30000:localhost:22 remote-server-user@remote-server
The global IP thing.... yes we should take care of that too
Let us do this the easy way and find the IP by just asking
This will return your global IP address --> in my case I will write that into a variable to inform my remote server where I can be found
On the Pi:
And now we could make the Pi send us his global IP every view minutes....or something else.
And to not make us search for to long we set the User agent string to "This is your Pi"
On the Pi:
Code: Select all
curl http://mywebserver.com/?$global_ip -A "This is your Pi"
We could also push several data to an FTP Server or send the data with a Post to our Server (depends on what you want to tell about the network your pi is in)
And finally we can connect threw our remote Server back to your pi right way threw the NAT without doing anything
On your remote Server:
Code: Select all
ssh -p3000 pi_user@global_ip_which_pi_sent_you
I agree that this is not as comfortable as dyndns or another update Service, but on the other hand you can do all that with board tools on your pi.
Hope you enjoy
Stephan