[SOLVED] Is there an ifconfig for VirtualBox? (pfSense guest)
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is there an ifconfig for VirtualBox? (pfSense guest)
Hi, I'm looking for a way to get access to pfSense in VirtualBox. Host is WinXP pro. VirtualBox 4.3.10r93012. pfSense 2.1.1 i386. XP pro has the Resource Kit and (MS) Services for Unix installed.
The host is an HP laptop, and the pfsense addresses are: WAN - on a DHCP, so different every time I connect to a different wifi. (I travel alot). And LAN: 192.168.1.1 - the default. But neither IE nor Firefox will access the webgui of pfSense (FF gives the "Problem loading page" error). So I went to the pfSense site, and read the install page, booted the live CD image, configured from the text menu, then installed (option 99) to the virtual HDD. I've tried setting both network cards to NAT, Bridged, Internal Host Only, in various combinations, and I simply cannot get to the webgui. So I was hoping that I could use an 'ifconfig' like command in VirtualBox (which I couldn't find anything like that in the VB manual) to list addresses, and hopefully that would allow me access. I've searched for Youtube videos and documents elsewhere on how to configure pfSense (in VirtualBox), but so far they all say bascially the same thing, and it makes me wonder why I cannot access the webgui like everyone else. Do I simply need a wired connection for the host and always use the same addresses (in other words, am I asking too much from VirtualBox and pfSense and my constant travelling?) Perhaps I'm asking the wrong question, and I just need to understand all about networks to be able to setup a whole network? You experts, what am I looking for? Thanks.
gentisle
I'm not quite clear on what you are asking. It seems to me that this is not an issue with VirtualBox, but with the pfsense VM.
ifconfig is not a VirtualBox command, it is a Linux command. In every Linux distro I've run in VirtualBox, I've been able to run the ifconfig command within the VM.
I've not used pfsense, but it seems to me that, for an external command to reach the pfsense VM, port-fowarding for the appropriate port to the VM would need to be set up in your router, and that same port must be open in the VM's firewall. Consequently, the pfsense virtual instance must needs a static ip address within the router's subnet, which necessitates a bridged adapter for the VM.
A client on a vm has a few ways to configure. One is to use Bridged where normally the host's ip will appear on the client.
Second is NAT where the VM has a virtual router. One can assign an IP within the range on the virtual router by some static address either ip command or ifconfig or other means.
There is also a local virtual network which in some cases may be useful.
Some vm's have a way to assign the ip and mac address in the client configuration also.
In many of the examples one has an ability to add in secondary type IP addresses to either real or virtual nic's.
To frankbell: I guess I asked the question wrong. In Linux [Windows], one can if[p]config to see what addresses the computer's NICs are using. That is what I want for VirtualBox. VirtualBox adapter in my WinXP installation is 192.168.56.1 (the default install?). Aren't the guests supposed to be on the same net/subnet? Should I edit Windows network config and give the VirtualBox adapter a different address (one that is actually on the network I'm currently connected to?
To jefro: While I can find those settings that you mentioned, I don't really understand what you are saying. Which leads me to believe my networking knowledge is too limited to do what I want to do.
Thanks guys.
To Emerson: When I said Linux, I meant in the generic Unix form (if there is a such thing). I know that both Linux and BSD, as well as other Unix such as Solaris (Open or not) use the ifconfig command.
To Everyone, Anyone: Am I so poor at communicating correct English that I should not even post a question? Am I that difficult to understand?
If you want the VMs in the same subnet as the rest of the machines in your network, you need to set a "Bridged" adapter in the VB network settings. You can't do this with NAT.
After you select "Bridged," there's an item called, I think, "Advanced" that appears beneath it. Click on that and you will see what your adapter choices are as sensed by VB. If more than one adapter appears in the list, you may need to test to see what the correct adapter selection is.
Don't feel bad about your communication. A lot of this is complicated stuff, especially when you add on an extra layer of jargon and technical terms in another language. Asking questions is how we get from "I think I understand" to "we understand."
Don't feel bad about your communication. A lot of this is complicated stuff, especially when you add on an extra layer of jargon and technical terms in another language. Asking questions is how we get from "I think I understand" to "we understand."
Thanks.
Quote:
If you want the VMs in the same subnet as the rest of the machines in your network, you need to set a "Bridged" adapter in the VB network settings. You can't do this with NAT.
Well, I can set the 2 NICs to bridged. Yes, the "Advanced" is underneath that, and you can select which NIC. One video from YouTube, the guy claimed he had problems w/everything except the Intel cards. I'll use them.
Quote:
After you select "Bridged," there's an item called, I think, "Advanced" that appears beneath it. Click on that and you will see what your adapter choices are as sensed by VB. If more than one adapter appears in the list, you may need to test to see what the correct adapter selection is.
Now my question becomes: Should I change the VirtualBox adapter from 192.168.56.1 to 192.168.1.xxx or 10.0.0.xxx depending on the gateway of the router I connect to?
There is a link there which I followed, if not active anymore i can forward you the saved html.
I use kvm and virtualize pfsense. Pfsense is now acting as my main router and firewall in a production setup.
In short I just create the bridges (using cli on the host running virtual machines) on actual network interfaces. I then install pfsense and use the bridge as a network interface on the pfsense vm. I let pfsense act as the dhcp and dns servers and then you let clients get their info from the pfsense box. So I do not use the built in virtual networks and configure them using the hypervisor management software.
I would suggest though that virtual box not be used for a production system. Kvm or vmware are bettr suited to that department.
As far as intel is concerned, yeah they do work better. I tried passing through a realtek and it was absolute nonsense. Keeps dropping the link and cannot get a wan ip from isp. When i directly pass the intel card, it works like magic.
Have a look at the pfsense forum too. Some say they have success loading virtio drivers. That would be great to use. I never really tried them since now the bridges that i have is not a performance bottle neck.
ericson007: Thanks. That looks like it might help. Production machine? Windows XP? Ha! This is the only PC I have. I have no other choice, and right now, I'm not interested in buying VMware. KVM is out b/c I cannot put Linux on this machine. I do need a new computer, but don't have the money now, so I'll have to make this work. Thanks everyone, I'm marking this one solved, though anyone can post additional info if they so desire.
BTW, last night, I tried again. After pfSense booted, I changed the LAN IP via the menu @ the cli. I picked a random number in the range of the router where I was (192.168.0.xxx) and I was able to get into pfSense. However, getting in and not knowing how to configure it, I'm locked out this morning. So another reinstall or reset of the pfSense settings. Guess I've got a lot to learn before I can do this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.