SECURECRT connecting a local Linux virtual machine (ii)

Source: Internet
Author: User

SECURECRT connecting a local Linux virtual machine (ii)

The previous article described the virtual machine installation openssh-client and enabling related services in the local virtual machine via SECURECRT SSH connection. This article describes how to configure the virtual machine network connection mode.

First, in the VirtualBox network connection is configured as a bridge card mode. S ECURECRT can be remote to the virtual server, while the virtual server can access the external network.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/70/3D/wKiom1W0ofexp4W5AAHDFp6d8Ug544.jpg "title=" 1.jpg " alt= "Wkiom1w0ofexp4w5aahdfp6d8ug544.jpg"/>

This machine connects the external network via the wireless network card. So the interface name selection of the bridge adapter is the wireless card.

Viewing network information at a virtual terminal via the ifconfig command

[email protected]:~$ ifconfigeth0      link encap:ethernet   HWaddr 08:00:27:86:d2:30             inet addr:192.168.1.111  bcast:192.168.1.255  mask:255.255.255.0           inet6 addr: fe80::a00:27ff:fe86:d230/64 scope:link           up broadcast running multicast   MTU:1500  Metric:1          RX  packets:23954 errors:0 dropped:0 overruns:0 frame:0           TX packets:9961 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            rx bytes:29500490  (29.5 MB)   TX bytes:784452  (784.4 KB) ... [email protected]:~$

You can see that the virtual machine address is 192.168.1.111, Ping the address on the client computer, you can ping it, indicating that the client can communicate with the virtual machine.


Ping the client address on the virtual machine, ping the outside network, such as Baidu

[Email protected]:~$ ping 192.168.1.106PING 192.168.1.106 (192.168.1.106) (+) bytes of data.64 bytes from 192.168.1.106 : icmp_seq=1 ttl=64 time=0.668 ms64 bytes from 192.168.1.106:icmp_seq=2 ttl=64 time=0.426 ms64 bytes from 192.168.1.106: Icmp_seq=3 ttl=64 time=0.579 ms


[Email protected]:~$ ping Www.baidu.comPING www.a.shifen.com (119.75.217.109), bytes of data.64 bytes from 119.75.21 7.109:icmp_seq=1 ttl=56 time=56.9 ms64 bytes from 119.75.217.109:icmp_seq=2 ttl=56 time=10.4 ms64 bytes from 119.75.217. 109:icmp_seq=3 ttl=56 time=11.8 ms64 bytes from 119.75.217.109:icmp_seq=4 ttl=56 time=14.6 ms

Can communicate, indicating virtual function access to the outside network.

Second, Nat network address translation. (virtual machines access the Internet, and SECURECRT cannot connect to the virtual machine)


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/70/3D/wKiom1W0pYnSj5KvAAGflydc5Ms450.jpg "title=" 2.jpg " alt= "Wkiom1w0pynsj5kvaagflydc5ms450.jpg"/>

Virtual Machine ping host and extranet:

[email protected]:~$ ifconfigeth0      link encap:ethernet   HWaddr 08:00:27:86:d2:30             inet addr:10.0.2.15  bcast:10.0.2.255  mask:255.255.255.0           inet6 addr: fe80::a00:27ff:fe86:d230/64 Scope:Link           UP BROADCAST RUNNING MULTICAST   mtu:1500  metric:1          rx packets :23954 errors:0 dropped:0 overruns:0 frame:0           TX packets:9961 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:29500490  (29.5 MB)   TX bytes:784452  (784.4 KB) 
[Email protected]:~$ ping 192.168.1.106PING 192.168.1.106 (192.168.1.106) (+) bytes of data.64 bytes from 192.168.1.106 : icmp_seq=1 ttl=63 time=2.35 ms64 bytes from 192.168.1.106:icmp_seq=2 ttl=63 time=1.38 ms64 bytes from 192.168.1.106:ic Mp_seq=3 ttl=63 time=2.04 ms


[Email protected]:~$ ping Www.baidu.comPING www.a.shifen.com (119.75.217.109), bytes of data.64 bytes from 119.75.21 7.109:icmp_seq=1 ttl=55 time=12.9 ms64 bytes from 119.75.217.109:icmp_seq=2 ttl=55 time=10.9 ms64 bytes from 119.75.217. 109:icmp_seq=3 ttl=55 time=10.3 ms

Indicates that the virtual machine can communicate with the host, and can access the external network.


Host Ping Virtual machine address

C:\>ping 10.0.2.15 is pinging 10.0.2.15 with 32 bytes of data: The request timed out. The request timed out. The request timed out. The request timed out. Ping Statistics for 10.0.2.15: packet: Sent = 4, received = 0, lost = 4 (100% missing),

Communication timed out, unable to connect to the virtual machine via SECURECRT.


Third, only the host (HOST-ONLY) adapter connection mode. ( can be connected to the virtual machine via SECURECRT, but the VM cannot communicate with the outside world )

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/70/3A/wKioL1W0q1jAXDuYAAG6W6ZKXXs837.jpg "title=" 3.jpg " alt= "Wkiol1w0q1jaxduyaag6w6zkxxs837.jpg"/>


Get VirtualBox network card address automatically

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/70/3D/wKiom1W0qpCDCU9uAAGrBnTBD4M148.jpg "title=" 4.png " alt= "Wkiom1w0qpcdcu9uaagrbntbd4m148.jpg"/>

[email protected]:~$ ifconfigeth0      link encap:ethernet   HWaddr 08:00:27:86:d2:30             inet addr:192.168.56.101  bcast:192.168.56.255  mask:255.255.255.0           inet6 addr: fe80::a00:27ff:fe86:d230/64 scope:link           up broadcast running multicast   MTU:1500  Metric:1          RX  packets:24495 errors:0 dropped:0 overruns:0 frame:0           tx packets:10842 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            rx bytes:29561758  (29.5 MB)   TX bytes:890494  (890.4 kb )

Ping client, unable to reach

[Email protected]:~$ ping 192.168.1.106connect:network is unreachable


Client ping virtual machine can communicate

C:\>ping 192.168.56.101 is pinging 192.168.56.101 with 32 bytes of data: Reply from 192.168.56.101: bytes =32 time <1ms ttl=64 from 192.168.56.10 1 reply: Byte =32 time <1ms ttl=64 reply from 192.168.56.101: Byte =32 time <1ms ttl=64 reply from 192.168.56.101: bytes =32 time <1ms ttl=64192 .168.56.101 Ping Statistics: packets: Sent = 4, received = 4, lost = 0 (0% missing), estimated time of round trip (in milliseconds): shortest = 0ms, longest = 0ms, average = 0ms




This article from the "7743530" blog, reproduced please contact the author!

SECURECRT connecting a local Linux virtual machine (ii)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.