3 ms·
I have a dedicated server on Hetzner where I choose not to pay for IPv4 connectivity. Using only IPv6 works fine most of the time but in 2022 there are still s
by osivertsson 4y ago
I have a dedicated server on Hetzner where I choose not to pay for IPv4 connectivity.
Using only IPv6 works fine most of the time but in 2022 there are still some services that are available only through IPv4, like GitHub.
However, I have both IPv4 and IPv6 connectivity from the places I connect to my server. Could I use that to get IPv4 connectivity on the server when I need it?
The answer is yes of course, and here is one way to do just that.
Replace dedicated-server-hostname with your server hostname or IP.
laptop> cat ~/.ssh/config
Host dedicated-server-hostname
RemoteForward 1080
laptop> ssh username@dedicated-server-hostname
server> cat ~/.gitconfig
...
# Using git on an IPv6 only machine that needs to access git repos only
# available through IPv4, e.g. github.com. The workaround is to use the
# network on the machine we connect from.
#
# This can be done by setting up a SOCKS proxy when connecting to the IPv6 only
# machine over ssh, see RemoteForward in ssh_config(5).
[http "https://github.com"]
proxy = socks5h://localhost:1080
- albru123 4y agoWe just ended up buying /28 subnet, because the whole v6 to v4 experience was too frustrating and would've probably cost more to solve all the issues (or hire someone who knew how to set it up properly) than to buy the subnet.
- staringback 4y agoAs time progresses the cost will flip to the other direction
- ses1984 4y agoSome time between now and the heat death of the universe.
- blibble 4y agoapparently they have a nat64 gateway... so it should work if you configure it properly check their help docs