3

I'm using SOCKS5 over ssh. All works fine, however, when I check my public IP address, I see this is an IPv6 address (The machine I'm connecting to has both IPv4 and IPv6 addresses). If I understand this correctly this is the responsibility of sshd_config on the server I'm using for SOCKS, right? Is it possible somehow to force this to use IPv4 address?

Jakuje
  • 24,773
  • 12
  • 69
  • 75
Tomas Kulich
  • 14,388
  • 4
  • 30
  • 35
  • *"I see this is an IPv6 address"* ... how, where? – Jakuje Sep 04 '16 at 08:38
  • When I check https://www.whatismyip.com/ (in my local browser) I see server's IPv6 address. – Tomas Kulich Sep 04 '16 at 12:16
  • It is a browser, what is connecting using the IPv6 address. – Jakuje Sep 04 '16 at 21:29
  • How come? My computer does not even have any IPv6 address (I disabled this on system level). – Tomas Kulich Sep 05 '16 at 14:08
  • But the browser does DNS queries over the SOCKS5, gets AAAA records and connects over the socks to the IPv6 addresses. It is not using system networking stack. – Jakuje Sep 05 '16 at 14:10
  • 1
    Firefox has an option to disable IPv6 in the browser. In `about:config` search for `network.dns.disableIPv6`. http://kb.mozillazine.org/Network.dns.disableIPv6 Also if you have control over the ssh server you could alter the config to prefer IPv4 only. The directive is `AddressFamily` and the values are `any`, `inet` (IPv4), `inet6` (IPv6). http://man.openbsd.org/sshd_config – zloster Mar 28 '17 at 15:32

1 Answers1

1

What you can try to do is force SSHD into the IPv4 only mode, by setting:

AddressFamily inet

in your sshd_config

AddressFamily

Specifies which address family should be used by sshd(8). Valid arguments are ''any'', ''inet'' (use IPv4 only), or ''inet6'' (use IPv6 only). The default is ''any''.

man sshd_config (OpenSSH)

Community
  • 1
  • 1
zeppelin
  • 8,947
  • 2
  • 24
  • 30