On a generic POSIX-like system in order to give a system an alias that is not provided by the upstream DNS-server you would modify the etc/hosts file. eg. you include something like this at the end:
255.255.255.255 somecoolsitethatisnotpublicyavialablebythisnameyet.com
where 255.255.255.255 is the IP-adres of a server responding with the intended website of the not yet published alias of said website.
On whonix modifying the etc/hosts file does not give the expected result. This holds true for modifications to either the workstation or gateway machine. I am sure this has something to do with the insulation of these virtual machines from the DNS of the host machine, which, of course, is a good feature. However to get the desired result I would like to know how whonix handles these matters i.e. I would like to know which file I have to modify to include a entry such as the one from my example.
letscallmejack:
I am sure this has something to do with the insulation of these virtual machines from the DNS of the host machine
Unrealted.
Many applications are preconfigured to talk to Tor directly for stream
isolation.
What that is and how to disable, see:
/etc/hosts is only used in case of system default (/ fallback /
non-socksified / transparent torifification) traffic.
Thanks for your reply. Turns out things are a little bit more complex then I was thinking. Would it be possible to achieve the desired result without disabling some features and/or decreasing anonymity.
According to the wiki, there are actually multiple methods of routing traffic through tor i.e. socks and the awt-wrapper. I basically only need to be able to use the proposed configuration for the Tor browser (although wget would be handy to). Does this make things easier?
Patrick’s explanation might be easier to understand with a concrete example.
If you install a fresh copy of firefox-esr
, it is not stream-isolated by default, meaning that it will check your /etc/hosts table before sending out traffic. Stream-isolated programs (wget, curl, apt-get, etc) are routed straight to Whonix-Gateway by ip:port where they are then processed by the tor daemon. There is no opportunity to do a local hosts lookup. So if you want to check /etc/hosts, you need to un-torrify un-socksify the relevant app.
1 Like
For understanding, the /Easy
version of the article:
To disable:
Just follow the documentation for Tor Browser from above link then… But…
No. Technically limitations. You cannot have it both ways.
-
- use Whonix default configuration plus
-
- have /etc/hosts being used
Basically Tor Browser is talking directly to Tor. So you need to add the filtering directly into Tor Browser or Tor. Doing that can be done as per Self Support First Policy for Whonix. Note: makes you unique
Perhaps try if this works for non-onion domains also:
Tor Documentation for Whonix Users
Note: makes you unique