Repository navigation
Conversation
|
Hello Dick, Thanks -- can you tell us more? Are you behind a firewall that restricts the client-side port number...? -Keith |
|
Hi Keith, I'd like to use this to connect through a NAT hole punched outside of mosh (by using project purple sendip). |
|
I too would like to see this integration. my use case is the same |
|
I have a very unusual use-case, but would benefit from this as well. |
|
Bumping this issue. I maintain this same functionality with an out-of-tree patch and I'd love to be able to use a stock mosh |
|
Please don't name that variable |
|
FYI, I additionally disabled client port hopping if MOSH_SPORT is set: ed0d32d |
|
FWIW, here is my version of this patch: eminence@7e0c3ee |
|
@xtaran I've used SPORT from the same parameter as iptables uses (iptables -p tcp --sport) As @keithw asked, what is YOUR use case for this patch? Mine was only a proof of concept for connecting through a NAT from the Internet, which failed miserably because NAT timed the connection out and the (translated) port changed. I've never encountered a firewall which allowed only a specific udp sport/dport tuple, what would be the purpose for this? The only real use case I could think of is (I'm not sure if it would work) that you can kill mosh-client and restart it with the key+sport and be connected again. |
|
My use case is to allow a "reverse connection". The scenario is this: mosh-server is behind a NAT/Firewall that I cannot change. The server machine does not accept SSH connections from the internet, but I can SSH to it if I am on its LAN. The NAT/Firewall doesn't allow unsolicited incoming UDP packets, but once a "connection" has been established (by sending an outgoing UDP packet), return (incoming) packets are allowed. mosh-client is on an internet-facing device, with no address translation, and no firewall Given the following network diagram, here is an example: A process on the Now that a set of round-trip packets have been successfully sent/received, the Now mosh just does its normal thing -- the client and server can communicate directly. I have some wrapper scripts that handle this packet sending stuff, and takes care of communicating the key back to the client machine, but I have to have a custom version of mosh-client to make this work. |
b88b278 to
ddb13af
Compare
Hi Keith,
Could you please send me some feedback about this crude hack?
It seems to work and I'd like to see it included in mosh.
Thanks in advance!
Dick Marinus