How to remotely debug an iot device using google cloud platform? - amazon-web-services

Imagine having an iot device in a building miles away from you. The device encountered a problem and I want to debug remotely. Is there an place in gcp where I can do that ? (With aws, I can use secure tunneling to establish a secure tunnel and debug the device remotely)

Related

Common IoT connectivity to GCP, AWS, Azure, etc

I've to extend an existing product based on ARM-Cortex M0 and M4 micro-controller (No RTOS-bare metal event loop) to enable IoT capabilities.
I'm using W5500 Hardwired TCP/IP embedded Ethernet controller to enable internet connection for my micro-controllers.
One of the requirement of the project is that it must have cloud connectivity (using MQTT and/or ReST API) with all major vendors i.e. Google Cloud Platform, Amazon Web Services, Microsoft Azure and optional cloud providers like Linode and Digital Ocean.
The cloud connectivity is decided by client during installation.
As these devices are field configurable, connectivity to all these platforms need to be built-in the devices.
While I was scouring over internet regarding this topic, I found out that GCP have their own set of libraries and so do AWS and Azure.
Google Cloud IoT Device SDK for Embedded C
AWS IoT Device SDK for Embedded C
Azure SDK for Embedded C
I was under assumption that either by using simple MQTT and/or ReST API I would be able to communicate with any cloud service. Is my assumption wrong?
Is their any additional communication mechanism/layer that has been introduced over MQTT or ReST API to communicate with these cloud services that warrant need of such explicit libraries.
What are my options here to interface with all these services?
Can I use GCP MQTT library to communicate with AWS or Azure or vice versa?
Can I use Wiznet IO Library's MQTT client to connect to either of these services.

Cloud run connect devices Cloud IoT Core

I have a IoT architecture which I have differents devices sending info to Google Cloud using MQTT. I am in a dev enviorement and I don'r have the real devices so I am trying to simulate them with a Cloud Run (Just try to connect using de rsa keys and python code).
The problem is that my cloud run doesn't work, the devices don't connect and I don't have a specific error, for example I test the same code with cloud functions and any problem.
Does cloud run have some problem with IoT core service? or expose something in my docker?
I tried the port 8883 and 433

how to establish a private network connection of AWS server to a remote IoT device running linux?

how to deploy a code to a remote IoT device running linux? Is there any zombie program to be written on the remote IoT device to establish a connection? Or is there any custom publisher subscriber shell script/python program needs to be handled at IoT device side? Is there any alternative web servers / Is it possible to deploy a code from gitlab to remote IoT device?
AWS IoT Greengrass is exactly the service you are looking for. You can set it up to be started with systemd and it will run a daemon that keeps your IoT device and the shadow device in sync. You can even deploy long-running lambda functions on your device that will only run locally (not in the cloud). All the deployment, secure connection, updating and offline handling is done by Greengrass.
I played with that and my Raspi with Sense HAT as my home office sensor. Now have a fancy dashboard of my room temperature, humidity and more... lots of fun.
You can get started here.

Does Google cloud supports Tibco EMS? If not, how to run EMS broker in Google cloud?

I am new to Google Cloud platform and want to migrate my existing application to GCP. My application communicates with other applications using Tibco EMS queue/topic.
I am not able to find any link on internet which can suggest how to use Tibco EMS in Google Cloud Platform.
Can anyone please help me in this?
You can run any kind of software in GCM by creating a Virtual Machine and manually installing the software and then configuring ports in the firewall.
If you want to use a JMS system supported by Google cloud natively, then go for ActiveMQ Certified by Bitnami or even more native by exploring the Cloud Pub/Sub

Denial of service attack in Google Compute Engine running Ubuntu

I noticed that my VM in the google cloud platform is generating DOS and wondering where that may be coming from. On further search, I noticed a file that wasn't created by me and deleted the file.
So far, I have changed the ssh port but I'm still getting This project appears to be committing denial of service attacks
I would like suggestions on what else I can do to prevent this in the future.
I'm leaving here some interesting resources you can check to secure your Google Compute Engine instance:
Ubuntu SSH Guard manpage
ArchLinux SSH guard guide (guides you through installation and setup)
Apache hardening guide from geekflare
PHP security cheatsheet from OWASP
MySQL security guidelines
General security advice for Google Cloud Platform instances:
Set user permissions at project level.
Connect securely to your instance.
Ensure the project firewall is not open to everyone on the internet.
Use a strong password and store passwords securely.
Ensure that all software is up to date.
Monitor project usage closely via the monitoring API to identify abnormal project usage.
To diagnose trouble with GCE instances, serial port output from the instance can be useful.
You can check the serial port output by clicking on the instance name
and then on "Serial port 1 (console)". Note that this logs are wipped
when instances are shutdown & rebooted, and the log is not visible
when the instance is not started.
Stackdriver monitoring is also helpful to provide an audit trail to
diagnose problems.
Here are some hints you can check on keeping GCP projects secure.