Etc/hosts file entries

Using etc/hosts file we can limit particular web site entering our system with

127.0.0.1 www.cybertech.com 127.0.0

. Then this useless web site will not load in browser.

But at the same time if i would like to prioritize a web site www.cgtn.com as my home web site and if it should have highest priority, by passing all other hops, what should i do?

127.0.0.1 www.cgtn.com ??

127.0.0.1 www.alpix.eu ??

How do i prioritize endeavour OS servers in /etc/hosts file?
Many times endeavour OS servers are not reachable.
Since EOS current rule prevents arch linux servers loading before EOS, i can not download archlinux updates.

Are you having issues with updating your system?

Perhaps you would need to reorder servers in your mirrorlists in /etc/pacman.d.

3 Likes

It is an issue with ISP. They are somehow blocking connections to EU servers in routing.If we expunge network connections few times the update starts. Not an issue with server list and its order.

Though secure, we have a disadvantage with DNS over TLS.
If ISP has rouges, they can conveniently block some web sites and ip addresses. Which is not the case with DNS over https.
ISP is full of rogues,and they are doing it. Here everyone makes big bang on 8.8.8.8 and 8.8.4.4. So they don’t like someone missing their spy network of DNS servers

Hence i am looking for an option to prioritize a url("mirror.alpix.eu " etc) in etc/hosts file, bypassing intermediate hops of ISP routers which are a kind of hurdle.

DOH and DOT are kind of useless…
As I see it, all they do is to cause problems for network administrators.

There is a SNI header that defeats all the DOH and DOT thing if you know where to look it…

image

1 Like

/etc/hosts only translates names into IPs. It won’t have any impact on routing.

If you want to prioritize which mirrors get used first, you can do that in the mirror list files in /etc/pacman.d/

2 Likes

In the situation you described in several threads here, I would recommend for you to make yourself familiar with dnscrypt-proxy:

https://wiki.archlinux.org/title/Dnscrypt-proxy

1 Like

If they were really blocking EU IPs, you couldn’t make it work.

You mean you can’t use other DNS servers such as Cloudflare (1.1.1.1) or Quad9 (4.4.4.4) ?
You can install your own local DNS resolver like Unbound on your computer.

1 Like