Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues on working Bisq on Tails #2278

Closed
bisqontails22 opened this issue Jan 17, 2019 · 4 comments
Closed

Issues on working Bisq on Tails #2278

bisqontails22 opened this issue Jan 17, 2019 · 4 comments
Assignees
Labels

Comments

@bisqontails22
Copy link

Hello,

Here says Bisq working problem on Tails (reported here: #811) now is solved with #1935, as long as now Bisq can use an external Tor services.

Yet for me this issue could nt be solved at all. I'm working on it for like 25 hours, but I'm a noob and couldn't do it. What did I do:

Now it seems we have this 4 options with this new version:

--torControlCookieFile

--torControlPassword

--torControlPort

--torControlUseSafeCookieAuth

1-) I began with the easiest one, using with control port as long as
a line in '/etc/tor/torrc.orig.1'

reads

...

ControlPort 9052

...

So I run

$./Bisq --torControlPort 9052

Outcome: No Use, Bisq crashes even before connecting to the Tor, exactly as before.

2-) I cannot telnet localhost on Tails either to learn the specifics of my network connection, so my attempt to telnet localhost did not do any good either.

3-) So I go on and open the torrc file on the shared user folder of Tails, this seemed me as the most liable option because the main torrc file of Tails is this afaik. So I type,

$cat '/usr/share/tor/tor-service-defaults-torrc'

Now it's read here:


DataDirectory /var/lib/tor
PidFile /var/run/tor/tor.pid
RunAsDaemon 1
User debian-tor

ControlSocket /var/run/tor/control GroupWritable RelaxDirModeCheck
ControlSocketsGroupWritable 1
SocksPort unix:/var/run/tor/socks WorldWritable
SocksPort 9050

CookieAuthentication 1
CookieAuthFileGroupReadable 1
CookieAuthFile /var/run/tor/control.authcookie

Log notice syslog


So what do I do?

a-) now I cannot hexdump on this control.authcookie file to Authenticate it because Tails won't let me do it. And I guessed I did not need it either, because there was this safecookie option. So I type:

$ ./Bisq --torControlCookieFile='/var/run/tor/control.authcookie' --torControlUseSafeCookieAuth

I take: "error: Option(s) [torControlCookieFile] are unavailable given other options on the command line"

(((------ I also used these options with refering to directory '/var/run/tor-instances/amnesia/control.authcookie' and '/var/run/tor-instances/debian-tor/control.authcookie' as this autcookie is listed on '/usr/share/tor/tor-service-defaults-torrc-instances' as '/var/run/tor-instances/@@name@@/control.authcookie' ------ This was again with no use, unsurprisingly I guess.)))

b-) I'm a noob, I'm confused. Without a string in directory part, I try again:

$ ./Bisq --torControlCookieFile=/var/run/tor/control.authcookie --torControlUseSafeCookieAuth

Same error:
error: Option(s) [torControlCookieFile] are unavailable given other options on the command line

c-) I torify it, Same result. But there is now also a line that reads: 1547727541 WARNING torsocks[670]: [syscall] Unsupported syscall number 229. Denying the call (in tsocks_syscall() at syscall.c:488) So I decide to not to use torify

d-) Now it seems something missing with using this --torControlCookieFile command, it seems there is something I need to add, so I begin adding other options, first by binding the main torrc file so maybe it can add the missing parts:

$ ./Bisq --torControlCookieFile='/var/run/tor/control.authcookie' --torControlUseSafeCookieAuth --torrcFile='/usr/share/tor/tor-service-defaults-torrc'

Same error: error: Option(s) [torControlCookieFile] are unavailable given other options on the command line

e-) I thought there may be a socks problem and try to reconfigure the socks5's through the whitelisted addresses by Tails (Don't laugh, I really don't know what I'm doing at all, just trying to find blind-sighted, as my knowledge of ANY language of programming is none, zero, empty, null. But my want to use Bisq on Tails is great, and I just want to use Bisq on Tails as an end-user, that's all. Anyways, I do this:)

$ ./Bisq --torControlCookieFile='/var/run/tor/control.authcookie' --torControlUseSafeCookieAuth --socks5ProxyBtcAddress=127.192.0.1:9050 --socks5ProxyHttpAddress=127.192.0.2:9050

(Because on the riseup it says 127.192.0.0/10 are whitelisted as SOCKS5 so I thought this can maybe what this needs.)

Outcome: Same error.

***3-) Ok, then I start from scratch. Now I randomly try some other options on --help, and then I find when I use --useLocalhostForP2P=True , the program actually starts and GUI also starts! Cool. This was a fine finding. Then my above SOCKS5 attempts made some sense at least.

