3

I am trying to set my Raspberry Pi as a server at home using IPv6. At home I have a dual stack.

I need to know how can I connect from outside internet IPv4 (Client) to IPv6(Server at home) via SSH.

So much I have seen multiple threads about the same issue but without a clear answer.

the_Begin
  • 137
  • 1
  • 3

2 Answers2

2

Your question is a bit thin on details. I note in your response to @ppumpkin that you can connect IPv6-to-IPv6 perfectly. You say the shape of your problem is connecting from IPv4 to IPv6. If your Pi is setup on a world-routable Global Unicast Address then it SHOULD be contactable from outside your LAN assuming the IPv6 FW rules allow a hole for the connection- FROM ANOTHER IPv6 HOST

HOWEVER: Even if your Pi is assigned a Global Unicast Address and the FW rules are also correct, you need to connect from a host that also supports IPv6. If your connection is from a single-stack IPv4 network, you will not be able to connect to the Pi. BOTH sides of the connection must support the IPv6 protocol. You appear to be saying that you're trying to connect from an IPv4-only host to the IPv6 addressed Pi. Example: My Pi is setup on a Global Unicast Address but I cannot SSH to it's IPv6 address from my phone as my mobile provider has zero support for IPv6 in their network. HTH bud- Terrence

F1Linux
  • 1,677
  • 1
  • 15
  • 32
1

Raspbian and many operating systems now support IPv6 and actually try to use IPv6 before IPv4.

Your router may be giving you IPv6 addresses but it does not mean your internet provider supports this. In your question you said you have a dual stack, so I suppose in Germany ISP's are giving you v6 now? If that is true then your router should be getting a v6 address and all other devices should be getting a similar v6 address from your ISP. It is usually the same of v6 and then you can have millions of devices on the v6 internet without NAT. That means you can connect/ ping your device from any other v6 enabled place.

That is the theory. Your router may be blocking incoming requests to protect your devices? SO you can try these

  1. First test would be to ping your routers IPv6 address and see if you get a ping
  2. Make sure your Pi IPv6 start with the same address as your router (private space) and ping that.
  3. Check your router/ gateway security settings.

enter image description here

IPv4 is different and that question has been answered to death everywhere. Typically requiring port forwarding and maybe a more relaxed NAT setting

One way to be able to connect your IPv6 Pi to a IPv4 address is to use a VPS (like a cheap DigitalOcean box) that has a IPv4 address you connect to. On that box you have a reverse proxy, VPN or something relaying that trafic to your IPv6 end point. Its a small extra cost but it is probably what you need to do until routers have this facility built in.

Piotr Kula
  • 17,336
  • 6
  • 66
  • 105