2025 07-July 21

Date: 2025 07-July 21

Hach DR 6000 Spectrophotometer

Mulch

Afternoon 1 PM meeting

Pipeline

PS C:\Users\GEORGE.BENNETT\Documents\dev> mysql -u root -p
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 559
Server version: 10.2.10-MariaDB mariadb.org binary distribution

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> USE stiles;
Database changed
MariaDB [stiles]> DESCRIBE table_name;
ERROR 1146 (42S02): Table 'stiles.table_name' doesn't exist
MariaDB [stiles]>

CB 0

so so i have port 43084 on each machine.

i can forward port 43084 on machine 128 over to machine 127, to a different port, like 5555

and then i can call the rest api at machine 127 on port 43084 for the set of data known to machine 127, and i can call port 5555 on machine 127 to access the rest api for data known to machine 128.

yes?

cg0:

Yes, that’s exactly right! Here’s how it works step-by-step for your scenario:

- **Machine 128** runs the REST API on port **43084** but its port is blocked externally.
    
- **Machine 127** can reach Machine 128 over the network and can do port forwarding.
    
- On **Machine 127**, you forward a local port (e.g., **5555**) to **Machine 128:43084**.
    
- So when you call `http://machine127:5555`, that request is forwarded transparently to Machine 128’s API on port 43084.
    
- Meanwhile, `http://machine127:43084` still accesses the API on Machine 127 itself.
    

Effectively:

|API call from Machine 127|Target machine & port|Data served|
|---|---|---|
|`http://machine127:43084`|Machine 127 port 43084|Data known to Machine 127|
|`http://machine127:5555`|Forwarded to Machine 128 port 43084|Data known to Machine 128|

---

### How to do this

You can do port forwarding using SSH like:

```bash
ssh -L 5555:localhost:43084 user@machine128

Run this on Machine 127 — this opens local port 5555 on 127, which tunnels to port 43084 on 128.

Then your code on Machine 127 calls http://localhost:5555 or http://machine127:5555 for Machine 128’s data.


If you want it to run as a persistent background tunnel, you can add -N -f options:

ssh -N -f -L 5555:localhost:43084 user@machine128

This sets up the forwarding without an interactive shell.


Want me to help you set up a script or Windows equivalent for this?

CB 1

and you think this will get around the firewall blockage rules?

cg 1

Usually, yes — **SSH port forwarding tunnels your traffic inside an SSH connection**, so the firewall sees it as just SSH (usually port 22) traffic, which is often allowed.

If:

- The firewall allows **outbound SSH (port 22)** from Machine 127 to Machine 128, and
    
- You can SSH into Machine 128 from Machine 127,
    

then the firewall won’t block the forwarded port traffic because it’s encapsulated inside that SSH connection.

---

### Important considerations:

- The **firewall blocks the REST API port (43084)**, but often **SSH is allowed** (if not, this won’t work).
    
- You’re not opening new ports on the firewall; you’re just using an allowed SSH port to tunnel.
    
- The tunnel only works as long as the SSH connection is active.
    
- This method assumes you have SSH access to Machine 128 from Machine 127.
    

---

If you want to confirm, try:

```bash
ssh user@machine128

from Machine 127. If you can connect, the port forwarding will very likely work too.


If SSH is blocked or restricted, other solutions might be needed (VPN, reverse proxies, or firewall rules changes). But this SSH port forwarding trick is very common and usually gets around those kinds of port restrictions.