[Bug 3017] ExitOnForwardFailure=yes doesn't work for local forwards (-L)

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Mon May 15 19:31:57 AEST 2023


https://bugzilla.mindrot.org/show_bug.cgi?id=3017

--- Comment #5 from Pavel Sidlo <pavel.sidlo at linuxbox.cz> ---
I've faced probably the same behavior for RemoteForward.

I seems sshd by default allocates both tcp and tcp6 sockets.
ExitOnForwardFailure fails to reject connection if tcp is already in
use but tcp6 is not (and vice versa).

Workaround for me is to split RemoteForward to separate tcp and tcp6.

Previous problematic settings:
-o "ExitOnForwardFailure yes" -R 56984:localhost:22

New reliable settings:
-o "ExitOnForwardFailure yes" -R [::1]:56984:[::1]:22 -R
127.0.0.1:56984:127.0.0.1:22

-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list