I have a few different PHP sites running on local domains (i.e. domains set to 127.0.0.1 in /etc/hosts) so I can work on them without any network delay.
I'd like to be able to work on these sites when I have no connection at all (e.g. on the bus or in the park) but my browser (Firefox on LinuxMint) can't load the local pages when there's no network connection (it doesn't have to have Internet access, but it must have a working network connection). Note that it can load a site via local IP addresses or "localhost", but not using any other local domain name.
I'd like to create some kind of local network that makes the Network Manager show a valid connection even when there is no LAN adapter present. Or alternatively a way to make Firefox work with the local domains without needing the network would be just as good.
Reproduce this problem as follows:
- Run a local web-server such as micro_httpd and serve a test site
- Set up some other names for 127.0.0.1 in addition to localhost in your /etc/hosts file such as foo.bar
- Test that your site works from localhost and from foo.bar
- Unplug your network cable
- Test again, only localhost works, not foo.bar
- Test with wget, both work fine
If you have logged on to a Windows machine as a domain user at least once, you can logon to that machine again even if the machine no longer has a network connection.
Check the DNS servers that your local PCs are using. Switch them temporarily to a different set, such as OpenDNS or Google and see if that solves the problem. If it does, then you know there's a DNS issue. If your local PCs are getting DHCP from the modem, then they're probably getting DNS from the modem as well.
Navigate to System and Security, and then click System. Under Computer name, domain, and workgroup settings, click Change settings. Under the Computer Name tab, click Change. Under Member of, click Domain, type the name of the domain that you wish this computer to join, and then click OK.
Restart the computer that you are trying to join to the domain to make sure that there are no latent connections to any of the domain servers. When you type the domain name, make sure that you type the DNS name and not the NetBIOS name. The error may be transient. Try again later.
I have the same issue. Either of these work for me, in Firefox go to about:config
and click I'll be careful, I promise!
, search for network.dns
then either:
network.dns.disableIPv6
to false
or
network.dns.localDomains
I think the latter is probably the better of the two options, but either works for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With