2

I need to use socks proxy in Firefox on my laptop, using ssh tunnel to server

On my laptop, I set socks proxy in firefox, and connect to server:

ssh server -D1234

When I visit any website in firefox, the proxy works, but I get these errors:

on laptop (in the console where I started ssh)

channel 15: open failed: connect failed: Address family for hostname not supported

on server (in syslog):

sshd: error: connect_to ff00::: unknown host (Address family for hostname not supported)

this looks like firefox is trying to use IPv6. But I have no IPv6 support either on laptop or on server. And I have explicitly disabled IPv6 in firefox, by setting network.dns.disableIPv6 to true.

As said, everything works. But I am just bothered by the flood of error messages.

How can I prevent Firefox from even attempting to use IPv6, or if that is not possible, to get rid of the error messages on both laptop and server.

The laptop is running Debian 12, and server is running Debian 10. Both have custom linux kernel, without IPv6 support.

1 Answer 1

3
+125

Based on the error messages, I think the culprit here is the sshd on your server. Did you configure it to run only on ipv4?

To force your sshd to use ipv4 you need to configure it with your sshd_config with:

...

AddressFamily inet

...

To completely disable ipv6 on your server you can issue these command: echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6

Next would be to edit /etc/sysctl.conf:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

Then reload it with: sysctl -p

2
  • yes, exactly. I have AddressFamily inet and my kernel does not have IPv6 support Commented May 24 at 17:25
  • 1
    @MartinVegter You already have this in place? Then force the client to use only ipv4 with: ssh -4 server -D1234
    – tukan
    Commented May 25 at 7:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .