How to fix the connection between my host pc (ubuntu) and my guest nethserver in virtualbox?

I am trying to run nethserver from a virtualbox in a linux Ubuntu 14.04 host.
I tried different things like:

  1. Following this guide [this guide][1]
  2. Changing the connection type from NAT to bridge
  3. Changing the /etc/sysconfig/network-scripts/ifcfg-eth0 file (without actually knowing what im doing)

I also tried running it through QEMU and VmWare player but still no luck.
Do someone has a link to a tutorial, or knows how i can fix this?

Update:
This is my ifconfig on my nethserver:

I tried NAT connection, and Bridge connection but no luck :confused:

I use virtualbox on ubuntu and windows without issue…

just create a virtual machine, give it at least a eth interface, bridged, install NS… it will use dhcp…

in any casa, you’d tell us more about your setup and your issue… so, please, be verbose and give us details
TIA

1 Like

Just start Virtual Box, create a Linux virtual machine with bridged interface, install NethServer and you’re ready to go! :smile:
You don’t even need to modify any config file.

2 Likes

Did you tried virtualbox? i’m using fedora 22 with bridged mode and i got
not issues, in 2 different machines. Bridged mode doesn’t work in windows
10.

1 Like

Thank you for your reply, i uploaded my Nethserver ifconfig.
I tried NAT and bridge connection but none of them work i always got an unknown host ping

@giacomo I tried it but no luck, cant get a working connection in nethserver :confused:

@mabeleira Yes i also tried QEMU and Vmware player still couldnt get it working …

Try VirtualBox

1 Like

I did, that ifconfig is from a virtualbox image

I see your green interface has this IP address: 192.168.1.111
So the IP has been configured with a DHCP server. Do you have a DHCP server inside your LAN, right?

Can you ping your default gateway or any other host inside the network?

I’m afraid this is a problem not related to NethServer. Maybe you can also try with a plain CentOS.

1 Like

did you set the virtual machine as bridged ? did you set an ip in the same
range as your phisical machine?

1 Like

No, i gave that ip address when in the begining when i was configuring it, did i do it wrong ?
And i cant really tell if i have DHCP in my LAN. Im actually a new-comer to linux.

And yes i can ping my default gateway in my host (ubuntu 14.04)

dhcp and Linux are so fundamentally different your statement shows you lack very basic understanding of computer networking and computing.

You’re going to have to give us some info if anyone here is to help you.

Can you give us an idea of your lan?
Is this at work or at home?
Internet - modem - router - ubuntu (linux) host?
What is the ip, netmask and gateway of your Linux host?
What are you trying to accomplish with Nethserver?
What did you install for software after you installed Nethserver?
When you say connection to your Nethserver vm, what service are you trying to access?
I’m guessing you’re trying to access the admin gui at https://192.168.1.111:980?
What msg do you get from your ubuntu host browser if you click https://192.168.1.111:980?

1 Like

whats your ubuntu ip address

1 Like

You are right i dont really know how networking works but im trying to get better at it.
Saying that i have a wireless router with dhcp enabled.
@mabeleira
The ip address of my host pc is 192.168.1.2
My netmask is 255.255.255.0
and my gateway is 192.168.1.1

I would like to (first of all) get Nethserver up and running. And hopefully use it services and its softwares for my small business.
I cant actually install nothing as i tried to install a gui for the centos but had no luck, so i have just the default software that comes with the ISO.
Yes i did try to access the web-gui by going to http://192.168.1.111:980 through my host pc
but i get Unable to connect on both firefox and opera… :confused:

Ok, you’re able to ping gateway from both ubuntu and neth virtual machine?

I’m just guessing but are you using wireless adapter? some routers seem to
spread traffic between dhcp network and fixed ip network, specially on
wireless traffic? Did you tried to access the virtual machine from other
machine but the ubuntu?

Do you have other virtual machine with windows 7? and check if they can see
each other?

1 Like

You’re sure your vm network adapter is in bridge mode?
On the nethserver vm run:
netstat -a |grep 980
and also:
route -n
post the results.

1 Like

Well now i am ashamed to say but it works. I deleted the virtual machine and created a new one. And now it works!
I put it in bridge mode wlan0 (on some tutorials i got on the internet it was eth0) and everything seems to work ok (i can access the web-gui on 192.168.1.111:980)
I also have to mention i tried to yum update or to ping google and had host not resolved thats why i though it didnt work.
Error that im still getting…
Sorry for the inconvenience ! And thanks for the help.
And yes i am on a wireless adapter. But cant really tell if the router i own spreads traffic between dhcp network and fixed ip network or not :confused:
@fasttech
And this is the result from the terminal for the commands you gave me:

Again thanks for the help :stuck_out_tongue:

1 Like

Cool.

Note, your router doesn’t care if the destination ip is fixed or dhcp, it’s just sends the traffic according to its routing table.

eth0 is how the nethserver install sees its virtual ethernet network adaptor.
wlan0 is how your host sees its real wifi network adaptor.

This will work while your host laptop is on wifi. If you ever kill wifi and plug an ethernet cable into your laptop you will have to go to the nethserver vm networking and change from wlan0 to eth0 or you’ll lose connectivity to your nethserver.

1 Like

Thank you for the great tip!
I didnt (couldnt) imagine this distro had such a great community :smiley: its just awesome!
Thanks again :smile:
p.s sorry to bother you again but can i install a gui for this distro ? I keep getting an error while trying to execute yum install lxde saying

Could not retrieve mirrorlist http://mirrorlist.nethserver.org/6.6/centos?release=6&repo=os&arch=x86_64 error was 
14: PYCURL ERROR 6- "Couldn't resolve host 'mirrorlist.nethserver.org'"
Error: Cannot find a valid base url for repo : centos-base 

Also when i try to make yum update i get the same error, and get an error when i try to go to the software center option in the web-gui :confused:

You’ll need to set the dns on the gui to your internet provider

Seems to be a DNS issue.

When configuring a network adapter it needs:
IP: An IP address in the range of your network
netmask: in small networks 255.255.255.0 or /24
Gateway: in small networks the IP of your Router
DNS: in small networks same as Gateway, so IP of your Router

You can add the informations by editing the script in /etc/sysconfig/network-scripts/ as you already described or in the webinterface.
You only need to add the DNS IP to resolve your issue.

When using DHCP the client will get all information from the DHCP Server, in your case your Router.

When using it for your business please think about Backups and RAID. Backups are more important.