this post was submitted on 01 Dec 2024
9 points (100.0% liked)

techsupport

2497 readers
6 users here now

The Lemmy community will help you with your tech problems and questions about anything here. Do not be shy, we will try to help you.

If something works or if you find a solution to your problem let us know it will be greatly apreciated.

Rules: instance rules + stay on topic

Partnered communities:

You Should Know

Reddit

Software gore

Recommendations

founded 2 years ago
MODERATORS
 

This is a really weird problem that I can't seem to track down further. Perhaps a creative person could suggest some test ideas. Here are the facts:

  • Firefox "Unable to connect" to my LAN server (a router) at 192.168.0.2 port 80.
  • Network error is specifically "NS_CONNECTION_REFUSED".
  • Wireshark on a Raspberry Pi placed between the laptop and server shows no packets exchanged trying to connect. Any packet containing 192.168.0.2, any port.
  • Chrome and Safari work just fine on the same machine. I can see the packets in Wireshark. This validates my test setup works.
  • Curl works, loads the web page. I can see the packets.
  • I have reinstalled, refreshed, removed all extensions, cleared all history and cookies in Firefox and still cannot load the page.
  • Firefox in Safe Mode cannot load the page.
  • Disabled DNS over HTTPS, made sure No Proxy is selected in network settings. Still cannot load the page.
  • Disabled IPv6 in Firefox with about:config setting. Still fails.
  • I have no security software installed of any kind on this Mac. No antivirus or firewall except the default OS one.
  • Turned off Mac built-in Firewall. Still unable to connect.

Why is Firefox apparently refusing to connect to my server? Other LAN IP addresses work fine, even local ones. It specifically hates this one.

you are viewing a single comment's thread
view the rest of the comments
[–] Dragomus 3 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

I once had a similar issue (but not fully the same), alas I forgot how I fixed it.

Some suggestions:

  • Any mention of *.0.2 in your host file? FF might read it differently from other programs
  • if nothing there perhaps you can add a link to *.0.2 in the host file?
  • clear the dns cache etc via ipconfig in a command prompt
  • Firefox proxy settings, set something else, close ff, open it again then revert to no proxy
  • Disable the FF safebrowsing thing (forgot the name and can't currently check)
  • Disable FF secure dns features, don't let firefox choose one nor set a custom one, just put it on isp provided only <- also, use this one in windows tcp/ip settings, not a google one etc.
  • is the subnet mask set correctly? If behind a switch and 2nd network/NAT
  • make a new empty FF profile and try the adress from there

Percussive maintenance? ;-)

Hope you get it resolved.

[–] [email protected] 4 points 3 weeks ago (2 children)

You are a god. For mysterious reasons, having this IP in my hosts file breaks loading the page. Removing it from hosts restores access. I have no idea why Firefox would care about this because I'm not trying to access the page by name, but by IP address. My best guess is there's some sort of bug relating to handling of hosts file entries.

[–] [email protected] 2 points 3 weeks ago

I found this answer, but I still don't understand what's going on and why this network.trr.exclude-etc-hosts might be useful.

[–] Dragomus 2 points 2 weeks ago

Haha thanks :-)

I vaguely remembered an issue with a host file that firefox blocked instead of rerouted. Never did get to submit a bug report for it I think, hmm.

Glad I could help you resolve it.