Why bother doing all these stuff?
if you have sensitive website that provide top-secret confidential data, you might want to hide it from everyone on the Internet! in my case, I have cockpit dashboard and want to access it remotely, so I tunnel it through ssh.
ssh -N -C -L 8080:127.0.0.1:9090 user@addr -p <ssh_port_number>
a brief explanation:
8080
is the local port on your machine9090
is the remote port on your serverssh_port_number
is self-explanatory, you don't need to specify it if it's default, I need to determine the port because I access ssh throughngrok
- see the rest explanation of argument on
ssh(1)
congratulations! you can now access your website securely on your laptop or smart phone (if android, use termux)
just FYI, I also have discuss it on cloudflare forum, you can read the thread if you're interested.