-1

I installed centos 7 on virtualbox on my local pc. I configured in the vm 2 adapter cards one as a bridge Adapter and the other as host only adapter : enter image description here

enter image description here

Right now I have 2 network adapters that are configured with a valid ip address :

  • enp0s3 : 192.168.1.95/24 (bridged)
  • enp0s8 : 192.168.56.102.24 (host-only)

The configuration for enp0s8 :

TYPE="Ethernet"
BOOTPROTO="static"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
NAME="enp0s8"
DEVICE="enp0s8"
ONBOOT="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPADDR=192.168.56.102
NETMASK=255.255.255.0

When I ping google it works which means that the first network card is working fine. However, when I'm trying to connect via putty (ssh) to the vm It fails..

Any idea what else I can check ?

  • Which address are you using to connect to? Are you trying to connect from the host or some other needing on your Lan? – roaima Jan 13 '18 at 22:46
  • I tried to connect to both of them but it failed. I guess that I should be able to connect only to the second ip. I'm trying to connect from the host. – JeyJ Jan 14 '18 at 7:44
  • Why have you set your host-only interface to be your default route (DEFROUTE="yes")? – roaima Jan 14 '18 at 13:20
  • Please add the interface definition for enp0s3 to your question. (As text, not a screenshot.). And the result of either ip route or netstat -rn. – roaima Jan 14 '18 at 13:21
0

Have you created the host-side interface for the host-only network?

From the VirtualBox GUI: "File" → "Preferences" → "Network" → "Host-only network" → "(+)Add host-only network"

https://www.virtualbox.org/manual/ch06.html#network_hostonly

  • I dont have the option "Host only network" in the path you specified. Just nat framework. I'm working on version 5.2.4 – JeyJ Jan 14 '18 at 0:12
0

the solution was disabling the firewalld service. Thanks !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.