Skip to content

Instantly share code, notes, and snippets.

@sdntechforum
sdntechforum / OCI Linux MQTT Install
Created June 3, 2023 02:23
This document describe how to install Mosquitto MQTT Broker on Oracle Linux 8
TBD
@sdntechforum
sdntechforum / Autostart Node-RED on Boot
Last active June 3, 2023 02:22
Node Red Install on Cloud VM
sudo nano /etc/systemd/system/nodered.service
#Insert the commnds below
[Unit]
Description=Node-RED
After=syslog.target network.target
[Service]
ExecStart=/usr/local/bin/node-red --max-old-space-size=128 -v
Restart=on-failure
KillSignal=SIGINT
cd /dev/
ls
sudo apt-get install gpsd-tools gpsd-clients
sudo systemctl stop gpsd.socket
sudo systemctl disable gpsd.socket
sudo vi /lib/systemd/system/gpsd.socket
sudo killall gpsd
sudo gpsd /dev/ttyACM0 -F /var/run/gpsd.sock
!
gpsmon
@sdntechforum
sdntechforum / CoAP Python Client-Server
Created May 10, 2023 15:54
CoAP Python Client-Server
CoAP (Constrained Application Protocol) an IoT protocol . CoAP is designed for use in constrained networks such as those found in IoT devices. We'll cover the basics of what CoAP is, how it works, and its key features, including its lightweight nature and support for asynchronous messaging.
@sdntechforum
sdntechforum / ssh_remote_port_forwarding.md
Last active February 24, 2023 16:36
This document demonstrate ssh remote port forwarding behavior and configuration

SSH Remote Port Forwarding is a method of securely accessing a computer over a network by redirecting traffic from one port to another. It is a type of tunneling that allows users to securely access resources located on a remote machine, such as a web server or database server, from a local machine.

In this method, the remote machine is the host, and the local machine is the client. The host machine will listen for incoming connections on a specific port, and the client machine will forward the traffic from that port to another port on the remote machine, allowing the user to access the remote resources securely.

Here is the testbed for our demonstartion purpose - Two VMs having SSH connection between them, No other ports are allowed between these two hosts. The Oracle VM is running nginx service on non-standard port 3000. AWS VM listens to port 8080. For our test AWS VM request localhost:8080 and this request is redirected over SSH tunnel to port 3000 on Oracle VM which in turn return Oracle Linux Nginx sp

@sdntechforum
sdntechforum / Add additional SSH keys.md
Last active February 22, 2023 19:23
This document describe how to distribute and add multiple SSH security keys to the server so they can talk to each other

step 1: Create a new rsa key pair of your choice locally on you device.

ssh-keygen -t rsa

step 2 : once you have Public and private key pair available, chnage their permissions. The private key need a permission of 400 and set Public key permission as 644.

sudo chmod 600 id_rsa
sudo chmod 644 id_rsa.pub