Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Accessing raspberry of home from office

Posted on 2016-10-09
22
Medium Priority
?
155 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
ID: 41835824
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
ID: 41835836
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
ID: 41835840
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 88

Accepted Solution

by:
rindi earned 750 total points
ID: 41835855
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
ID: 41835925
Instead of Linux PC can I use my android or iPhone?

Regards,
Soumen
0
 
LVL 15

Expert Comment

by:cwstad2
ID: 41835934
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 88

Expert Comment

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

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 41835965
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
ID: 41835972
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 38

Assisted Solution

by:Gerwin Jansen, EE MVE
Gerwin Jansen, EE MVE earned 750 total points
ID: 41835977
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
ID: 41847084
Can you please explain to me what a cloud based server is and how it works?
0
 
LVL 88

Expert Comment

by:rindi
ID: 41847098
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
ID: 41852711
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 88

Expert Comment

by:rindi
ID: 41852746
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 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 41852790
>> 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
ID: 41854173
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
ID: 41854183
At least I could start with an app with the mentioned capabilities that could work from the local VLAN.

Any suggestions please?
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 41854298
>> 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
ID: 41854844
setting up a few cameras on my pi that can be run through an app from anywhere.
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 41854934
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
ID: 41855392
Thank you, I will look into that.
0
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 41875626
No feedback and a B-grade? Why?
0
Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For some of us, the rush of adrenaline that comes with beating the rest of the Black Friday crowd to a good deal is enough to motivate us to get out of bed at 4:00 a.m. For others of us, however, there's nothing short of virtual insanity that could …
Lithium-ion batteries area cornerstone of today's portable electronic devices, and even though they are relied upon heavily, their chemistry and origin are not of common knowledge. This article is about a device on which every smartphone, laptop, an…
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…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses
Course of the Month9 days, 16 hours left to enroll

927 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