点击这里给我发消息 点击这里给我发消息
首页 > 行业资讯 > linux>详细内容

Linux操作系统下VMware的端口映射

添加时间:2010-1-4
    相关阅读: WEB 系统

主机环境是UBUNTU 7.4

  VMware Workstation 6.0.0 build-45731vmware使用NAT是通过vmnet8来是实现,找到这个文件打开/etc/vmware/vmnet8/nat/nat.conf

  # be up to 100% longer

  timeout = 60

  [incomingtcp]

  # Use these with care - anyone can enter into your VM through these……

  # FTP (both active and passive FTP is always enabled)

  # ftp localhost 8887

  #8887 = 192.168.0.128:21

  4660 = 192.168.0.128:4660

  # WEB (make sure that if you are using named webhosting, names point to

  # your host, not to guest…… And if you are forwarding port other

  # than 80 make sure that your server copes with mismatched port

  # number in Host: header)

  # lynx http://localhost:8888

  #8888 = 192.168.0.128:80

  # SSH

  # ssh -p 8889 root@localhost

  #8889 = 192.168.0.128:22

  [incomingudp]

  # UDP port forwarding example

  #6000 = 192.168.0.128:6001

  [incomingtcp]

  TCP映射

  [incomingudp]

  UDP映射

  举例

  8889 = 192.168.0.128:22

  保存退出,重启服务

  /usr/lib/vmware/net-services.sh restart

  测试

  ssh -p 8022 myhost.comornetstat -anpt ……tcp 0 0 0.0.0.0:4660 0.0.0.0:* LISTEN 2500……

 

本文作者:
咨询热线:020-85648757 85648755 85648616 0755-27912581 客服:020-85648756 0755-27912581 业务传真:020-32579052
广州市网景网络科技有限公司 Copyright◎2003-2008 Veelink.com. All Rights Reserved.
广州商务地址:广东省广州市黄埔大道中203号(海景园区)海景花园C栋501室
= 深圳商务地址:深圳市宝源路华丰宝源大厦606
研发中心:广东广州市天河软件园海景园区 粤ICP备05103322号 工商注册