Linux下VMware的端口映射的方法
2007-11-09 13:43:21 来源: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 [incomi
主机环境是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........
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........
- ››linux下两台服务器文件实时同步方案设计和实现
- ››Linux文件描述符中的close on exec标志位
- ››Linux下管道使用的一些限制
- ››Linux 误删/usr/bin 解决方法
- ››linux 添加新用户并赋予sudo执行权限
- ››linux常用软件安装方法
- ››Linux的分区已经被你从Windows中删除,系统启动后...
- ››linux enable命令大全
- ››Linux实现基于Loopback的NVI(NAT Virtual Interfa...
- ››Linux远程访问windows时,出现"连接被对端重...
- ››linux中使用head命令和tail命令查看文件中的指定行...
- ››linux swap 分区调控(swap分区 lvm管理)
赞助商链接