大网数据广告活动
服务器运维问答

Use IPv4 on IPv6-only machine (through SSH tunnel?)

· 52CE 我爱测

Our non-IT company uses a IPv4-only webservice which only allows access from our (whitelisted) IPv4 ip. This ip is assigned to one of our VPSes (this VPS also has a IPv6 assigned to it). We usually SSH tunnel from other IPv4 mach…

问题原文

原帖链接 · Rick · CC BY-SA 4.0

Our non-IT company uses a IPv4-only webservice which only allows access from our (whitelisted) IPv4 ip. This ip is assigned to one of our VPSes (this VPS also has a IPv6 assigned to it).

We usually SSH tunnel from other IPv4 machines in to this VPS and use the ip address via the proxy settings in Firefox. This works exactly how we want it, but not on our IPv6-only machines. These can SSH tunnel in to the VPS with it's IPv6 address, but then we can only use the IPv6 of the VPS and not the IPv4.

Is there any way to use the IPv4 from this VPS, and maybe use the VPS as a intermediate server to 'translate' the requests? We prefer a tunnel-like solution but every possible tool is allowed if it helps us to achieve our goal.

We already tried most ways of setting up a ssh connection (ssh & sshuttle) and also did things with socat, but haven't had luck yet and most solutions we find are about turning IPv4 into IPv6, not IPv6 to IPv4.

已采纳解答

原帖链接 · Piotr P. Karwasz · CC BY-SA 4.0

Let's draft a more comprehensive explanation if the problem should affect also other people. The OP is connecting to the web through a SOCKS5 proxy established with:

ssh -D <local_port>

Unfortunately there is a Firefox bug, which doesn't allow IPv6-only hosts to connect to an IPv4 address using the proxy. They must enable DNS proxying too.

In the other direction, IPv4-only hosts can connect to an IPv6 address using the proxy.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-11-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。