Pale Moon ignores /etc/hosts

Support and discussions for the x86/x64 Linux version of Pale Moon.

Moderators: trava90, satrow

peter
New to the forum
New to the forum
Posts: 2
Joined: Sun, 07 Jan 2018, 19:51

Pale Moon ignores /etc/hosts

Unread postby peter » Sun, 07 Jan 2018, 19:59

Hi,
its looking like an old firefox bug: Pale Mone ignores my hosts.

ping and shell are using the host file.

my file:

Code: Select all

127.0.0.1   localhost


The browser is using a search engine instead.

Greetings

User avatar
John connor
Banned user
Banned user
Posts: 553
Joined: Wed, 21 Jan 2015, 05:06

Re: Pale Moon ignores /etc/hosts

Unread postby John connor » Mon, 08 Jan 2018, 02:10

I don't understand what you are saying. Can you be a little more descriptive?

User avatar
SpockFan02
Lunatic
Lunatic
Posts: 460
Joined: Sun, 24 Sep 2017, 16:35

Re: Pale Moon ignores /etc/hosts

Unread postby SpockFan02 » Mon, 08 Jan 2018, 05:18

John connor wrote:I don't understand what you are saying. Can you be a little more descriptive?
It sounds like they've got something set in their hosts file (like a DNS override—I'm not sure of the correct terminology), but they can't access it because Pale Moon doesn't recognize it as an address and thinks it's a search query.

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 4771
Joined: Tue, 09 Oct 2012, 19:37

Re: Pale Moon ignores /etc/hosts

Unread postby New Tobin Paradigm » Mon, 08 Jan 2018, 07:07

so are you typing just 'localhost' in the location bar or 'http://localhost/' ?
Image

== We got to install microwave ovens / Custom kitchen deliveries / We got to move these refrigerators / We got to move these color TVs ==
http://binaryoutcast.com/ | http://thereisonlyxul.org/

User avatar
John connor
Banned user
Banned user
Posts: 553
Joined: Wed, 21 Jan 2015, 05:06

Re: Pale Moon ignores /etc/hosts

Unread postby John connor » Mon, 08 Jan 2018, 08:47

SpockMan02 wrote:
John connor wrote:I don't understand what you are saying. Can you be a little more descriptive?
It sounds like they've got something set in their hosts file (like a DNS override—I'm not sure of the correct terminology), but they can't access it because Pale Moon doesn't recognize it as an address and thinks it's a search query.


In that case it could be that the website doesn't answer to that direct IP. I don't know.

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 4771
Joined: Tue, 09 Oct 2012, 19:37

Re: Pale Moon ignores /etc/hosts

Unread postby New Tobin Paradigm » Mon, 08 Jan 2018, 09:25

You know, John connor .. If you have no idea what is going on.. Then why are you in this thread?

Anyway, when the OP gets back to this thread, I await his answer because if it is the former and not the latter.. That simply isn't going to work.. The location bar goes through several steps to try and get you where you are trying to go.. One of the last steps by default is to send it to search engine..

Now the intermediate steps when you don't write out an fully qualified address is matching to 'domain.tld' obviously 'localhost' does not match a pattern of 'domain.tld'. To bypass the step for keyword (or search term) detection and use an extensionless domain name as defined by a dns server or in this case, hosts.. You have to use a fully qualified address.. Hince, 'http://localhost/'. An additional matching would happen if has a slash at the end or a slash with a uri.. Basically, 'localhost/' or 'localhost/index.html' will be detected as an address and the browser will perform additional fix up.. Like adding the protocol scheme...

So, assuming the former is happening instead of the latter from my original question to the OP.. Pale Moon is NOT ignoring your hosts file... You are simply not aware of how Pale Moon handles non-fully qualified addresses and SpockMan02 is correct but it wasn't the entire story. Still, good on him!

But I await a response.
Last edited by New Tobin Paradigm on Mon, 08 Jan 2018, 09:39, edited 4 times in total.
Image

== We got to install microwave ovens / Custom kitchen deliveries / We got to move these refrigerators / We got to move these color TVs ==
http://binaryoutcast.com/ | http://thereisonlyxul.org/

