Bug 1941 - ssh -6 prevents ipv4 forwarding
Summary: ssh -6 prevents ipv4 forwarding
Status: CLOSED WORKSFORME
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 5.8p1
Hardware: ix86 Linux
: P2 minor
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-05 09:36 AEDT by gmccullagh
Modified: 2019-05-03 14:42 AEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gmccullagh 2011-10-05 09:36:04 AEDT
when I use either of

  ssh -CX -L 10443:172.20.0.1:443 <hostname>
  ssh -4CX -L 10443:172.20.0.1:443 <hostname>

where <hostname> has both a functioning A and AAAA record, I can connect and use the port forward.  However, if I use:

  ssh -6CX -L 10443:172.20.0.1:443 <hostname>

I can't connect to the tunnel because seemingly the -6 prevents use of an IPv4 address in any context.  

I had imagined the -4 and -6 were there to dictate what way ssh connects only.  Apparently that was a misreading on my part but it would be preferable to be able to separate the preference for an IPv4/v6 ssh connection from the IP version used in any forwarded connections.
Comment 1 Damien Miller 2019-01-23 20:15:10 AEDT
This is working as intended. The documentation for -4/-6 say that they force ssh to use only IPv4/IPv6 addresses and that is what it is doing.

These options are big hammers that are mostly intended for debugging as a crutch when the network is broken.
Comment 2 Damien Miller 2019-05-03 14:42:38 AEST
Move resolved bugs -> CLOSED after 8.0 release