I need to override the name resolution for a given domain name for testing purposes in my browser (Firefox) on Ubuntu, so that when I write "www.agivendomain.org", it will point to a given IP that I decide, instead of resolving via DNS.
I already tried editing the /etc/hosts file, but it doesn't work. It does work when I ping the domain from the terminal, but Firefox seems to ignore it. I also flushed and disabled Firefox's DNS cache with no luck. It seems Firefox simply does not look at /etc/hosts and always resolves the domain name by asking the DNS.
What am I missing?
I've found similar questions like "how do I override DNS in Firefox" to which the usual answer is "use /etc/hosts", then the poster usually replies "I don't want to use /etc/hosts for this or that reason" - well I would be perfectly fine with using /etc/hosts but what nobody says is it just doesn't work for Firefox...