[Resolved] How to setup FreeBSD Networking?

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
Objective Living
Posts: 3
Joined: 14. Dec 2012, 05:08

[Resolved] How to setup FreeBSD Networking?

Post by Objective Living »

Hello, I'm new to virtualbox. I just installed the latest FreeBSD 9 DVD iso into virtualbox without any issues, following FreeBSD's install instructions. I have run into a snag though getting on my home network. My router is at 192.168.1.1 and I manually configured FreeBSD to be 192.168.1.10, subnet 255.255.255.0. I tried booting virtualbox with the nic set as both NAT & bridged but I can't connect either way. I'm trying to avoid DHCP as I'm setting up a test web server and I'd like it to be available to my home network if possible. I believe the issue is either in FreeBSD or virtualbox as I can't even ping one from the other, much less get out to my home network or the web. Any advise would be much appreciated.

Cheers
Last edited by Objective Living on 14. Dec 2012, 22:08, edited 1 time in total.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: How to setup FreeBSD Networking?

Post by noteirak »

You have two choices here :
1. Set your NIC to Bridged (recommended). This will make your guest appear on the network just like any other machine you would have physically plugged in your network.
2. Set your NIC to NAT. This will turn your host into a router and you will need to setup port forwarding to your guest aswell as open the required port on your host if you have a firewall on it. You also can use a specific range or DHCP (given by the host). For more info on fine-tuning NAT, look here.

Either way, to debug this, set the NIC inside the guest as DHCP for now, let's see if that works out of the box already. Only after we will move towards static IPs.

Once you've setup DHCP, please post your interface info.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Objective Living
Posts: 3
Joined: 14. Dec 2012, 05:08

Re: How to setup FreeBSD Networking?

Post by Objective Living »

Ok, virtualbox set back to bridged network (does it matter that my mac is running on wireless?) and I'm using the 82540EM NIC with promiscuous mode set to deny and the cable connected box checked.

Is there a way to copy the text from virtualbox rather than just posting screenshots? And what info do you need exactly, the output of netstat -rn?
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: How to setup FreeBSD Networking?

Post by noteirak »

I need to see the details of the NIC, so ip, subnet, etc etc. equivalent of ifconfig on debian.
A screenshot is fine
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Objective Living
Posts: 3
Joined: 14. Dec 2012, 05:08

Re: How to setup FreeBSD Networking?

Post by Objective Living »

I discovered my very stupid mistake. I assumed the wired nic in FreeBSD would run over my wireless connection. I plugged my laptop directly into my router and voilà. So i guess my question needs to be, how do I setup a wireless nic in FreeBSD because its not feasible for me to keep my laptop wired to my router all the time. Ether that or I need to use the nat settings, but is that the best route to go?

Thanks again.
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: [Resolved] How to setup FreeBSD Networking?

Post by noteirak »

Bridging on wireless does work, but there might be some trick to make it work with FreeBSD yes, I never really used FreeBSD so I cannot help you with that one.
NAt is fine, it just requires a bit more configuration (setting up static lease in the DHCP, port forwading) but it will work.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Post Reply