Conveying NAT firewall port re-writing to mosh #494

Closed
earlchew opened this Issue Feb 3, 2014 · 1 comment

Comments

Projects
None yet
2 participants

earlchew commented Feb 3, 2014

I am using a firewall which re-writes TCP/UDP port numbers.

I'm considering a patch to bin/mosh to accommodate this, and I'm soliciting advice on a reasonable approach.

Suppose the firewall will rewrite port numbers from 40001 to 50001 (as an example). This means that I want to issue -p 50001 to instruct the server to listen on 50001, but I also want the client to send to port 40001 (which the firewall will rewrite).

I'm thinking:

mosh -p 40001/50001
mosh -p 40001/50001:50099

would be a reasonable way to indicate this.

The second example shows how it could be combined with a server side port range. Suppose the server responded with port 50055, the client would use:

40001 + (50055 - 50001) = 40055

earlchew added a commit to earlchew/mosh that referenced this issue Feb 4, 2014

mosh: Support NAT firewall port re-writing
mobile-shell#494

Some firewalls re-write port numbers. Allow a port translation rule
to be specified. When the mosh-server responds with a port, have
the mosh-client connect to the translated external firewall port.

Signed-off-by: Earl Chew <earl_chew@yahoo.com>
Member

cgull commented Jun 26, 2015

Duplicates #497.

@cgull cgull closed this Jun 26, 2015

earlchew added a commit to earlchew/mosh that referenced this issue Dec 10, 2017

mosh: Support NAT firewall port re-writing
mobile-shell#494

Some firewalls re-write port numbers. Allow a port translation rule
to be specified. When the mosh-server responds with a port, have
the mosh-client connect to the translated external firewall port.

Signed-off-by: Earl Chew <earl_chew@yahoo.com>

earlchew added a commit to earlchew/mosh that referenced this issue Dec 10, 2017

mosh: Support NAT firewall port re-writing
mobile-shell#494

Some firewalls re-write port numbers. Allow a port translation rule
to be specified. When the mosh-server responds with a port, have
the mosh-client connect to the translated external firewall port.

Signed-off-by: Earl Chew <earl_chew@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment