Raspberi Pi Not Phoning out to Reverse Client

Hello,

I have a Raspberry Pi 3 B+ and I have got the arm version of the server on it.

I set the client on a macos vm that I am using. The ports are forwarded to the client correctly I have forwarded both 7575 and 7573 noting that reverse connection will be using 7573 by default.

The client says it is listening for reverse connections:

01:50:26 INFO :VirtualHere Client 4.6.4 starting (Compiled: Dec 26 2018 21:38:44)
01:50:26 INFO :Using config at /Users/zzz/Library/Preferences/vhui Preferences
01:50:26 INFO :IPC available at /tmp/vhclient
01:50:26 INFO :Auto-find using Bonjour - on
01:50:26 INFO :Auto-find using Bonjour SSL - on
01:50:26 INFO :ReverseLookupService listening on port 7573 (IPv6 dual-stack)
01:50:26 INFO :SSLReverseLookupService listening on port 7572 (IPv6 dual-stack)

I have specified the Reverse Client in the server config which looks like so (It has added EasyFind stuff in since):

ServerName=$HOSTNAME$
ReverseClients=x.x.x.x (redacted the ip)
CompressionLimit=384

I start the server running sudo ./vhusbdarm -c vhconfig.txt -r vhlog.txt and it says it is running.
I do not see any out going gonnections headed to my Reverse Client. It does not look like it is even attempting to call to the client.

This is the contents of the log:

Sun Jan 13 01:42:20 2019 LOG_INFO >>> Starting VirtualHere USB Server v3.8.1 (Built: Dec 14 2018, 14:35:56)<<<
Sun Jan 13 01:42:20 2019 LOG_INFO Using configuration vhconfig.txt
Sun Jan 13 01:42:20 2019 LOG_INFO Server licensed to=unlicensed max_devices=1
Sun Jan 13 01:42:20 2019 LOG_INFO Using large URB's
Sun Jan 13 01:42:20 2019 LOG_INFO Listening on all network interfaces at TCP port 7575
Sun Jan 13 01:56:01 2019 LOG_INFO Found High speed device [18a5:0300] "Verbatim, STORE N GO" at address 112

That is it. It does not look like it is doing any reverse client outbound, when I do a netstat it does not show any connections out or attempting to go to the client on 7573.

#2

Nothing?

#3

Sorry i was on holidays.Anyway im back now. So i think the reason is its not using the correct vhconfig.txt file. I think you should specify the full path to the vhconfig.txt file in the -c argument

#4

Same problem even specifying the path to the config file in full. Also I noted that it wrote the EasyFind stuff into the config file so it must have had the correct path anyway.

#5

OK this stuff has worked fine for years. So maybe you are not manually editing the config.ini correctly somehow.

Can you just add a reverse client directly using a client. right click on the USB Hubs and select the server and Reverse Clients...

#6

I can't seem to select the server when it hasn't yet connected? If I try add the server by putting in its IP it doesn't connect which I expect because I can't forward TCP 7575 server side which is why I'm doing reverse client.

I'm just using nano as I SSH into the pi to edit the config file, is there a setting I can set in the config which will make a log entry so we can confirm that it is reading the config correctly?

#7

Run the client on the same network (or even the same pi) and add it that way

#8

I don't have that luxury, the server is at a totally different location to my pi.

#9

*client I mean

#10

OK i assume you are not editing the vhconfig.txt file when the server is running? You cant edit it while the server is running.

Otherwise the only other thing i can conclude is that the server really is trying to connect in reverse but there is a firewall blocking it on the client side

#11

not trying to edit config at runtime. The macos in-built firewall is turned off where the client is.

#12

Should the pi at least mention in the logs that it is attempting a reverse connection to the client?

#13

No it wont log that because potentially there could be thousands of tries (it tries every 15 seconds) between successes.

#14

You could try telnetting to port 7573 on the client ip from the pi and see if you get a connection established

#15

We did telnet to 7573 and did a tcpdump and concluded that the telnet packets came through, looking at the client there was error messages in the system messages it was mentioning something about widgets and it was referencing a path /Users/michael and closed the connection. Unable to get it to show me that error again and the system messages went blank when I tried to copy it.

#16

OK thats a good sign, telnet would have sent a handshake and the virtualhere client wouldnt know how to handle this and drop the connection.

But the socket opened and thats what we wanted to know.

You could try putting the :7573 after the ip address in the config.ini file ReverseClients entry

#17

Ok did that, no change. I can see it listening on 0.0.0.0:7575 when I netstat but there are no outgoing connections. It is like it is simply ignoring the ReverseClients entry in the config

#18

