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

  • null_dot@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    0
    ·
    20 hours ago

    IDK anything about “routing” but I don’t think it can solve this problem without additional services.

    If my laptop is A and I want all outbound connections to go through server B then B needs to be running some kind of service whether it’s merely a NAT router or VPN or proxy.

    In this case OP actually want’s B’s outbound connections to go through A but it’s the same problem.

    • just_another_person@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      20 hours ago

      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?

      • null_dot@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        0
        ·
        20 hours 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.