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

  • ShimitarA
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    22 hours ago

    Wire guard + some nft tables or ip tables rules is a much better solution.

    Ssh on itself can do the port forward part but for the routing you still need the above mentioned rules. In addition, ssh will not autoreconnect if anything happens and you need to add autossh or some other solution to keep it rolling.