Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syncoid: Reverse direction of connection for --insecure-direct-connection #850

Open
Majiir opened this issue Sep 23, 2023 · 0 comments
Open

Comments

@Majiir
Copy link

Majiir commented Sep 23, 2023

Syncoid makes SSH connections local->remote, even if the direction of sync is remote->local. The --insecure-direct-connection option instead makes TCP connections source->target. This can be a problem if, for example, you want to restore a dataset from an untrusted backup host that's not allowed to make connections to the target through a firewall.

Some options for fixing this:

  1. Add an option that sets the direction of connection to target->source.
  2. Add an option that sets the direction of connection to local->remote, regardless of which one is the target.
  3. Make local->remote the default, for parity with the SSH connection.

I lean toward (3), although I could see existing users wanting an option to revert to the current source->target scheme.

Both socat and nc support sending piped input across incoming TCP connections. It looks like mbuffer does not.

I'm happy to spin up a PR if the concept seems sound.


As an aside, is there a reason socat is used to send, while either mbuffer or nc (but not socat) is used to receive? It seems like most combinations are possible in principle, with the notable exception that mbuffer cannot listen on the send side (or initiate the connection from the receive side).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant