Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Linux System Getting Started Learning: From VirtualBox from the client host access NAT     - Redmine Installation (Linux)

- Installed in the desktop version of Ubuntu Unity Tweak Tool (Linux)

- Android Studio Getting Started Hello World (Programming)

- Eclipse configuration GTK (Linux)

- Zabbix configuration of SNMP (Server)

- Replace font under Linux (Linux)

- Web database security tips (Linux)

- The virtual memory (Linux)

- PostgreSQL 9.4.3 Installation and Configuration under CentOS 6.5 (Database)

- Linux common network tools: hping Advanced Host Scan (Linux)

- Java List add duplicate the same object (Programming)

- CentOS 5.5 kernel upgrade installation iftop (Linux)

- Specifies the open ports of the SUSE firewall settings (Linux)

- Linux find command detailing (Linux)

- PostgreSQL vacuum principle of a function and parameters (Database)

- Redis is installed in Ubuntu 14.04 (Database)

- The signature can not be verified under Debian (Linux)

- php for Linux the MySQL extension module installation and configuration (Database)

- Installation GitLab appears ruby_block supervise_redis_sleep action run (Linux)

- Chromium Install Flash Official Guide (Linux)

  Linux System Getting Started Learning: From VirtualBox from the client host access NAT
  Add Date : 2017-08-31      
  Question: I have a computer running a virtual machine using NAT on VirtualBox, virtual chance of being assigned a private IP address (10.x.x.x) VirtualBox. If I want to SSH from the host to the virtual machine, how can I do?

VirtualBox virtual machine network supports several different ways, one of which is the NAT network. When the virtual machine enabled NAT, VirtualBox will automatically between the virtual machine and the host network translation, so you do not have to configure anything between the virtual machine and the host. This also means that NAT in the virtual machine to an external network and host itself is not visible. This will be when you want to access the virtual machine from the host will cause problems (such as SSH).

If you want the virtual machine from the VirtualBox NAT environment, you can enable the VirtualBox NAT port forwarding in the GUI or the command line. This tutorial will demonstrate how to connect to the NAT and the environment by enabling the client to forward port 22 from the host SSH. If you want to access NAT's first client from HTTP, use port 80 instead of 22 port.

VirtualBox port forwarding through the GUI configuration

Select the virtual machine you want to access in VirtualBox, open the virtual machine's "Settings." Click on the left side of the "Network" menu, click on the network adapter option "Advanced."

Click "Port Forwarding" button

You will see a window to configure port forwarding rules. Top right, click "Add" icon.

We would like to see that kind of forwarding rules.

Name: SSH (can be any unique name)
Protocol: TCP
Host IP:
Host Port: 2222 (any unused port greater than 1024)
Guest IP: IP Virtual Machine
Guest Port: 22 (SSH port)

Port forwarding rules automatically when you start the virtual machine enabled. In order to verify. After you can enable the virtual machine to check whether port 2222 is turned on VirtualBox.

$ Sudo netstat -nap | grep 2222

Now you can use port forwarding, you can use the following command SSH to the virtual machine.

$ Ssh -p 2222 < login> @
Sent to the login request it will be automatically translated into VirtualBox, which allows you to SSH into the virtual machine.

By command VirtualBox port forwarding

VirtualBox has a command-line management tool called the VBoxManage. Using the command line tool, you can also be forwarded to your virtual machine port settings.

The following command is the IP address for the virtual machine set a name for the "CentOS7" port forwarding rule, SSH port number is 22, mapped to the local host port 2222. Rule name (in this case, SSH) must be unique.

$ VBoxManage modifyvm "centos7" - natpf1 "SSH, tcp,,2222,,22"
After the rule is created, you can use the following command to verify.

$ VBoxManage showvminfo "centos7" | grep NIC
- Ubuntu the ARP (arptables) (Linux)
- Why did not Oracle privileges can also log in with sysdba (Database)
- shellinabox: one uses AJAX Web-based terminal emulator (Linux)
- SHELL script to use anti SSH brute force and vsftpd (Linux)
- MySQL 5.7 perfectly distributed transaction support (Database)
- OpenCV 3.0 + Python 2.7 installation and testing under Ubuntu 14.04 (Linux)
- Ubuntu users to install the system indicator SysPeek 0.3 (Linux)
- C # asynchronous delegates (Programming)
- Linux security configuration (Linux)
- Using Linux command line and execute PHP code (Programming)
- CentOS 6.5 installation and configuration Cobbler (Server)
- Oracle 11g to create a second instance on Linux (Database)
- GDB remote connections RX Probe online debug program (Programming)
- Understanding and Memcached MongoDB arbitration node, Zookeeper, Redis Recovery Programme Thoughts (Database)
- CentOS cross compiler core Raspberry Pi 2 (Linux)
- How to configure Apache Solr on Ubuntu 14/15 (Server)
- CentOS 6.5 installation and simple configuration Nginx (Server)
- How to limit network bandwidth usage in Linux (Linux)
- Oracle 11g Export guide problem not an empty table (Database)
- Tor Browser: under Linux for anonymous Web browsing ultimate browser (Linux)
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.