Enable "Proxy DNS when using SOCKS5" in Firefox

2024 Oct 22

When using a SOCKS proxy in Firefox, enabling ‘Proxy DNS when using SOCKS v5’ under Network Settings can help resolve some network issues. Without this option enabled, Firefox may fail to connect to sites like google.com when accessed from mainland China, likely due to DNS pollution.

在Firefox里配置SOCKS代理时,记得钩上“使用SOCKS v5时代理DNS查询”。否则,Firefox在访问google.com等网站时很有可能失败, 特别是从中国大陆访问这些站点时。

Proxy DNS when using SOCKS v5

Sharing SSH Tunnels Across a Local Network

2024 Oct 22

Run below command on machine A. It starts a SOCKS server listening on the port 8080, and forwards all traffic to that SOCKS server to the remote host, over the secure channel.

  # ssh -C -D :8080 -N <username>@<remote-host>
  ssh -C -D :8080 -N test_user@1.2.3.4

Note the value of the -D option, :8080, which is prefixed with a :. -D :8080 means the listening port is bound to all interfaces of machine A, not just to localhost.

Other machines in the same local network now can access that SOCKS proxy using the IP address of machine A.

Also configure the network settings on machine A to use a fixed IP address, so that other machines don’t have to update the SOCKS proxy IP often. (Choose “Using DHCP with manual address” in MacOS Network settings.)

This is a workaround to fix the broken SSH tunneling after I upgraded my Mac to MacOS 15.0 Sequoia.