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
git clone https://github.com/user/repo.git
docker pull nginx:latest
curl https://api.openai.com/v1/chat/completions
You might get errors like:
fatal: unable to access 'https://github.com/...': Could not resolve host: github.com
Error response from daemon: ... dial tcp: lookup registry-1.docker.io: no such host
curl: (6) Could not resolve host: api.openai.com
This 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
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
- TransIP
- DanWin1210 (Public)
Best for VPS on TransIP / SandboxVPS.
2a01:7c8:7c8::1337 github.com
2a01:7c8:7c8::1337 api.github.com
2a01:7c8:7c8::1337 codeload.github.com
2a01:7c8:7c8::1337 objects.githubusercontent.com
2a01:7c8:7c8::1337 raw.githubusercontent.com
Public proxy with full GHCR, Packages & Assets support.
# Core services
2a01:4f8:c010:d56::2 github.com
2a01:4f8:c010:d56::3 api.github.com
2a01:4f8:c010:d56::4 codeload.github.com
# GitHub Container Registry
2a01:4f8:c010:d56::6 ghcr.io
# GitHub Packages
2a01:4f8:c010:d56::7 pkg.github.com npm.pkg.github.com maven.pkg.github.com nuget.pkg.github.com rubygems.pkg.github.com
# Uploads
2a01: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.com
2606:50c0:8000::154 github.githubassets.com opengraph.githubassets.com github-registry-files.githubusercontent.com github-cloud.githubusercontent.com
Apply
- Linux
- Windows Server
sudo nano /etc/hosts
# Paste entries at the end → CTRL+X → Y → Enter
curl -I https://github.com 2>&1 | head -5
git 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)
- SSH: Proxy only works for HTTPS. Use HTTPS remotes or set up an SSH proxy jump for
[email protected]. - Rate limiting: Public proxies hit rate limits faster — use a PAT for authenticated requests.
Solution 2: Docker Hub via IPv6 Endpoint
Docker Hub provides a dedicated IPv6 beta endpoint: registry.ipv6.docker.com.
Login & Pull
docker login registry.ipv6.docker.com
# Official images (use "library/" prefix)
docker pull registry.ipv6.docker.com/library/ubuntu:latest
docker pull registry.ipv6.docker.com/library/nginx:latest
# User images
docker pull registry.ipv6.docker.com/storjlabs/watchtower:latest
Dockerfile
FROM registry.ipv6.docker.com/library/node:20-alpine
WORKDIR /app
COPY . .
RUN npm install
CMD ["node", "index.js"]
Mirror (optional)
Set up a daemon mirror to avoid prefixing every pull:
{
"registry-mirrors": ["https://registry.ipv6.docker.com"]
}
sudo systemctl restart docker
Now docker pull nginx:latest works without any prefix.
Solution 3: NAT64 + DNS64
A universal solution — DNS64 automatically translates IPv4 addresses to IPv6, letting your VPS reach the entire IPv4 internet.
Google DNS64
nameserver 2001:4860:4860::6464
nameserver 2001:4860:4860::64
sudo nano /etc/resolv.conf
# Replace nameserver entries with lines above
NAT64 only works for outbound connections. You cannot expose services to the IPv4 internet this way.
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)
| 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)
OpenRouter has native IPv6 and proxies all models — including every OpenAI model. No NAT64 or proxy needed.
# Replace api.openai.com with openrouter.ai
curl 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 OpenRouter
from 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.).
OpenRouter also supports Anthropic, Google, Meta, DeepSeek, and 200+ models — all from a single IPv6 endpoint. Great as a single gateway from IPv6-only infrastructure.
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 IPv6
curl 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
For providers that already have IPv6, just use their native endpoints — no workaround needed:
# Anthropic — works directly
curl 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 directly
curl 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
# GitHub
curl -I https://github.com 2>&1 | head -3
git ls-remote https://github.com/Adekabang/docs-8labs.git
# Docker Hub
docker pull registry.ipv6.docker.com/library/hello-world:latest
docker run --rm hello-world
# LLM APIs
curl -s https://openrouter.ai/api/v1/models | head -c 200
curl -s https://api.anthropic.com/ 2>&1 | grep -o "Anthropic"
curl -6 -s -o /dev/null -w "%{http_code}" https://generativelanguage.googleapis.com/
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
- 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
- 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