Could you add this to the wiki please?
Chapter lyrebird.
Could you add this to the wiki please?
Chapter lyrebird.
Did anyone test it except me?
Was able to narrow down the problem I have with the above implementation by @anon26447919
The error occurs when starting tor on the sys-whonix-webtunnel VM which is my cloned version of sys-whonix for testing.
The tor bootstrap process gives me this error when being at 2%:
[err] Managed proxy â/usr/bin/lyrebirdâ: Error dialing: error dialing [bridge-host].onion-equivalent:443: dial tcp: lookup [bridge-host] on [::1]:53: read udp [::1]:xxxxx->[::1]:53: read: connection refused
(IP address and URL anonymized)
To me it looks like lyrebird is trying to resolve the bridge hostname via normal system DNS, but Whonix blocks all Clearnet DNS requests except through Torâs DNSPort. (which is a feature).
I think lyrebird runs as an external pluggable transport before Tor is fully up, it cannot use Torâs DNS resolver and fails with âconnection refusedâ on localhost:53.
Am I right?
My questions:
Has anyone successfully solved the Clearnet DNS issue for pluggable transports like lyrebird in Whonix? Or am I misguided here?
Would it be better to run lyrebird + Tor in a separate custom ProxyVM and let the Whonix-Gateway connect via Socks5Proxy instead?
Any hints or workarounds would be greatly appreciated.
Thanks in advance!
Yes, if youâre on Qubes, then it should be the whonix-gateway-18 template-vm there.
Yeah, it looks like the dns isnât getting resolved. That may be because of the sys-firewall Qubes hardening, since sys-whonix already has some rules, maybe your cloned version doesnât - in sys-net?
You can try adding the addr feature, which caches the dns to your webtunnel bridge, you can do that by making a space after the bridge and adding this in the custom torrc:
addr=0.0.0.0:443, or addr=[ipv6]:443 for IPv6.
Wonât it get very complicated? The Socks proxy in the Tor Control Panel is intended for a Tor bootstrap, unless you mean something else.
It technically should use the system dns by default.
Iâll look into it. I first want to polish out the guide and see if there are any missed or unnecessary steps.
In example, you arenât required to install Go for lyrebird to work. I canât edit the message on the forum anymore.
Thanks for pointing me to the workaround:
Resolve the domain from the bridge URL in another VM:
getent ahosts example-bridge-domain.net
Then take one of the returned IPs and add it directly to the bridge line via addr=.
Example:
UseBridges 1
ClientTransportPlugin webtunnel exec /usr/bin/lyrebird managed
Bridge webtunnel [IPv6]:443 FINGERPRINT url=https://example-bridge-domain.net/... addr=IP:443
After that, Tor bootstraps normally and the bridge works.
IP might change over time, so this is a manual workaround
I ran into an issue when adding a second WebTunnel bridge.
The error is clearly a TLS/SNI mismatch:
lyrebird uses the hostname from url= as SNI (e.g. example-bridge.net)
the server presents a certificate for a completely different internal hostname (e.g. something like randomstring.proxy.internal)
So the hostname and certificate donât match, and the connection fails as expected.
In practice this means:
the bridge endpoint is misconfigured on the server side and not usable at all.
Just a heads up in case others see similar errors when adding WebTunnel bridges.
@Patrick I submitted a change.
Should there be separate instructions depending on your Whonix configuration? (Qubes-Whonix, VirtualBox, i.e.)
I think the instructions are pretty universal.
Can you elaborate on that? I thought a clone is a 100% copy so where might be the difference?
The dns resolution failure doesnât happen in the default sys-whonix.
ok, but why? what is different? I donât get it. Sorry for bothering you guys, but Iâd like to understand.
I cloned the standard template whonix-gateway-18 to whonix-gateway-18-webtunnel. There I copied the lyrebird binary to /usr/bin and did add the apparmor entry for lyrebird, as you suggested.
then I created the new gateway sys-whonix-webtunnel on this exact template. There I just configured /usr/local/etc/torrc.d/50_user.conf again as you suggested.
That basically was it.
So why should the handling of DNS be different in this new"webtunnel enabled" gateway than in the standard sys-whonix gateway qubes / Whonix provided?
Are there additional settings like firewall etc. in dom0? If so, why donât we just âtransferâ those to the new gateway?
Thanks for taking the time to answer. I donât like the idea to touch a running system like sys-whonix, when I can have another cloned (=identical) gateway for testing.
This is also somewhat curious to me despite being a developer, so youâre not alone in being confused ![]()
Difference depends whether a Tor bridge:
Wiki changes accepted and wiki improved. Untested by me.
Probably also superfluous command. if the source file is executable. so will be the target file after copying it.
Unsuitable Connectivity Troubleshooting Tools
Tor Control Panel should have no role in this.
No. Not separate. The difference should be pretty minimal.
Wow, thanks for the work on the wiki-guide!
I have an update regarding the dns resolution stuff in qubes. The default sys-whonix has the same âdns resolving errorsâ, so modifying the whonix dns would fix the problem.
As I understand it, enabling the Whonix âsystem dnsâ does not override traffic resolving to Tor (then it gets routed to Torâs dns proxy), like what happens with the dns requests when you try to update the Whonix-Gateway? Do they still get routed through Tor? And in âthe guideâ, should there not be any mention of caching bridge dnsâs using /etc/hosts or directly using the addr feature? (other than directly changing Whonixâs dns servers to system dns)
System DNS enables internal DNS resolution: Tor could always have resolved DNS for any internal purpose if it had DNS resolving capability built-in. Enabling system DNS on Whonix-Gateway grants Tor the ability to resolve DNS for any internal purpose.
I tried using it out of the box, and no, it doesnât work without manually making it executable first. (permission denied error)
The Tor Expert Bundles are actually signed (this is about the step 1 (notices) on the wiki), if you visit this page:
(https://)dist.torproject.org/torbrowser/15.0.8/
(https)://dist.torproject.org/torbrowser/latest-stable-tor-browser-version/
Also, should there be a link to manually compile lyrebird, which can be found here? (but the recommended way still being to extract lyrebird from the Tor Expert Bundle because itâs an easier way)
Added just now to the wiki:
- Whonix-Gateway system upgrades are unaffected: Whonix-Gateway is upgraded using APT, which requires administrative (ârootâ) rights and runs under the
rootaccount, which has no access to system DNS because APT is configured for Stream Isolation using auwtwrapper, which essentially redirects calls toapt/apt-gettotorsocks, and because Whonix-Gateway Firewall does not permit the accountrootto use system DNS / UDP / TCP by default. Only the accountdebian-toris permitted to use the systemâs default networking.
(https):/
No need to encode links. Your account is permitted to post links.
(Posting Links for New Users)
Also, should there be a link to manually compile lyrebird, which can be found here?
Optional. If someone thinks thatâs a good idea, one more link will be alright.
Difference depends whether a Tor bridge:
- A) is an IP (= no Whonix-Gateway system DNS required); or
- B) is a DNS hostname (= Whonix-Gateway system DNS required)?
tor webtunnel bridges contain both. An IP as well as a hostname.
IP is for tunneled traffic, domainname is for establishing a TLS based connection to the web server running on that bridge which has a âhidden entryâ. Obviously this domainname has to be resolved which is not done properly under Whonix on Qubes. (see my posts above).
The workaround is to resolve the domain name manually in a non whonix qube and add this IP as addr=... in the Bridge line in torrc file.
tor webtunnel bridges contain both. An IP as well as a hostname.
In that case, either Whonix-Gateway system DNS required is required or the hostname must be converted to an IP address.
That should work in many âsimpleâ cases such as this. [1]
[1] Optional informatiion, off-topic: What is a ânon-simpleâ case where avoiding host names is non-trivial? In the web browser itâs not trivial to replace a hostname with an IP due to subdomains and TLS.
In the end, itâs an instruction on installing lyrebird, which would support webtunnel bridges.
The workaround is to resolve the domain name manually in a non whonix qube and add this IP as
addr=...in theBridgeline intorrcfile.
There now is a section, which tells you how to âfixâ the dns resolving for Tor bridges.
Shouldnât that be the preferred way of dealing with dns resolving there?
Users who install lyrebird should be able to use all the features that it provides, meaning that they can âcacheâ the dns address of some bridge. It might not be the most stable configuration though and might make a bridge look âdeadâ if itâs ip got rotated or something similar, the user will also have to resolve the dns address manually, so recommending it by default doesnât sound that well.
Or do you still think itâs worth to have a small note there?
tor webtunnel bridges contain both. An IP as well as a hostname.
Most webtunnel bridges arenât provided with that addr feature, so usually there is only a hostname by default. The ipv6-looking part of it in itâs beginning is not related to the bridgeâs dns resolving, just adding this as a note.
Added just now to the wiki
Made some more changes.
Thx for clarification and your efforts!
Shouldnât that be the preferred way of dealing with dns resolving there?
Something already difficult becoming even more difficult and fragile.
Or do you still think itâs worth to have a small note there?
A note is fine.