Ubuntu Server and static IP without DHCP -> no internet
Posted: 30. Apr 2014, 11:30
Hello everybody,
I have set up a LAMP server in my VirtualBox running Ubuntu Server 14.04. Because I don't want the IP of the server to change on every reboot, I followed the instructions on "howtogeek" (cant post any URLs because this is my first posting...) to disable DHCP and request a static IP from the router instead.
Inside the LAN its working fine, I can access the webserver by its internal IP (in my example 192.168.1.200) and the other way around is working too, I can mount my network drives inside the virtual machine with no problem.
But when I tried to install another PHP extension, I noticed that the internet connection doesnt work anymore after disabling DHCP. Checking that by pinging Google results in an "unknown host" error.
I set the network adapter to network bridge in the settings of the virtual machine when I followed the tutorial and I actually don't know what has been set there before. Can this be an error in the VirtualBox configuration or is my network configuration in Ubuntu wrong?
My /etc/network/interfaces looks like the following:
I am not really an expert in computer networks. I just know the basic stuff and the fact that internal access to the virtual machine is working gives me the feeling that I misconfigured the internet connection. My network is a simple home LAN: just a router (192.168.1.1) connecting a bunch of computers via cable or wifi, usually over DHCP. Just my own PC, my NAS and the VirtualBox request static IPs.
I hope this is easy for someone with a bit more experience in networks, thanks for some help in advance
I have set up a LAMP server in my VirtualBox running Ubuntu Server 14.04. Because I don't want the IP of the server to change on every reboot, I followed the instructions on "howtogeek" (cant post any URLs because this is my first posting...) to disable DHCP and request a static IP from the router instead.
Inside the LAN its working fine, I can access the webserver by its internal IP (in my example 192.168.1.200) and the other way around is working too, I can mount my network drives inside the virtual machine with no problem.
But when I tried to install another PHP extension, I noticed that the internet connection doesnt work anymore after disabling DHCP. Checking that by pinging Google results in an "unknown host" error.
I set the network adapter to network bridge in the settings of the virtual machine when I followed the tutorial and I actually don't know what has been set there before. Can this be an error in the VirtualBox configuration or is my network configuration in Ubuntu wrong?
My /etc/network/interfaces looks like the following:
Code: Select all
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.200
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1I hope this is easy for someone with a bit more experience in networks, thanks for some help in advance