AWhite
November 15, 2023, 2:44am
1
Hi folks,
Trying to get a tunnel or connection into a VM from Dom0.
I know you can do a connection from a Qube into Dom0, but I want to be able to get a connction out to one of the guests.
What is the best way to achieve this please?
So I have to get the guest to establish the connection to Dom0 and set up a tunnel? Or is there a way that is already set up in Qubes to allow this?
Hope you can help.
Sincerely,
A.
What exactly do you want to do with this connection?
Maybe qvm-run will be enough?
1 Like
AWhite
November 15, 2023, 5:36am
3
apparatus:
?
No, needs to give Dom0 a connection on a port to the guest itself. Just a pipe between the two essentially.
AWhite
November 15, 2023, 5:47am
4
I am currently trying to get the Dom0 Remote Session working to trial that to see if that methodology will function the way Iām hoping.
AWhite
November 15, 2023, 5:52am
5
But that isnāt seeming to work eitherā¦ Canāt get it to work properly at leastā¦
AWhite
November 15, 2023, 6:13am
6
And yes, it would be easier if I could connect Dom0 to a networking VM. Then I could at least have it working easily along with as much protection as I want. So it would only be 1 port open for 1 IP addressā¦
I donāt see much of an issue there.
You can connect to your qube with qvm-run, e.g.:
In your testqube run:
nc -l 12345
In dom0 run:
socat TCP-LISTEN:54321 EXEC:"qvm-run --pass-io testqube 'socat STDIO TCP:localhost:12345'"
In dom0 run:
nc localhost 54321
And you can see that the connection works.
1 Like
AWhite
November 15, 2023, 6:34am
8
SOCAT says "exactly 2 addresses required (there are 3) "
Did you copy/type the command correctly? Double check it.
It works for me in Qubes OS 4.2.
AWhite
November 15, 2023, 6:41am
10
I even created a new guest called ātestqubeā for itā¦ so yes.
AWhite
November 15, 2023, 6:43am
11
Iām running 4.1.1 (R4.1)
Whatās your socat version in dom0?
socat -V
I still think that you have typo somewhere in the command. Maybe you have a space somewhere or missing quotes?
I have socat version 1.7.4.2 so it shouldnāt differ.
AWhite
November 15, 2023, 7:14am
16
I have tried it EXACTLY the same and with the quotation marks and talks marks the opposite way around.
socat TCP-LISTEN:54321 EXEC:"qvm-run --pass-io testqube āsocat STDIO TCP:localhost:12345ā "
and
socat TCP-LISTEN:54321 EXEC:'qvm-run --pass-io testqube āsocat STDIO TCP:localhost:12345ā ā
AWhite
November 15, 2023, 7:17am
17
I ran a full update, and it still on Qubes 4.1
What if you try to run this command in dom0?
socat TCP-LISTEN:54321 EXEC:"nc -l 12345"
AWhite
November 15, 2023, 7:33am
19
works fine
I canāt upgrade to Qubes 4.2, it wonāt install.
Installer says āError setting up base repositoryā ā¦
AWhite
November 15, 2023, 7:49am
20
What would be the easist way to just set up a network pipe or attach Dom0 to a virtual network?