pi@lappypi:~ $ netstat -a
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:7575 0.0.0.0:* LISTEN
tcp 0 0 192.168.1.254:ssh 192.168.1.221:55023 ESTABLISHED
tcp 0 0 192.168.1.254:ssh 192.168.1.221:49357 ESTABLISHED
tcp6 0 0 [::]:ssh [::]:* LISTEN
udp 0 0 0.0.0.0:59357 0.0.0.0:*
udp 0 0 0.0.0.0:bootps 0.0.0.0:*
udp 0 0 0.0.0.0:mdns 0.0.0.0:*
udp 0 0 0.0.0.0:mdns 0.0.0.0:*
udp 0 0 0.0.0.0:mdns 0.0.0.0:*
udp 0 0 0.0.0.0:44274 0.0.0.0:*
udp6 0 0 [::]:46101 [::]:*
udp6 0 0 [::]:mdns [::]:*

#20

It doesnt try continously to connect from server to client. You would only see the server try every 15 seconds to create an outbound socket to the client ip. So run

netstat -nputwc
#21

tcp 0 0 192.168.1.254:22 192.168.1.221:49357 ESTABLISHED -
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 164 192.168.1.254:22 192.168.1.221:55023 ESTABLISHED -
tcp 0 0 192.168.1.254:22 192.168.1.221:49357 ESTABLISHED -
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 164 192.168.1.254:22 192.168.1.221:55023 ESTABLISHED -
tcp 0 0 192.168.1.254:22 192.168.1.221:49357 ESTABLISHED -
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 164 192.168.1.254:22 192.168.1.221:55023 ESTABLISHED -
tcp 0 0 192.168.1.254:22 192.168.1.221:49357 ESTABLISHED -
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 164 192.168.1.254:22 192.168.1.221:55023 ESTABLISHED -
tcp 0 0 192.168.1.254:22 192.168.1.221:49357 ESTABLISHED -
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 164 192.168.1.254:22 192.168.1.221:55023 ESTABLISHED -
tcp 0 0 192.168.1.254:22 192.168.1.221:49357 ESTABLISHED -
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 164 192.168.1.254:22 192.168.1.221:55023 ESTABLISHED -
tcp 0 0 192.168.1.254:22 192.168.1.221:49357 ESTABLISHED -
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 164 192.168.1.254:22 192.168.1.221:55023 ESTABLISHED -
tcp 0 0 192.168.1.254:22 192.168.1.221:49357 ESTABLISHED -
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 164 192.168.1.254:22 192.168.1.221:55023 ESTABLISHED -
tcp 0 0 192.168.1.254:22 192.168.1.221:49357 ESTABLISHED -
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 164 192.168.1.254:22 192.168.1.221:55023 ESTABLISHED -
tcp 0 0 192.168.1.254:22 192.168.1.221:49357 ESTABLISHED -
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 164 192.168.1.254:22 192.168.1.221:55023 ESTABLISHED -
tcp 0 0 192.168.1.254:22 192.168.1.221:49357 ESTABLISHED -

#22

Sat there watching it after starting the server, I do not see it trying to make any connections out to the client

#23

OK well you'll have to use a direct normal tcp connection, i dont know what else to try

#24

Damnit I was really hoping this would work out and I could move my iPhones from the flakey xcode wifi deployment to back over usb this way.

Also it says this

Tue Jan 15 23:29:01 2019 LOG_INFO Found High speed device [05ac:12a8] "Apple Inc., iPhone" at address 112
Tue Jan 15 23:29:01 2019 LOG_ERR Call to syncSetConfig 4 Failed with err 1 (Operation not permitted)

with iPhone 5 plugged into the pi, I have libimobiledevice installed and it has created the pairing cert upon trusting the pi. Any idea what that's about?

#25

*iPhone 5s

#26

Ok i actually dont think the iphone5 with work between the pi and osx 10.14 . It would work between the pi as the server and windows or linux as the client.

#28

What I want to do is whack 4 iPhones in a powered hub, connect hub to pi and have my 10.13 vm in the cloud see the iPhones. If that works, I'm happy to pay the license fee for my pi to act as a server.

#29

No you need to use a windows client for that at the moment until apple updates osx to support this

#30

What doesn't macos support? I have used USB Network Gate to do iPhone USB/IP from a local mac to the mac VM so it is doable or is it on thew linux side that needs fixing?

#31

The server needs to be mac for it to work. There is some special mode they added in ios 11 where it somehow puts the iDevice is some extra mode which only mac can do.

#32

Hmmm but we also did USB Network Gate on Windows to macos VM and that worked as well, so it is doable on windows at least. Perhaps it is because ilibmobiledevice on linux is not the official apple drivers and lacks the needed functionality? Maybe a linux specific issue?