this post was submitted on 02 Apr 2025
10 points (81.2% liked)

Linux

52775 readers
692 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Is it possible to use a reverse ssh tunnel to force all network connection on the remote host through the local host.

Essentially:

local -> ssh -> remote remote web request -> ssh tunnel -> local -> internet

I want the remote to make connections through the locals VPN without having to authenticate on the remote as well

Hopefully this makes sense

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] -3 points 1 day ago* (last edited 1 day ago) (1 children)

Love that you put it in quotes as if to be sarcastic. Hilarious.

This is basically how the entire Internet works, but you know that from your post. Surely you also know that traffic gets "routed" from place A to B all the time without SSH as well.

So if you want to "route" a remote instance back to another place, you:

  1. Set routing rules on the intended origin
  2. Set default route on the remote client
  3. Set restricted firewall rules so both the origin and client are allowed to talk to each other
  4. Traffic is routed

Another alternative is using Tailscale and setting an exit node on your network, which is essentially the same thing.

But you already knew that, and that's why you chimed in with your comment. Stupid me.

How fucking stupid must I look, huh?

[–] [email protected] 4 points 1 day ago

Sure mate.

I've been playing around with networks for decades. I'll happily admit that my understanding is rudimentary at best, but configuring routing rules with IP tables or whatever so your device will act as a NAT seems a few levels beyond "basic networking".

that's why you chimed in with your comment. Stupid me.

The honest to god reason I chimed in was because your response seemed derisive, and I thought I might be able to soften a bit by either showing my own ineptitude or challenging your solution.