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

Local port forward with binding address other than localhost #1248

Open
justinvdk opened this issue Mar 27, 2023 · 0 comments
Open

Local port forward with binding address other than localhost #1248

justinvdk opened this issue Mar 27, 2023 · 0 comments
Labels

Comments

@justinvdk
Copy link

justinvdk commented Mar 27, 2023

Is your feature request related to a problem? Please describe.

I'd like to do a local forward that allows traffic from outside, so that I could use my phone as bridge between systems that its both connected to. In this case a device that I tether internet to, and a device that is connected to the same VPN:

[Device A] - VPN -> [Phone with ConnectBot] - [USB/WIFI tether] -> [Device B]

Describe the solution you'd like

It seems that the SSH library supports it; but the InetAddress.getLocalHost() is always passed:

lpf = connection.createLocalPortForwarder(
new InetSocketAddress(InetAddress.getLocalHost(), portForward.getSourcePort()),
portForward.getDestAddr(), portForward.getDestPort());

I understand that this is very niche so it should not make configuring a local forward harder in any way. Perhaps a checkbox with "Override bind address" should be put next to it, that defaults to false. Such that a user is not confronted with extra (niche) options.

Describe alternatives you've considered

None, I realised there was no way to express this configuration; thus I looked into the source to confirm.

Since I also have ssh access to Device A; I was able to to a remote forward from ConnectBot. This solved my problem. I'll let the issue stand if anyone is interested regardless, author/maintainer can close if there is no such need.

Additional context

Has there been any such request before? I've searched PRs and Issues but I could not find any.

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

No branches or pull requests

1 participant