[qemu] 端口重定向

参考:

qemu-doc.html

    hostfwd=[tcp|udp]:[hostaddr]:hostport-[guestaddr]:guestport
        Redirect incoming TCP or UDP connections to the host port hostport to the guest IP address guestaddr on
        guest port guestport. If guestaddr is not specified, its value is x.x.x.15 (default first address given by
        the built-in DHCP server). By specifying hostaddr, the rule can be bound to a specific host interface. If no
        connection type is set, TCP is used. This option can be given multiple times.

        For example, to redirect host X11 connection from screen 1 to guest screen 0, use the following:

                  # on the host
                  qemu -net user,hostfwd=tcp:127.0.0.1:6001-:6000 [...]
                  # this host xterm should open in the guest X11 server
                  xterm -display :1

        To redirect telnet connections from host port 5555 to telnet port on the guest, use the following:

                  # on the host
                  qemu -net user,hostfwd=tcp::5555-:23 [...]
                  telnet localhost 5555

        Then when you use on the host telnet localhost 5555, you connect to the guest telnet server.


用于将主机端的端口重定向到客户端的端口上。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值