Forwarding a Range of Ports in VirtualBox
Doesn't allow forwarding a range of ports through the UI
I recently had to forward a range of ports to a VirtualBox instance. The VirtualBox GUI doesn’t provide a method for forwarding a range of ports. The VirtualBox Manual describes a way for adding the rule via the command-line:
VBoxManage modifyvm "VM name" --natpf1 "guestssh,tcp,,2222,,22"
This forwards any traffic arriving on port 2222 to port 22 on the virtual instance. We can use this to create a short bash loop. In the example below, we’re forwarding ports 2300-2400 to ports 2300-2400 on the virtual instance (both TCP and UDP):
for i in {2300..2400}; do
VBoxManage modifyvm "windows" --natpf1 "tcp-port$i,tcp,,$i,,$i";
VBoxManage modifyvm "windows" --natpf1 "udp-port$i,udp,,$i,,$i";
done
You can verify this by going back into the VirtualBox port forwarding page and seeing the newly configured ports. It’s just as easy to delete them:
for i in {2300..2400}; do
VBoxManage modifyvm "windows" --natpf1 delete "tcp-port$i";
VBoxManage modifyvm "windows" --natpf1 delete "udp-port$i";
done
This should suffice until the capability is added to the VirtualBox UI.
Forwarding a Range of Ports in VirtualBox的更多相关文章
- 服务器上安装FileZilla Server连接时报You appear to be behind a NAT router. Please configure the passive mode settings and forward a range of ports in your router.
官方资源下载链接:客户端,或者直接点击下载“FileZilla_3.24.0_win64-setup.exe”:服务端,或者直接点击下载“FileZilla_Server-0_9_60_2.exe”: ...
- 路由器port触发与转发---Port Forwarding & Port Triggering
What is Port Triggering? If you have not read my explanation of port forwarding do so now. You can f ...
- squid对http range的处理以及range_offset_limit
range_offset_limit A range request comes from a client that wants only some subset of an HTTP respon ...
- vyatta的fork开源版本
https://www.reddit.com/r/networking/comments/3dvwfy/who_here_is_using_vyos/ Vyatta came in two flavo ...
- dhcpsrv:windows系统的优秀开源免费dhcp serve软件
概述: 官方网站 :http://www.dhcpserver.de/ 写博客时的可免费下载版本 2.52, 或者在cnblogs 本地下载 --========================== ...
- vyatta的fork开源版本vyos
vyatta的fork开源版本vyos 来源: https://www.reddit.com/r/networking/comments/3dvwfy/who_here_is_using_vyos/ ...
- 【转】刚发现一个linux在线文档库。很好很强大。
原文网址:http://blog.csdn.net/longxibendi/article/details/6048231 1.网址: http://www.mjmwired.net 2.比如查看这个 ...
- Ettercap 帮助文档
Ettercap(8)帮助 (翻译来自百度翻译,原文附于文后,个人润色) 1.概述 Ettercap-多用途嗅探器/内容过滤器,用于中间人攻击 重要提示 自Ettercap Ng(以前为0.7.0)以 ...
- useful commands for docker beginner
You may want to add my wechat public account or add my technical blog's RSS feed This list is meant ...
随机推荐
- Swift数组的加法运算符用法:array1 += array2
var stringList1 = [String]() //创建String类型空数组 var stringList2 = ["1", "3", " ...
- mycat分布式mysql中间件(数据库切分概述)[转]
mysql数据库切分 前言 通 过MySQLReplication功能所实现的扩展总是会受到数据库大小的限制,一旦数据库过于庞大,尤其是当写入过于频繁,很难由一台主机支撑的时 候,我们还是会面临到扩展 ...
- 关于word2010中完美解决数学公式(正斜体)输入的解决方案
测试环境 win10(64位) office2010(32位)——64位的没有测试,估计应该也可以. 需要软件(包)(请按照下面顺序安装) ①VC运行库(自行百度下载即可) ②北大方正word公式数学 ...
- [OFBiz]开发 一
1.使用Eclipse3.7.1 + subclipse plugins 1.8.2(svn client)http://subclipse.tigris.org/servlets/ProjectDo ...
- qtp不识别树结构中的点击事件
qtp不识别树结构中的点击事件,未生成该点击事件的脚本,解决办法: 1.未生成点击"auto分类c1"的脚本 2.点击1.对象库-2.添加对象库-3.选中对象-点击OK,即将该对象 ...
- Zabbix探索:模板中发现规则的使用
其实模板的建立只要多看看系统自带的模板内容就清楚了,一目了然,不用做过多解释. 目前使用到的自动发现规则有端口和文件系统的,其他还没有仔细研究. 下面说说遇到的几个问题. 1.Key不能相同.普通项目 ...
- 【译】 AWK教程指南 7AWK应用实例
本节将示范一个统计上班到达时间及迟到次数的程序. 这程序每日被执行时将读入两个数据文件: * 员工当日到班时间的数据文件 ( 如下列的 arr.dat ) * 存放员工当月迟到累计次数的文件 当程序执 ...
- 标准的TCP/IP工业以太网-EtherNet/IP
标准的TCP/IP工业以太网-EtherNet/IP 徐智穹以太网具有传输速度高.兼容性好.应用广泛等方面的优势,支持几乎所有流行的网络协议,其中 ...
- acm数据结构整理
一.区间划分 //区间划分+持久化并查集:区间连通情况统计. inline bool comp(Ask x, Ask y){return x.km == y.km ? x.l > y.l : x ...
- python 面向对象高级编程
数据封装.继承和多态只是面向对象程序设计中最基础的3个概念.在Python中,面向对象还有很多高级特性,允许我们写出非常强大的功能. 我们会讨论多重继承.定制类.元类等概念.