Access GitHub, Docker Hub & LLM APIs from IPv6-only VPS
VirtualLabs and some IPv6-only VPS instances can’t directly reach services that are still IPv4-only, such as GitHub, Docker Hub, and OpenAI. This tutorial provides practical solutions so you can still git clone, git push, docker pull, docker login, and call LLM APIs from a VPS that only has an IPv6 address.
The Problem
Section titled “The Problem”git clone https://github.com/user/repo.gitdocker pull nginx:latestcurl https://api.openai.com/v1/chat/completionsYou might get errors like:
fatal: unable to access 'https://github.com/...': Could not resolve host: github.comError response from daemon: ... dial tcp: lookup registry-1.docker.io: no such hostcurl: (6) Could not resolve host: api.openai.comThis happens because GitHub, Docker Hub, OpenAI, and many developer services still don’t support direct IPv6 connections (as of June 2026).
Solution 1: GitHub via IPv6 Proxy
Section titled “Solution 1: GitHub via IPv6 Proxy”Route traffic to GitHub through an IPv6 proxy — a server that accepts IPv6 and forwards to GitHub over IPv4. Add mappings to /etc/hosts.
Choose a Proxy
Section titled “Choose a Proxy”Best for VPS on TransIP / SandboxVPS.
2a01:7c8:7c8::1337 github.com2a01:7c8:7c8::1337 api.github.com2a01:7c8:7c8::1337 codeload.github.com2a01:7c8:7c8::1337 objects.githubusercontent.com2a01:7c8:7c8::1337 raw.githubusercontent.comPublic proxy with full GHCR, Packages & Assets support.
# Core services2a01:4f8:c010:d56::2 github.com2a01:4f8:c010:d56::3 api.github.com2a01:4f8:c010:d56::4 codeload.github.com# GitHub Container Registry2a01:4f8:c010:d56::6 ghcr.io# GitHub Packages2a01:4f8:c010:d56::7 pkg.github.com npm.pkg.github.com maven.pkg.github.com nuget.pkg.github.com rubygems.pkg.github.com# Uploads2a01:4f8:c010:d56::8 uploads.github.com# Assets & CDN (GitHub's native IPv6)2606:50c0:8000::133 objects.githubusercontent.com release-assets.githubusercontent.com gist.githubusercontent.com repository-images.githubusercontent.com camo.githubusercontent.com avatars.githubusercontent.com cloud.githubusercontent.com support.github.com2606:50c0:8000::154 github.githubassets.com opengraph.githubassets.com github-registry-files.githubusercontent.com github-cloud.githubusercontent.comsudo nano /etc/hosts# Paste entries at the end → CTRL+X → Y → Entercurl -I https://github.com 2>&1 | head -5git clone https://github.com/Adekabang/docs-8labs.git- Start →
Notepad→ right-click → Run as Administrator - File → Open →
C:\Windows\System32\drivers\etc\hosts - Paste entries → Save (CTRL+S)
Solution 2: Docker Hub via IPv6 Endpoint
Section titled “Solution 2: Docker Hub via IPv6 Endpoint”Docker Hub provides a dedicated IPv6 beta endpoint: registry.ipv6.docker.com.
Login & Pull
Section titled “Login & Pull”docker login registry.ipv6.docker.com
# Official images (use "library/" prefix)docker pull registry.ipv6.docker.com/library/ubuntu:latestdocker pull registry.ipv6.docker.com/library/nginx:latest
# User imagesdocker pull registry.ipv6.docker.com/storjlabs/watchtower:latestDockerfile
Section titled “Dockerfile”FROM registry.ipv6.docker.com/library/node:20-alpineWORKDIR /appCOPY . .RUN npm installCMD ["node", "index.js"]Mirror (optional)
Section titled “Mirror (optional)”Set up a daemon mirror to avoid prefixing every pull:
{ "registry-mirrors": ["https://registry.ipv6.docker.com"]}sudo systemctl restart dockerNow docker pull nginx:latest works without any prefix.
Solution 3: NAT64 + DNS64
Section titled “Solution 3: NAT64 + DNS64”A universal solution — DNS64 automatically translates IPv4 addresses to IPv6, letting your VPS reach the entire IPv4 internet.
Google DNS64
Section titled “Google DNS64”nameserver 2001:4860:4860::6464nameserver 2001:4860:4860::64sudo nano /etc/resolv.conf# Replace nameserver entries with lines aboveSolution 4: LLM APIs — Native IPv6, OpenRouter Gateway & NAT64
Section titled “Solution 4: LLM APIs — Native IPv6, OpenRouter Gateway & NAT64”Most LLM API providers support IPv6 natively (via Cloudflare or their own infrastructure). The major exception is OpenAI (api.openai.com), which has no AAAA record and cannot be reached directly from an IPv6-only VPS.
IPv6 Support per Provider (June 2026)
Section titled “IPv6 Support per Provider (June 2026)”| Provider | Endpoint | IPv6 | Via | Workaround |
|---|---|---|---|---|
| OpenAI | api.openai.com | ❌ No | — | OpenRouter proxy or NAT64 |
| Anthropic | api.anthropic.com | ✅ Yes | Native | None needed |
| Google Gemini | generativelanguage.googleapis.com | ✅ Yes | Native | None needed |
| OpenRouter | openrouter.ai | ✅ Yes | Cloudflare | None needed |
| Groq | api.groq.com | ✅ Yes | Cloudflare | None needed |
| DeepSeek | api.deepseek.com | ✅ Yes | CloudFront | None needed |
| Mistral | api.mistral.ai | ✅ Yes | Native | None needed |
| Perplexity | api.perplexity.ai | ✅ Yes | Cloudflare | None needed |
| Together AI | api.together.xyz | ✅ Yes | Cloudflare | None needed |
| Fireworks | api.fireworks.ai | ✅ Yes | Cloudflare | None needed |
Option A: OpenRouter as Gateway (Simplest for OpenAI)
Section titled “Option A: OpenRouter as Gateway (Simplest for OpenAI)”OpenRouter has native IPv6 and proxies all models — including every OpenAI model. No NAT64 or proxy needed.
# Replace api.openai.com with openrouter.aicurl https://openrouter.ai/api/v1/chat/completions \ -H "Authorization: Bearer *** \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-4o", "messages": [{"role": "user", "content": "Hello from IPv6-only VPS"}] }'# Python example using openai package — point to OpenRouterfrom openai import OpenAI
client = OpenAI( base_url="https://openrouter.ai/api/v1", api_key="sk-or-***",)response = client.chat.completions.create( model="openai/gpt-4o", messages=[{"role": "user", "content": "Hello"}],)print(response.choices[0].message.content)OpenRouter model list shows all available models with their id prefix (openai/, anthropic/, google/, etc.).
Option B: NAT64 + DNS64 (Universal)
Section titled “Option B: NAT64 + DNS64 (Universal)”If you need direct access to OpenAI’s API (e.g., for Assistants API, fine-tuning endpoints, or compliance), use NAT64. Configure DNS64 as shown in Solution 3, then:
# Now works — DNS64 translates api.openai.com to IPv6curl https://api.openai.com/v1/chat/completions \ -H "Authorization: Bearer *** \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o", "messages": [{"role": "user", "content": "Hello"}] }'Option C: Call IPv6-Native Providers Directly
Section titled “Option C: Call IPv6-Native Providers Directly”For providers that already have IPv6, just use their native endpoints — no workaround needed:
# Anthropic — works directlycurl https://api.anthropic.com/v1/messages \ -H "x-api-key: sk-ant-*** \ -H "anthropic-version: 2023-06-01" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-sonnet-4-20250514", "max_tokens": 256, "messages": [{"role": "user", "content": "Hello"}] }'
# Groq — works directlycurl https://api.groq.com/openai/v1/chat/completions \ -H "Authorization: Bearer *** \ -H "Content-Type: application/json" \ -d '{ "model": "llama-3.3-70b-versatile", "messages": [{"role": "user", "content": "Hello"}] }'Verification
Section titled “Verification”# GitHubcurl -I https://github.com 2>&1 | head -3git ls-remote https://github.com/Adekabang/docs-8labs.git
# Docker Hubdocker pull registry.ipv6.docker.com/library/hello-world:latestdocker run --rm hello-world
# LLM APIscurl -s https://openrouter.ai/api/v1/models | head -c 200curl -s https://api.anthropic.com/ 2>&1 | grep -o "Anthropic"curl -6 -s -o /dev/null -w "%{http_code}" https://generativelanguage.googleapis.com/Troubleshooting
Section titled “Troubleshooting”| Issue | Solution |
|---|---|
git push fails via HTTPS | Use a Personal Access Token (PAT), not password |
SSH [email protected] still fails | Switch remote to HTTPS: git remote set-url origin https://github.com/user/repo.git |
| Docker pull keeps timing out | Pull directly: docker pull registry.ipv6.docker.com/library/<image> |
curl succeeds but git fails | Check .gitconfig for conflicting proxy settings |
| Proxy slow / times out | Try an alternate proxy or NAT64 |
curl: (6) Could not resolve host: api.openai.com | Use OpenRouter gateway or enable NAT64/DNS64 (Solution 3) |
OpenRouter returns 401 Unauthorized | Verify API key — OpenRouter uses sk-or- prefix, not OpenAI keys |
Python openai package fails on IPv6-only | Set base_url="https://openrouter.ai/api/v1" or configure DNS64 |
openai Assistants API / fine-tuning not on OpenRouter | Use NAT64/DNS64 for direct api.openai.com access |
References
Section titled “References”- DanWin1210 GitHub IPv6 Proxy
- TransIP: Docker Hub IPv6 Support
- TransIP: Using GitHub IPv6 Proxy
- Running Docker on IPv6-only Host
- Docker Docs: IPv6 Beta Support
- OpenRouter API Docs
- OpenAI Community: IPv6 Support Thread — search “IPv6” for latest status
- Google DNS64
Community Resources
Section titled “Community Resources”- So you got an IPv6-only VPS? — Practical blog with NAT64 setup and service compatibility experiences
- How to get IPv4 connectivity on an IPv6 only VPS — GitHub Gist covering NAT64, DNS64, and proxy workarounds
- OpenAI API endpoint does NOT support IPv6 — r/ipv6 discussion confirming the IPv6 gap and sharing solutions