UBUNTU Linux下VMware的端口映射
主机环境是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……
相关推荐
JustHaveTry 2020-06-21
zwt00 2020-04-29
82143754 2020-04-29
ajuan 2020-04-23
qdqht00 2020-04-20
sxlongwork 2020-03-25
xsg 2020-02-10
linuxisperfect 2020-01-19
杨友山 2020-01-14
tianlong 2020-01-03
yangliuhbhd 2019-12-31
杨友山 2019-12-29
韩学敏 2019-12-15
cuixingwudi 2015-01-26
spylyt 2019-11-04
啦啦啦啦啦 2019-10-29
银河梦想之旅 2011-02-11