this post was submitted on 02 Apr 2025
11 points (82.4% liked)

Linux

52769 readers
536 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
[–] Slotos@feddit.nl 5 points 2 days ago
  • ssh to remote, forwarding some remote port to your local ssh port (-R)
  • ssh from remote through the exposed port, starting socks proxy in the process (-D)
  • use socks proxy explicitly or find some tool that can route the traffic into it

Similar approach can be used to establish VPN tunnel with no encryption (ssh already provides that), routing everything but your ssh connection through it.

  • ssh to remote, reverse forwarding your VPN-over-tcp server’s listening port
  • establish vpn connection on remote, route everything but your ssh connection through the newly established interface

It will be wasteful, but it will work.