2 added 5 characters in body
source | link

Basically, running nc -l -p $port on one host, and nc $ipaddr $port for an appropriate value of $ipaddr and some value of $port would be enough. But that requires any firewalls between the machines don't block the connection.

You mentioned you're "both behind a standard consumer ISP router", which usually implies some sort NAT, which means that the machines behind the routers don't have public IP addresses, and so you can't connect directly to them. Without configuring somethe hosts, but would have to configure port forwarding toon the router, that is.

In addition, there's the question of your ISP allowing the connection, too. Depending on a number of things, you might not be able to receive TCP connections in a run-of-the-mill consumer connection.


As for the redirection and echo, you need either echo "message" | nc ... to pipe the output of another command to nc, or nc ... <<< "message" to direct a string directly to nc. (That's not a feature of standard sh)

Basically, running nc -l -p $port on one host, and nc $ipaddr $port for an appropriate value of $ipaddr and some value of $port would be enough. But that requires any firewalls between the machines don't block the connection.

You mentioned you're "both behind a standard consumer ISP router", which usually implies some sort NAT, which means that the machines behind the routers don't have public IP addresses, and so you connect directly to them. Without configuring some port forwarding to the router, that is.

In addition, there's the question of your ISP allowing the connection, too. Depending on a number of things, you might not be able to receive TCP connections in a run-of-the-mill consumer connection.


As for the redirection and echo, you need either echo "message" | nc ... to pipe the output of another command to nc, or nc ... <<< "message" to direct a string directly to nc. (That's not a feature of standard sh)

Basically, running nc -l -p $port on one host, and nc $ipaddr $port for an appropriate value of $ipaddr and some value of $port would be enough. But that requires any firewalls between the machines don't block the connection.

You mentioned you're "both behind a standard consumer ISP router", which usually implies some sort NAT, which means that the machines behind the routers don't have public IP addresses, and so you can't connect directly to the hosts, but would have to configure port forwarding on the router.

In addition, there's the question of your ISP allowing the connection, too. Depending on a number of things, you might not be able to receive TCP connections in a run-of-the-mill consumer connection.


As for the redirection and echo, you need either echo "message" | nc ... to pipe the output of another command to nc, or nc ... <<< "message" to direct a string directly to nc. (That's not a feature of standard sh)

1
source | link

Basically, running nc -l -p $port on one host, and nc $ipaddr $port for an appropriate value of $ipaddr and some value of $port would be enough. But that requires any firewalls between the machines don't block the connection.

You mentioned you're "both behind a standard consumer ISP router", which usually implies some sort NAT, which means that the machines behind the routers don't have public IP addresses, and so you connect directly to them. Without configuring some port forwarding to the router, that is.

In addition, there's the question of your ISP allowing the connection, too. Depending on a number of things, you might not be able to receive TCP connections in a run-of-the-mill consumer connection.


As for the redirection and echo, you need either echo "message" | nc ... to pipe the output of another command to nc, or nc ... <<< "message" to direct a string directly to nc. (That's not a feature of standard sh)