However, after running this, the GUI ran, but it could not connect to any node, however I wait. Connection refused


Okay, after this, now I stop writing the trial and errors I did, because despite now I spent many hours on this, and I tried many many things, the outcome has been more or less the same ("connection refused", that is). I combined almost all ./Bisq commands with --useLocalhostForP2P=True , I edited the GUI options, I edited TorControlPort and NodePorts to 9052, and 9051, and some other ports I don't remember but found that could work elsewhere (or on "ferm"), I connected through obfs4bridges to Tails but this time with only those using the port 9443, and tried to restrict all the ports Bisq uses to 9443, and tried combinations of Bisq port commands and GUI network options to work through that port, I tried to find some other Bisq nodes that do not work through the 8333 port, I tried to whitelist the 8333 port on Tails but I couldn't do that, and then I decided that I didn't want to mess with that. Instead from the GUI I tried different transport type bridges, then I added custom bridges, then I even added my local host as a bridge, I checked and unchecked connecting through the Tor from the GUI and; combined all these all above combinations of the combinations of combinations and then recombined them... Connections all refused. No nodes connected.

Now at some instances in these maybe I succeeded in somethings, because for this one time BTC price updated from 4000 to 3600 but I noticed this too late so I don't know, because I was too focusedon console ant its refusals of connections because it just didn't stop refusing connections at all, at any point.

And maybe in some cases I just couldn't connect any node because I am already connecting Tails through transport bridges ((obfs3 and obfs4, I am from a restrictive country, even normal bridges are restricted here) so these may also be related with that.

In sum, this was all I could do as a noob, and the result was the same: failure. I and people like me would really, really like that one of you knowledgeable fellas would add one easy step-to-step guide for using Bisq on Tails, because it's said now it's supported but it seems to be really hard to do, but there has to be some easy way that I just miss because I just don't have enough information. And also I would be glad if you also consider those who can only run onions through transport bridges.

With appreciation to all your works, and kind regards.

@freimair
Copy link
Contributor

freimair commented Jan 23, 2019

Hi @bisqontails22!

You have been on the correct way by using

$./Bisq --torControlPort 9052

If you want to use an external Tor instance, you always have to tell Bisq where to find the control port.

However, unless your Tor instance is open to everyone (which I do not assume is the case on Tails) you have to provide authentication information in addition to the control port:

$ ./Bisq --torControlPort 9052 --torControlCookieFile=/var/run/tor/control.authcookie --torControlUseSafeCookieAuth

That is the theory. I have been the guy adding this functionality to Bisq but I must confess that I only tested on my local Arch Linux installation. And there, it works like that.
Unfortunately, there simple has not been any time to spare setting up Tails and test the thing there.

Please let me know if that works for you. If not, please provide the log file output. Maybe we can uprank the priority then.

There might be some Gui support for external tor and its error messages eventually, however, right now, there is more important work to be done.

@bisqontails23
Copy link

Hello freimair, thanks for the fast response. Appreciate your work!

Ok that was also one of the commands I tried, now I tried again.

First to note; permissions of the user amnesia is not enough to read authcookie file, so one needs to start tails with administrator mode enabled, and write the command from root.

In this way still, this does not work. Here what happens is that GUI file opens, goes through 1/4 2/4... steps and writes "connected to tor network", but it cannot connect to any seed. Probably because the port 8333 is blocked in Tails in default? Maybe there are also other reasons? Anyways, I am attaching the log file.

Thanks again for your attention and concern.

bisqlog.txt

@sejktmcsdlmfhsc
Copy link

sejktmcsdlmfhsc commented Mar 13, 2019

thank you @bisqontails22 and @freimair !!
with your shared notes I could get bisq 0.9.5 finally to work
on my current 3.12.1 tails with the following steps:

made authcookie readable:
sudo chmod o+r /var/run/tor/control.authcookie

added iptables rules to to connect to nodes:
sudo iptables -I OUTPUT 3 -d 127.0.0.1 -o lo -p tcp --dport 8333 --syn -m owner --uid-owner amnesia -j ACCEPT # bisq
sudo iptables -I OUTPUT 3 -d 127.0.0.1 -o lo -p tcp --dport 8000 --syn -m owner --uid-owner amnesia -j ACCEPT # bisq

and started bisq:
./Bisq --torControlPort 9052 --torControlCookieFile=/var/run/tor/control.authcookie --torControlUseSafeCookieAuth --seedNodes=ef5qnzx6znifo3df.onion:8000,s67qglwhkgkyvr74.onion:8000 --socks5ProxyBtcAddress=127.0.0.1:9050 --socks5ProxyHttpAddress=127.0.0.1:9050 --useLocalhostForP2P=True --useTorForBtc=True

@freimair
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants