openbazaar-go icon indicating copy to clipboard operation
openbazaar-go copied to clipboard

remote gui over SSL

Open mocacinno opened this issue 7 years ago • 1 comments

I'm setting up openbazaar-go as a daemon on a remote machine ( CentOS 7.6 OpenVZ VPS) and wanted to connect a local gui client to the remote machine...

I generated the certificates, moved the CA to a client machine, edited my ~/.openbazaar/config and tried to from my client... But it did not work.

I started to investigate, and it seems that when i enable SSL encryption, openbazaar-go no longer listens on the configured gateway port on my ipv4 interface. It starts listening on said port on ipv6 only (eventough only an ipv4 gateway is configured).

If i disable SSL and restart my daemon, it starts listening on the configured gateway port on ipv4.

Ipv6 is not configured on my server nor client, so i cannot try to connect over ipv6

If i'm not using SSL encryption, everything works fine... So... if i have the following config: "Gateway": "/ip4/0.0.0.0/tcp/4009", "SSL": false, "SSLCert": "/home/bitcoin/.openbazaar/server.crt", "SSLKey": "/home/bitcoin/.openbazaar/server.key", I can connect (no SSL, so my credentials are passed in clear text). lsof -i :4009 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME openbazaa 9188 bitcoin 30u IPv4 3503161937 0t0 TCP *:4009 (LISTEN)

But... If i have the following config: "Gateway": "/ip4/0.0.0.0/tcp/4009", "SSL": true, "SSLCert": "/home/bitcoin/.openbazaar/server.crt", "SSLKey": "/home/bitcoin/.openbazaar/server.key", I can no longer connect

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME openbazaa 9587 bitcoin 29u IPv6 3503468195 0t0 TCP *:4009 (LISTEN)

mocacinno avatar Feb 21 '19 13:02 mocacinno

I can confirm this issue, seeing the same issue. Tried forwarding the public IPV4 port to the IPV6 one with socat but that didn't work out either.

Tried listing only on a IPV6 localhost gateway with "Gateway": "/ip6/::/tcp/4002" and with the socat TCP4-LISTEN:4002,fork,bind=ip.address TCP6:[::1]:4002 command but this crashed openbazaar with [ERROR] [cmd/Execute] protocol not found in multiaddr because apparently ip6 isn't supported for the gateway?

Using the ip4 localhost in the config doesn't work either though as it will just result in a connection refused error in socat, using a public ip4 results in socat not being able to bind even though the port is not getting used in lsof.

Phoenix616 avatar Apr 15 '19 18:04 Phoenix616