Hello I am wondering if there is increased network/packet security by connecting to a server over ssh through a VPN hosted by that same server as opposed to without first tunneling by VPN. I imagine with or without tunneling through a VPN there would be latency/speed differences too?

  • Ponziani@sh.itjust.worksOP
    link
    fedilink
    arrow-up
    2
    ·
    6 months ago

    This is the first that I have heard about setting the SSH port to only accept connections from the VPN, is there a term or something I can search about this online? Or is this basically just allowing port 22 open on a device and not forwarding the port on the router as when a different device tunnels into the same network through the VPN it can already talk to the first device?

    • lurch (he/him)@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      6 months ago

      You would either configure the Linux firewall of the router or server to drop everything on the SSH port not from the VPN IP/interface or change the ListenAdress in /etc/ssh/sshd , but be careful: Don’t lock yourself out!