1

I've a box with 1 private IPv4 (192.168.0.X) and some IPv6 (let's call one Y::Z). I have an application listening on 192.168.0.X on port 1234 and an application that want to connect to that service but use Y::Z as source address.

So I thought about using ::ffff:0:0/96 prefix but telnetting ::ffff:192.168.0.X (using source address Y::Z) give me a "network unreachable" error. I've tried to add routing rules but seems that nothing works.

How I can allow

 telnet -b Y::Z ::ffff:192.168.0.X 1234

to work?

Thanks.

edit: OS: Debian Squeeze (in an OpenVZ container, kernel 2.6.32).

I also forgot to mention that

 telnet -6 ::ffff:192.168.0.X 1234

works without any error.

Steve81
  • 13
  • 3
  • This mapping is disabled by default on some systems. Try to find the option to enable it or tell us your OS. – BatchyX Mar 26 '13 at 14:21

1 Answers1

3

I've a box with 1 private IPv4 (192.168.0.X) and some IPv6 (let's call one Y::Z). …

telnet -b Y::Z ::ffff:192.168.0.X 1234

The above makes little sense: you're trying to telnet to a native IPv4 address (represented in an IPv6 notation) with a native IPv6 address as source? That would never work, unless you have something like 464XLAT and NAT64.

Yes, on some systems and with some settings (usually the default on Linux), you could accept IPv4-only connections on IPv6 sockets, but both the source and the destination address of any such connection still have to be IPv4.

cnst
  • 12,948
  • 7
  • 51
  • 75