Linux help, access gateway via ssh

Set up a Ubuntu server in a virtualbox VM today. Im very green with the whole command line interaction with a computer, and VMs, and Linux in general. I believe I got ignition successfully installed after some Google fu. I was also able to connect to the Ubuntu server via ssh from the host machines windows command line using at local host.

What i was attempting to do was access the gateway web page of the vm server from the browser on the host via an ssh connection. I think I just want to forward the single port over ssh but I cant seem to get the command right. I kept getting a refused to connect error on the web page.

Its my impression that this is the best way to access a headless ignition gateway on linux so I want to learn how to do it. Anyone willing to walk this knuckle dragger through it?

I do not fully understand it, but if you want to access gateway through the host you will need to open 8088 port on the VM using ufw if you enabled your firewall. I assume you've opened 22 ssh port previously.

No. Just open the proper ports.

Well now that you point that out, duh. Guess I was making that a lot harder than it needed to be. I just need to open port 8088 then point my browser to serverip:8088. I would only need to use ssh if I needed to run commands on the server, right?

Did I mention the knuckle dragging and mouth breathing…

3 Likes

There are a lot of misleading forum posts around the internet that tell you that you must use tunnelled connections of every service that isn't secure and tested etc... Ignition is a production server setup that is regularly exposed directly to the internet in various ways, so exposing the 8088 port is perfectly OK, especially on an internal network.

2 Likes

FWIW, I encourage using ports 80 and 443, using an AmbientCapabilities override in SystemD to allow it for a non-root Ignition service. This greatly improves compatibility with IT systems of all kinds, and is very helpful if you ever plan to use proper public certificates (such as Let's Encrypt). Not to mention allowing your users to just use a plain domain name to make connections.

I will keep this in mind even if I only sorta understand it.

Thanks everyone for the help. Sure enough this morning I set port forwarding in virtualbox to forward guest 8088 to host 8088 and I can log into the gateway just like if it was installed locally. Virtualbox is just for testing without hardware but final solution should be easy enough.

Note that this step is optional and probably not very common among people using VMs.

It's perfectly natural to access your Gateway in the browser at someotherip:8088 and launch your Designer against a remote Gateway. This is probably the most common setup you'll encounter in the real world. You generally do not design on, or access the Gateway web interface from, the same machine running the Gateway.

Now you've just set yourself up to get confused in the future when you forget about the port forwarding setup and go looking for Ignition installed on your local machine because you see localhost in the browser.

4 Likes

Totally makes sense. I got it working the normal way on a different Debian vm, once I figured out how to set up the virtualbox network right. Brand new to virtualbox so still figuring it out and playing with different linux distros. Final install won't use VM but just using it to experiment on an old laptop.

You might find this topic helpful:

In my experience, the fastest way to really learn Linux is to make it your bare metal daily driver.

1 Like

My main computer is a crappy windows laptop IT gave me and I imaged my old laptop over to it because it has all the plc, hmi, other programming stuff on it. Ive thought about dumping it to linux and setting up a VM to run windows. Just havent taken the leap yet, probably should to keep the important plc stuff isolated from all the other goofy stuff i do with it. My only real experience with linux is a few years ago a took an ancient programming laptop we had laying around and converted it to Ubuntu. It would barely boot with windows but runs great on Ubuntu. I played with node red and basic html5 on it for a little bit just messing around. Right now im using another old programming laptop from 2018 or so to experiment and check things out. So far got Ubuntu server, Ubuntu desktop, Debian with KDE plasma desktop in VMs. Have mint downloaded, and will probably take a look at kubuntu.

1 Like

If you have windows 10/11 you can install WSL Windows Subsystem for Linux which lets you use Linux commands directly on your Windows through an Ubuntu terminal. It won’t be the same as actually installing things on linux and editing etc files but you can get used to some of the basics like this.