fasmide / remotemoe

tunnels to localhost and other ssh plumbing
MIT License
278 stars 31 forks source link

Remote address as asteriks * #24

Open stokito opened 1 year ago

stokito commented 1 year ago

The -R option allows to set a remote interface and it can be ether:

The remote.moe is working only if it's omitted otherwise the tunnel will return 502 error.

The problem is that the OpenWrt sshtunnel package use the * if the remote address is not specified. I created a PR that will allow an empty remoteaddr but it still won't solve the issue https://github.com/openwrt/packages/pull/21263

From ssh man:

By default, TCP listening sockets on the server will be bound to the loopback interface only. This may be overridden by specify‐ ing a bind_address. An empty bind_address, or the address ‘*’, indicates that the remote socket should listen on all interfaces. Specifying a remote bind_address will only succeed if the server's GatewayPorts option is enabled (see sshd_config(5)).

Also another related problem is than the -N option disables output of the domain after connection. The same problem for the srv.us https://github.com/pcarrier/srv.us/issues/18

fasmide commented 1 year ago

The -R option allows to set a remote interface and it can be ether:

  • omitted 80:localhost:8080
  • empty :80:localhost:8080
  • asterisk *:80:localhost:8080

The remote.moe is working only if it's omitted otherwise the tunnel will return 502 error.

The problem is that the OpenWrt sshtunnel package use the * if the remote address is not specified. I created a PR that will allow an empty remoteaddr but it still won't solve the issue openwrt/packages#21263

Thats quite interesting - I cannot see why remotemoe shouldn't be able to accept any input as it doesn't use this information for anything (if I recall correctly) - so it shouldn't make any difference - but I would like to investigate this further at some point

Also another related problem is than the -N option disables output of the domain after connection. The same problem for the srv.us pcarrier/srv.us#18

Hmm, I have not had any problems using the -N client side when connecting to remotemoe - could you provide more information about this?

Thanks for submitting :)