r/voidlinux • • 15d ago

/etc/hosts concern

after running [hblock] to create a [hosts] file, I get some weird behaviour when running [rustnet].

[rustnet] with default void [/etchosts] uses 0.0.0.0:68 for [bootpc]

remote                                  local
0.0.0.0:68                              bcast:67              bootpc     UDP·DHCP REQUEST

[rustnet] with hblock [/etchosts] will choose the first blocked entry uses -084-gls-223-www-9-k-0brasil.net.da…:68 for [bootpc]:

remote                                                                     local                                    
-084-gls-223-www-9-k-0brasil.net.da…:68 bcast:67              bootpc     UDP·DHCP REQUEST

Is this normal with /etc/hosts populated with a blocklist?

6 Upvotes

5 comments sorted by

1

u/weaklingoverlord 15d ago

hblock uses

0.0.0.0 -084-gls-223-www-9-k-0brasil.net.daraz.com

for the blocked list entries

if I change the first entry to:

127.0.0.1 -084-gls-223-www-9-k-0brasil.net.daraz.com

then rustnet reports the same result as with the default void hosts file.

Anyone kind enough to explain like I'm 55?

2

u/bongbongyeah 14d ago

0.0.0.0 is a placeholder for all available ip's on the host, whereas 127.0.0.1 specifically is a loopback to the host device.
Idk if that is the answer to your question or completely missing the point.

1

u/hubabuba44 7h ago

Hi RustNet author here. There is nothing to worry about! When DHCP (bootpc) sends a request from 0.0.0.0:68, rustnet runs a reverse lookup on 0.0.0.0 and your system just returns the first blocked domain mapped to it in your hblock /etc/hosts file.

That said RustNet shouldn't be reverse-resolving 0.0.0.0 in the first place, so thanks for catching this!

I just put up a fix here which will be released soon in v1.8.0: https://github.com/domcyrus/rustnet/pull/757

1

u/weaklingoverlord 1h ago

Oh wow! Thanks for the feedback and for your contribution to making Linux awesome!

2

u/aedinius 15d ago

That'll happen, it's just a display thing because an entry matches.