Solved

Accessing raspberry of home from office

Posted on 2016-10-09
22
49 Views
Last Modified: 2016-11-05
Hi Experts,

I have configured a Raspberry Pi in my home.
I can send mail through that with an existing email id.
I created one script named as "build.sh" which collects some info and send those information to a mail id.

Now, my problem is, how to run that script "build.sh" from my office, as my raspberry is in my home.

Please suggest.

Regards,
Soumen
0
Comment
Question by:Soumen Roy
  • 9
  • 6
  • 4
  • +1
22 Comments
 
LVL 15

Expert Comment

by:cwstad2
Comment Utility
Hi you could use a vpn solution.

Pretty simple to configure

See website below which will guide you how to configure


http://readwrite.com/2014/04/10/raspberry-pi-vpn-tutorial-server-secure-web-browsing/
0
 

Author Comment

by:Soumen Roy
Comment Utility
Thanks @cwstad2:

It is an excellent link what just I need right now. But unfortunately the path is suggest under "Generating Keys" heading does not exists in RPi3. The following line causes error for that.

cp –r /usr/share/doc/openvpn/examples/easy-rsa/2.0 /etc/openvpn/easy-rsa

:-(, I am stuck here, at that point. Any suggestion?

Regards,
Soumen
0
 
LVL 15

Expert Comment

by:cwstad2
Comment Utility
hi can it must just be the path, is there an openvpn path?

also try

https://www.sitepoint.com/setting-up-a-home-vpn-using-your-raspberry-pi/
0
 
LVL 87

Accepted Solution

by:
rindi earned 250 total points
Comment Utility
Make sure you have installed SSH on the Rasberry. Then make sure you have forwarded port 22 to your Raspberry on your Router, and that you know the router's internet IP. The you should be able to use SSH on one of your Office Linux PC's to connect to the raspberry's terminal.
0
 

Author Comment

by:Soumen Roy
Comment Utility
Instead of Linux PC can I use my android or iPhone?

Regards,
Soumen
0
 
LVL 15

Expert Comment

by:cwstad2
Comment Utility
you can use putty to SSH from windows, will be easier thank phone

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

or search for telnet ssh client i the google store if you need to SSH from your phone
0
 
LVL 87

Expert Comment

by:rindi
Comment Utility
For Android there are many SSH clients in the Play Store. I'm sure you can also find many for iOS.
0
 
LVL 37

Expert Comment

by:Gerwin Jansen
Comment Utility
Instead of using port 22 - consider using a non-standard ssh port like 8922 or 18322 for example. This will save you a lot of 'tries' from the outside by other people.
0
 

Author Comment

by:Soumen Roy
Comment Utility
It is working when I am trying from same router, I mean when I am trying to access Pi from my mobile through ssh utility of Apple Store, those are working only when my Pi and iPhone both are connected with same router. But whenever I disconnect my phone wifi and trying to use my Vodafone or Airtel 4G connection, the ssh utility doesn't work.

Regards,
Soumen
0
 
LVL 37

Assisted Solution

by:Gerwin Jansen
Gerwin Jansen earned 250 total points
Comment Utility
As said above, you have to forward a port from WAN side on your modem/router to your Raspberry. This will enable you to access it from 'outside'. When using WiFi, you are still 'inside' your network, that's why it is working.

Check with a 'whats my ip' website to find your external ip address and then connect to that address using SSH to the port you've forwarded.
0
 

Author Comment

by:Soumen Roy
Comment Utility
Can you please explain to me what a cloud based server is and how it works?
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 87

Expert Comment

by:rindi
Comment Utility
What does that have to do with your problem? As we already told, you just forward the port to your Pi on your router.
0
 

Author Comment

by:Soumen Roy
Comment Utility
I have used port forwarding. I want some way for it to work such that no port forwarding is required. Using port forwarding, when I move my Pi to a new place or connect to to any other router, I would have to port forward that new router again. I want a way around that.

Weaved iot service was an option, but in case I want my product to be commercialized, weaved has terms that are not suitable for me. Looking up google, I found this thing called cloud based server, that can be setup to provide services like weaved by users.
0
 
LVL 87

Expert Comment

by:rindi
Comment Utility
Port forwarding is easy to setup for users. If you want to commercialize it, all you need to do is write a good manual that explains how to set it up for the users. A good manual is what makes a product stand out.

Cloud based stuff on the other hand makes it much more complicated and that is certainly not anything for something commercial.
0
 
LVL 37

Expert Comment

by:Gerwin Jansen
Comment Utility
>> I want a way around that.
There is no way around that because all standard routers contain firewalls to prevent anyone accessing your systems at home. Imagine you would connect your commercial product and tell your customers that they should disable the firewall in their router so they can use your product. You would not sell many products that way. So you have to describe how to make en exception on the firewall/router so your product can work or create some cloud service (like GotoMyPC or TeamViewer).
0
 

Author Comment

by:Soumen Roy
Comment Utility
That is exactly what I am talking about. Building something like a teamviewer or more like a ssh login app through a good android/windows ui from anywhere, that can have a user login and they can remote ssh into the raspberry pi at their home without having to port forward their routers. Or more specifically a raspberry pi that has a separate dongle attached to it, and as a result, a port forwarding option is not available.

I know this is going to be something big, but I could work on building something like that.
0
 

Author Comment

by:Soumen Roy
Comment Utility
At least I could start with an app with the mentioned capabilities that could work from the local VLAN.

Any suggestions please?
0
 
LVL 37

Expert Comment

by:Gerwin Jansen
Comment Utility
>> that can have a user login and they can remote ssh into the raspberry pi at their home without having to port forward their routers
As said, this is not possible, without setting up a backend service we talked about.

You could however try and install Team Viewer for Linux on your Rasberry and leave it running so you can try and connect from the outside, note that this is still not a secure solution and not advisable for any commercial product (I would certainly not buy such a product).

What is your business goal anyway?
0
 

Author Comment

by:Soumen Roy
Comment Utility
setting up a few cameras on my pi that can be run through an app from anywhere.
0
 
LVL 37

Expert Comment

by:Gerwin Jansen
Comment Utility
There are some Pi projects out there that do just that (nanny cams, spy cams) - they use a dynamic dns service to get access from outside to the camera.
0
 

Author Comment

by:Soumen Roy
Comment Utility
Thank you, I will look into that.
0
 
LVL 37

Expert Comment

by:Gerwin Jansen
Comment Utility
No feedback and a B-grade? Why?
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In this article I will cover how to take full advantage of your new Amazon FireTV, by side-loading and configuring apps to increase the overall user experience. NOTE: Rooting or making unauthorized changes to your FireTV can void your warranty, I…
This is about my first experience with programming Arduino.
This video teaches viewers how to process images for a time-lapse video. Programs required: Adobe Lightroom, Adobe After Effects, Video Editing Program. In Adobe Lightroom: Import sequence image files into Adobe Lightroom: Develop settings of an I…
This video discusses moving either the default database or any database to a new volume.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now