5

I'm trying to socksify a qemu-kvm using tsocks, but I have no success.

I don't know if qemu access directly the hardware, skipping the OS or something like that, but I wasn't able to do this feat.

I need a solution which socksify the kvm on host machine. Do you know guys if it's possible or I have to use another software/addon to work on it?

Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
manoelhc
  • 161
  • 2
  • 5
  • Which network setting are you using for qemu? `-net user`, `-net tap`, `-net bridge`, ... ? – jofel Oct 14 '13 at 15:14

1 Answers1

3

It's a year-old subject, but someone may be still interested...

I can confirm that qemu-kvm can be successfully wrapped with tsocks relay, using ssh SOCKS proxy. For DNS, ttdns is run on the host OS, so incoming UDP-DNS request from guest OS/qemu-kvm is converted to TCP-DNS request, and then relayed over tsocks+ssh.

Actual command-line used:

# env -i tsocks qemu-system-x86_64 --enable-kvm \
-drive file=<snip>,cache=none,aio=native,if=virtio \
-net nic,model=virtio -net user -nographic -serial mon:stdio

Just to check, I monitored interfaces on the host while using HTTP/DNS on the guest (for "yum upgrade"), and no packet went through except on port 22.