Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 172
  • Last Modified:

Accessing raspberry of home from office

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
Soumen Roy
Asked:
Soumen Roy
  • 9
  • 6
  • 4
  • +1
2 Solutions
 
cwstad2Commented:
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
 
Soumen RoySenior ManagerAuthor Commented:
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
 
cwstad2Commented:
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
 
rindiCommented:
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
 
Soumen RoySenior ManagerAuthor Commented:
Instead of Linux PC can I use my android or iPhone?

Regards,
Soumen
0
 
cwstad2Commented:
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
 
rindiCommented:
For Android there are many SSH clients in the Play Store. I'm sure you can also find many for iOS.
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
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
 
Soumen RoySenior ManagerAuthor Commented:
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
 
Gerwin Jansen, EE MVETopic Advisor Commented:
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
 
Soumen RoySenior ManagerAuthor Commented:
Can you please explain to me what a cloud based server is and how it works?
0
 
rindiCommented:
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
 
Soumen RoySenior ManagerAuthor Commented:
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
 
rindiCommented:
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
 
Gerwin Jansen, EE MVETopic Advisor Commented:
>> 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
 
Soumen RoySenior ManagerAuthor Commented:
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
 
Soumen RoySenior ManagerAuthor Commented:
At least I could start with an app with the mentioned capabilities that could work from the local VLAN.

Any suggestions please?
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
>> 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
 
Soumen RoySenior ManagerAuthor Commented:
setting up a few cameras on my pi that can be run through an app from anywhere.
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
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
 
Soumen RoySenior ManagerAuthor Commented:
Thank you, I will look into that.
0
 
Gerwin Jansen, EE MVETopic Advisor Commented:
No feedback and a B-grade? Why?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

  • 9
  • 6
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now