New ‘redir’ / ‘hostfwd’ syntax for Qemu

it’s mandatory now in 2.9 so where we go.

Instead of:

-redir tcp::42323:23

which listens on all ip’s and redirects host port 42323 to port 23 on the default guest IP address of 10.0.2.15 we now have to use

-net user,hostfwd=tcp::42323-:23

as you could tell from this ‘easy’ syntax.

-netdev user,id=mynet0,hostfwd=hostip:hostport-guestip:guestport

Right?

One thought on “New ‘redir’ / ‘hostfwd’ syntax for Qemu

  1. Hi, sorry to bother you. I have a problem with Qemu 0.15.1 and Windows 98 OEM. Basicly I’ve installed the nerwork card and I’m trying to use the the user mode networking feature of QEMU. However the DHCP server gives a weird IP address to my machine and does not provide a gateway. I’ve tried to configure the network statically providing the default ip addresses.

    10.0.2.15 ip address
    10.0.2.2 gateway
    10.0.2.3 DNS

    But I can’t still connect to the internet.
    I’ve tried to use Windows XP as guest but it gives me 0.0.0.0 as IP Address.

    To compile it I’ve edited the configure file to add adlib to the sound card list to build, I’ve also edited it so it does not try to link with libiberty as it should not be required (?). I’ve also edited the CFLAGS in config-host.mak replacing “-g -O2” with “-g -O1” to avoid crash when QEMU tries to access hard disk images.

    I also have tried to use Qemu 1.1.1-1 compiled using your instructions and it works fine, however it is slower in comparison to Qemu 0.15.1 I would like to stick with the earlier version because it allows me to play Age of Empires 2 at an acceptable speed.

    If you want to help me send a mail

Leave a Reply

Your email address will not be published. Required fields are marked *