Can't apt-get when running Bridged NIC on Oracle Virtualbox Ubuntu Server 14.04
-
@scottalanmiller I hope you can help me on this one.
So I will first mention I added a second virtual adapter and have one in NAT mode and one in Bridged mode.
Some background:
So I'm spinning up a website to start trying to build a portfolio of articles and work. I plan on using NoIP.com for what I need (glad they are finally back up after the MS ordeal). Anyways, what I'm doing is spinning up a LAMP server on my laptop. which has plenty of resources, with the disk being formatted as a VMDK, and I'll migrate this to my ESXi server when it arrives from NY. This server is going to host my site and, per Scott's recommendation, I'm setting up Wordpress on it.
So my issue: in order to access the server as a webserver from outside itself, I need the adapter to be either in host-only, which I don't want, or bridged mode. When in bridged mode, it pulls an address via DHCP, same as my laptop, and all is good. However, if I need to install a package via apt-get or whatever, it never connects. I can ping Google and it resolves. It resolves the hostname to an IP for the Ubuntu repository. It just will not connect. However, when I change the adapter to NAT (after shutting down of course), it will allow me to run apt-get with no issue. I thought firewall issue on the FiOS router maybe? However, lowering the settings on that didn't make any difference. I can't figure out why it works one way and not another.
Does it use a port my router could be blocking? I appreciate the help!
Thanks,
A.J. -
Can't be related to FiOS as that is external to the computer completely and would affect all options equally.
-
Why do you have two NICs on a VM like this?
-
My guess is that you are having gateway issues caused by having two NICs in different configurations.
-
Having two NICs FIXED the issue. It was having one or the other that was the issue.
-
@ajstringham said:
Having two NICs FIXED the issue. It was having one or the other that was the issue.
So having only one bridge NIC did not work?
-
@scottalanmiller said:
@ajstringham said:
Having two NICs FIXED the issue. It was having one or the other that was the issue.
So having only one bridge NIC did not work?
One bridge NIC works for everything but apt-get. One NAT NIC works for everything except accessing it like a web server. Using two balances it out and it works but I can't understand why a bridge connection would not work with apt-get while a NAT would...
-
@ajstringham said:
@scottalanmiller said:
@ajstringham said:
Having two NICs FIXED the issue. It was having one or the other that was the issue.
So having only one bridge NIC did not work?
One bridge NIC works for everything but apt-get. One NAT NIC works for everything except accessing it like a web server. Using two balances it out and it works but I can't understand why a bridge connection would not work with apt-get while a NAT would...
Maybe apt is misconfigured. Might be a good chance to work with CentOS 7.
-
@ajstringham This might be a long-shot but have you compared your ifconfig- a output to your /etc/network/interfaces output on your Ubuntu VM? What about using just NAT? Maybe the actual NIC/hardware doesn't "like" (very technical) IP aliasing since apt traffic on a NAT config is working.
(Just my train of thought, might be completely irrelevant.) -
@MattKing said:
@ajstringham This might be a long-shot but have you compared your ifconfig- a output to your /etc/network/interfaces output on your Ubuntu VM? What about using just NAT? Maybe the actual NIC/hardware doesn't "like" (very technical) IP aliasing since apt traffic on a NAT config is working.
(Just my train of thought, might be completely irrelevant.)It's possible. I'm honestly not going to worry about it. If having two NICs fixes it, great. Was more curious if anyone might know why off-hand. Thanks though!
-
@ajstringham Fair enough; "If it fits, I sits" just offering a look!
-
This is a really weird issue that I'd really like to figure out.
-
@scottalanmiller said:
This is a really weird issue that I'd really like to figure out.
I would like to know why as well but it's not worth my time. If having one of each virtual NIC fixes it on Virtualbox, so be it. I have other things to worry about...lol
-
@ajstringham said:.
I would like to know why as well but it's not worth my time. If having one of each virtual NIC fixes it on Virtualbox, so be it. I have other things to worry about...lol
Actually, you talked about moving it. So this kind of hack is a really bad idea. If you are just moving the web directory, then that is different. Either way, this means something is seriously wrong. That is not a good sign for the health of the VirtualBox install itself.
-
@JaredBusch said:
@ajstringham said:.
I would like to know why as well but it's not worth my time. If having one of each virtual NIC fixes it on Virtualbox, so be it. I have other things to worry about...lol
Actually, you talked about moving it. So this kind of hack is a really bad idea. If you are just moving the web directory, then that is different. Either way, this means something is seriously wrong. That is not a good sign for the health of the VirtualBox install itself.
I doubt it is VBox related. Probably just an odd network config.
-
@JaredBusch said:
@ajstringham said:.
I would like to know why as well but it's not worth my time. If having one of each virtual NIC fixes it on Virtualbox, so be it. I have other things to worry about...lol
Actually, you talked about moving it. So this kind of hack is a really bad idea. If you are just moving the web directory, then that is different. Either way, this means something is seriously wrong. That is not a good sign for the health of the VirtualBox install itself.
I actually updated to the absolute latest version of Virtualbox right before I started the whole process, so I honestly don't know why it'd be a Virtualbox issue...I might try rebuilding the entire VM, from the VMDK up.
-
@ajstringham Got for the RC of CentOS 7. Get the maximum value from the effort.
-
I'll do that now.
-
@ajstringham said:
I'll do that now.
Awesome. CentOS 7 is looking pretty good. I've got one instance running. New thing.... default filesystem is XFS!
-
@scottalanmiller said:
@ajstringham said:
I'll do that now.
Awesome. CentOS 7 is looking pretty good. I've got one instance running. New thing.... default filesystem is XFS!
I'm creating the VMDK now. My only concern is that, all my research suggests Ubuntu is the best distro to run a LAMP server on. I'm also much more familiar with Debian systems over RPM...