User avatar
adesh
Astronaut
Astronaut
Posts: 569
Joined: Tue, 06 Jun 2017, 07:38

Re: Pale Moon ignores /etc/hosts

Unread postby adesh » Mon, 08 Jan 2018, 09:40

peter, if you changed "/etc/hosts" while Pale Moon was running, you may need to restart the browser or wait a few minutes before it picks up changes automatically.

Also, as Tobin pointed out typing just "localhost" would, of course, make the browser perform a search. Just adding a slash, i.e. typing "localhost/", would do the trick for you.

User avatar
John connor
Banned user
Banned user
Posts: 553
Joined: Wed, 21 Jan 2015, 05:06

Re: Pale Moon ignores /etc/hosts

Unread postby John connor » Mon, 08 Jan 2018, 14:45

New Tobin Paradigm wrote:You know, John connor .. If you have no idea what is going on.. Then why are you in this thread?



Who the hell said I was talking to you!

Based on what SpockMan02 said, I was implying what might be the cause of the problem. But the damn OP hasn't even responded yet, so who knows what the hell he's asking about.

My thought is that he's added a line in hosts to redirect to a website and that the IP doesn't resolve to that link directly. That's it!

I'm not stupid. I have used and use the hosts file all the time. Especially to temp bypass Cloudflare that's enabled on my site when I need to isolate an issue.
Last edited by John connor on Mon, 08 Jan 2018, 14:49, edited 4 times in total.

User avatar
John connor
Banned user
Banned user
Posts: 553
Joined: Wed, 21 Jan 2015, 05:06

Re: Pale Moon ignores /etc/hosts

Unread postby John connor » Mon, 08 Jan 2018, 14:53

If it's a matter of wanting to go to home sweet home, then enter 127.0.0.1 or http:\\localhost\ But that doesn't make any damn sense. Why call localhost? What is it that you are doing?

Inquiring minds want to know. :lol:
Last edited by John connor on Mon, 08 Jan 2018, 14:54, edited 2 times in total.

peter
New to the forum
New to the forum
Posts: 2
Joined: Sun, 07 Jan 2018, 19:51

Re: Pale Moon ignores /etc/hosts

Unread postby peter » Mon, 08 Jan 2018, 15:03

John connor wrote:My thought is that he's added a line in hosts to redirect to a website and that the IP doesn't resolve to that link directly. That's it!


I run a local webserver at 127.0.0.1/80 and want to call it with localhost or some other names. So ive put the line in the hosts file.
Firefox, ping etc. are using the file. Pale Moon dont. Also with reboot.

New Tobin Paradigm wrote:so are you typing just 'localhost' in the location bar or 'http://localhost/' ?

Thats it! I did the first, and now the second thing. After that, boths is working. Thank you
Last edited by peter on Mon, 08 Jan 2018, 15:04, edited 2 times in total.

User avatar
John connor
Banned user
Banned user
Posts: 553
Joined: Wed, 21 Jan 2015, 05:06

Re: Pale Moon ignores /etc/hosts

Unread postby John connor » Mon, 08 Jan 2018, 15:07

Odd, because when I run Xampp, I just enter localhost/mywebsite. No messing with the hosts file at all.

Hosts file is more or less a way to bypass DNS. Or you can use it to prevent things from making a connection. The old and cumbersome way of blocking ADs. :lol:


127.0.0.1/80


This is a very odd CIDR. :D
Last edited by John connor on Mon, 08 Jan 2018, 15:10, edited 2 times in total.

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 4771
Joined: Tue, 09 Oct 2012, 19:37

Re: Pale Moon ignores /etc/hosts

Unread postby New Tobin Paradigm » Mon, 08 Jan 2018, 16:36

Off-topic:
John connor wrote:Who the hell said I was talking to you!


Welp.. I tried.. A shame really.. Oh well.

As an addendum.. When you post on a public forum.. Expect anyone to start addressing you.. Or do you actually believe that you can have a private one-on-one conversation on a public forum. Surprise, it doesn't work that way.. Also, I shall speak to anyone I see fit no matter if they were talking to me or not.

