V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
mayapop
V2EX  ›  问与答

求教, debian 下安装 gemu,然后桥接到 vncserver 里的虚机 ip。

  •  
  •   mayapop · Feb 26, 2015 · 2174 views
    This topic created in 4088 days ago, the information mentioned may be changed or developed.

    应该怎样设置interfaces

    我按照网上的教程,先安装
    # apt-get install bridge-utils

    # apt-get install uml-utilities (命令#tunctl要使用)

    然后修改/etc/network/.interfaces
    auto eth0
    iface eth0 inet static
    address 106.185.xx.xxx
    netmask 255.255.255.0
    gateway 106.185.35.1

    auto br0

    iface br0 inet static #dhcp

    bridge_ports eth0

    address 192.168.88.1

    netmask 255.255.255.0

    gateway 106.185.35.1

    bridge_stp off

    bridge_maxwait 0

    bridge_fd 0

    重启
    /etc/init.d/networking restart

    接着ssh连接不了了。 请教是不是interfaces 哪里出了问题 ?

    接着是不是给ilnode的客服发tk要求打开 tun/tap ,然后继续下面的步骤。

    加载TUN/TAP模块并设置桥接口

    # modprobe tun  
    # tunctl   #创建虚拟网卡tapX (X代表数字0,1,2…本文使用的是tap0)  
    
    # brctl addif br0 tap0   #将上一步创建的 tapX 加入网桥 br0  
    # ifconfig tap0 promisc up    #启用tapX 并设置为promisc 模式
    

    至此,debian的公网ip桥接到demu里的虚机的ip ,桥接完成。
    是这样吗?

    2 replies    2015-02-26 13:23:46 +08:00
    woochun
        1
    woochun  
       Feb 26, 2015 via Android
    vps搞虚拟机?
    mayapop
        2
    mayapop  
    OP
       Feb 26, 2015
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3310 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 13:36 · PVG 21:36 · LAX 06:36 · JFK 09:36
    ♥ Do have faith in what you're doing.