autossh: impossible to provide tunneled service to local network
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
autossh: impossible to provide tunneled service to local network
Maintainer: @neheb
Environment: ath79/generic OpenWrt 23.05.0 r23497-6637af95aa / LuCI openwrt-23.05 branch git-24.086.45142-09d5a38
Description:
This forwarding mechanism:
https://github.com/openwrt/packages/blob/master/net/autossh/files/autossh.init#L37
forwarding="-L ${localport}:${remotehost}:${remoteport}"
Makes it impossible to use autossh to provide a tunneled service to the local network (for example; or anything other than localhost) because the ${localhost} argument is not used in local forwarding (and so it defaults to literal localhost).
It should be:
forwarding="-L ${localhost}:${localport}:${remotehost}:${remoteport}"
This enables forward like: -L 192.168.0.1:80:127.0.0.1:80 ...to provide LAN access to a HTTP service provided locally on remote host (and not over the internet).
The remote line should probably also be changed, but it is not required for my use case.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in net/autossh/files/autossh.init at the forwarding assignment around line 37 and inspect how the localhost argument is used for local forwarding. Confirm that the generated forwarding option can bind the requested local network address, such as 192.168.0.1, while preserving the remote host and port values.
Written by the indexing model from the issue text.
Assessment
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100