I only asked, why you were posting in a thread when you have no idea, and I actually did, of what was going on or possibly what was going on. Just because someone posts something and you read it, it does not mean they were talking to you.. "I don't know posts" are not helpful and that is what your post was.. At most it contained only a thinly veiled request for clarification.. Perhaps, you should reconsider how you respond to such situations.

John connor wrote:I'm not stupid.


K.
Last edited by New Tobin Paradigm on Mon, 08 Jan 2018, 16:38, edited 1 time in total.
Image

== We got to install microwave ovens / Custom kitchen deliveries / We got to move these refrigerators / We got to move these color TVs ==
http://binaryoutcast.com/ | http://thereisonlyxul.org/

doffen
Apollo supporter
Apollo supporter
Posts: 33
Joined: Thu, 20 Apr 2017, 12:21

Re: Pale Moon ignores /etc/hosts

Unread postby doffen » Tue, 09 Jan 2018, 03:09

Please mind your language, gentlemen!

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 4771
Joined: Tue, 09 Oct 2012, 19:37

Re: Pale Moon ignores /etc/hosts

Unread postby New Tobin Paradigm » Tue, 09 Jan 2018, 10:08

doffen wrote:Please mind your language, gentlemen!


https://forum.palemoon.org/app.php/rules#foul-language wrote:Please mind your language. No excessive swearing or cursing.
Although we will not be policing your use of language, since everyone here is assumed to be of an adult and tolerant mindset, and using swear words here and there is just fine, we will take action if your use of such language is excessive, uncalled-for, or otherwise considered by staff to not be suited for general public digestion.


So unless it is a special case like a syndicated or global announcement a couple of hells and a damn doesn't mean shit dude..

However, we ALL at this point should be mindful of the rules about staying on topic.. So let's do that. ;)
Last edited by New Tobin Paradigm on Tue, 09 Jan 2018, 10:08, edited 1 time in total.
Image

== We got to install microwave ovens / Custom kitchen deliveries / We got to move these refrigerators / We got to move these color TVs ==
http://binaryoutcast.com/ | http://thereisonlyxul.org/

BenFenner
Fanatic
Fanatic
Posts: 146
Joined: Mon, 01 Jun 2015, 12:52
Location: US Southeast

Re: Pale Moon ignores /etc/hosts

Unread postby BenFenner » Tue, 09 Jan 2018, 15:48

I've been using a handful of hosts file entries here at work to make sure I don't visit sites by habit that I'd prefer to access only at home.
I tested one just now, and Pale Moon is still respecting the hosts file.

I will say one other thing though, in case this matters.
I always set up the Pale Moon location bar to "do one thing, and do it well". I turn off all search capability of the location bar (mine doesn't search bookmarks, the web, etc.) and then I turn off 'keyword' capability in about:config, as well as any prefix or suffix malarkey that it wants to try to add. If I wanted a "www." in front of my requested location I'd have typed it. If I want a ".com" at the end of my requested location I'd have typed that in too.

So, to summarize, my hosts file is being honored (but it might be because of default "features" I've turned off).

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 4771
Joined: Tue, 09 Oct 2012, 19:37

Re: Pale Moon ignores /etc/hosts

Unread postby New Tobin Paradigm » Tue, 09 Jan 2018, 17:29

It isn't EVEN a matter of it being honored by Pale Moon.. The NETWORKING Stack of the OS is what respects hosts or not.. Not Pale Moon. So this entire honor/dishonor/ignores question is wrong in its very concept. Address fixup, keywords, and search are expected functions for a web browser for the past 10+ years.. Of course it is getting worse in more "Modern" browsers but whatever.. But as you said, you can switch them off.. But you cannot blame mechanisms meant to help users who can't be bothered to type a fully qualified address from fucking up in an edge case like accessing localhost or a resource that doesn't follow public internet address structure of 'domain.tld'.
Image

== We got to install microwave ovens / Custom kitchen deliveries / We got to move these refrigerators / We got to move these color TVs ==
http://binaryoutcast.com/ | http://thereisonlyxul.org/


Return to “Pale Moon for Linux”

Who is online

Users browsing this forum: No registered users and 7 guests