Slackware HowTo

Configure SSH tunneling and port forwarding on Slackware

Expose local, remote, or SOCKS services without opening unnecessary permanent ports.

1. When to use it

Very useful for debugging, temporary maintenance, and access to internal panels without changing the server firewall.

ssh -L | ssh -R | ssh -D | tunnel | forwarding

2. Base setup

ssh -L 8080:127.0.0.1:80 user@remote
ssh -R 2222:127.0.0.1:22 user@remote
ssh -D 1080 user@remote

Adjust host names, IPs, interfaces, paths, and versions to the real system before making the change persistent.

3. Quick verification

ss -lnt | grep -E '8080|1080|2222'
curl -I http://127.0.0.1:8080
pgrep -laf 'ssh -'

Confirm that the output matches the expected state before considering the intervention complete.

4. Operational notes

Remote forwarding may require specific sshd_config options: verify them before blaming the client.

Quick checklist

[ ] Steps completed\n[ ] Config updated\n[ ] Tests executed\n[ ] Rollback ready\n[ ] Logs checked

Back to Linux HowTo