Virtualbox - Use WIFI
To enable usage of WIFI adapter in Virtualbox
Setting - Network - NAT - Advance - PCNET Fast III
IP will be 10.0.2.15
>shared from host wifi. able to access internet
To enable own IP and setting directly from your internet Router, use Bridged Network
-harder to configure for WIFI. easier for LAN connection
VIRTUALBOX HOST ONLY ADAPTER
>Redhat 7.5 not able to get ip automatically. Need to setup manually
>Boot vbox Redhat75. Set ip manually 192.168.81.10.
>Laptop as host having ip 192.168.81.1
$ cat /etc/sysconfig/network-scripts/ifcfg-enp0s8
TYPE=Ethernet
BOOTPROTO=static
NAME=enp0s8
UUID=440295b1-0cc1-41f5-b439-66e4b7819d7c
DEVICE=enp0s8
ONBOOT=yes
IPADDR=192.168.81.10
NETWORK=192.168.81.0
GATEWAY=192.168.81.1
DNS=8.8.8.8 192.168.81.1
NM_CONTROLLED=no
>Restart network service. Verify able to ping laptop pc. P/S: not able to ping internet
# systemctl restart network.service
2018/7/23
Virtualbox -Redhat 7.5 -NAT network adapter & DHCP
$ cat /etc/sysconfig/network-scripts/ifcfg-enp0s8
TYPE=Ethernet
BOOTPROTO=dhcp
NAME=enp0s8
UUID=fa06c7d8-db0e-4e0a-b5f1-59aa6bfa2bc6
DEVICE=enp0s8
ONBOOT=yes
$ ip addr
enp0s3:
inet 192.168.120.3/24 brd 192.168.120.255 scope global dynamic enp0s3
Setting - Network - NAT - Advance - PCNET Fast III
IP will be 10.0.2.15
>shared from host wifi. able to access internet
To enable own IP and setting directly from your internet Router, use Bridged Network
-harder to configure for WIFI. easier for LAN connection
VIRTUALBOX HOST ONLY ADAPTER
>Redhat 7.5 not able to get ip automatically. Need to setup manually
>Boot vbox Redhat75. Set ip manually 192.168.81.10.
>Laptop as host having ip 192.168.81.1
$ cat /etc/sysconfig/network-scripts/ifcfg-enp0s8
TYPE=Ethernet
BOOTPROTO=static
NAME=enp0s8
UUID=440295b1-0cc1-41f5-b439-66e4b7819d7c
DEVICE=enp0s8
ONBOOT=yes
IPADDR=192.168.81.10
NETWORK=192.168.81.0
GATEWAY=192.168.81.1
DNS=8.8.8.8 192.168.81.1
NM_CONTROLLED=no
>Restart network service. Verify able to ping laptop pc. P/S: not able to ping internet
# systemctl restart network.service
2018/7/23
Virtualbox -Redhat 7.5 -NAT network adapter & DHCP
$ cat /etc/sysconfig/network-scripts/ifcfg-enp0s8
TYPE=Ethernet
BOOTPROTO=dhcp
NAME=enp0s8
UUID=fa06c7d8-db0e-4e0a-b5f1-59aa6bfa2bc6
DEVICE=enp0s8
ONBOOT=yes
$ sudo systemctl restart network
$ sudo dhclient
enp0s3:
inet 192.168.120.3/24 brd 192.168.120.255 scope global dynamic enp0s3
enp0s8:
inet 10.0.3.15/24 brd 10.0.3.255 scope global noprefixroute dynamic enp0s8
$ ping www.yahoo.com
PING atsv2-fp.wg1.b.yahoo.com (124.108.103.104) 56(84) bytes of data.
64 bytes from media-router-fp2.prod1.media.vip.tp2.yahoo.com (124.108.103.104): icmp_seq=1 ttl=55 time=71.2 ms
--
NAT=10.0.3.15
Host-Only=192.168.120.3
4 Comments:
# ip addr
# ip link show
# nmcli -p dev
SSH from Laptop to Virtualbox linux
-Set port forwarding in Vbox network -- SSH - 127.0.0.1 - 222 - 10.0.2.15 - 22
-Run putty to 127.0.0.1 port 222
Disable selinux
# cat /etc/selinux/config
Simple activate network for vbox-redhat/centos
$ cat /etc/sysconfig/network-scripts/ifcfg-enp0s8
ONBOOT=yes
$ systemctl restart network
Post a Comment
<< Home