Virtualbox network setup

  • Again, you don't need to do anything to them besides to bring them up inside OpenMediaVault. That should be achieved by setting them to manual without entering any settings. They will work just fine that way.


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • mbourd, maybe its easiest if either sub or me take a peak via teamviewer, to see where the problem is.


    But before we do that, prepare a net diagram which shows how your testing network is setup. ;)


    Greetings
    David

    "Well... lately this forum has become support for everything except omv" [...] "And is like someone is banning Google from their browsers"


    Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.

    Upload Logfile via WebGUI/CLI
    #openmediavault on freenode IRC | German & English | GMT+1
    Absolutely no Support via PM!

  • This is easily done, I used to have mine setup like this with pfsense. I actually assigned an IP address with the OMV physical additional cards, just a random address not in any of my subnets. This then allowed me to assign LAN interfaces in virtualbox.
    I actually moved away from this setup and put my pfsense on bare metal, I have over a year of uptime no issues. When I ran it virtual it sometimes got a bit flakey and I had to get the wife to reboot OMV as I was away a lot. This was in OMV 0.5 though.

  • Hi james_h, so just give IP addresses to my 2 unused network cards on my OMV server. Let's say, my subnet goes from 192.168.1.100 to 192.168.1.250, I could assign those cards, 192.168.1.90 and 192.168.1.91?


    I had done that before but someone told me not to assign any IP addresses to those 2 unused cards, just assign the IP addresses in VirtualBox.


    Then setup my virtualbox with a router software like PFSense and use the IP address 192.168.1.1 for my new router software?


    Just want to make sure. Thanks in advance.

  • I just assigned something totally different 10.10.10.10 and 10.10.20.10 I seem to remember to the "real" OMV interfaces. This was the only was I could get it to work.
    Once you do this, inside virtualbox you can assign interfaces to the virtual machine and then when you load your pfsense ISO, assign them as interfaces.

  • Hi james_h, I assigned the IP addresses to my 2 network cards reserved for the VirtualBox pfSense router (eth0: 192.168.1.116, eth1: 10.10.10.10 and eth2: 10.10.20.10) but still, I assigned the eth2 to be my WAN and it still couldn't see my cable modems IP address? What am I doing wrong?


    Eth2(WAN) was set as Bridged Adapter and eth1(LAN) as Internal network. the WAN didn't have any IP addresses but my eth1 had the 192.168.1.1.


    What can I try to fix this up?


    Thanks for your help james_h.


    Let me know if you need more info.

  • Hi Mbourd25,


    Please correct me if I am wrong in your setup. I have added comments in red or green color. I will simulate your current setup using the cable or DSL modem connected to your wireless router. Next I will move the connections to your desired setup. Please keep in mind this only my opinion and these steps may not work for you and they are provided as-is. As I mentioned in my previous post it is not recommended to run your pfSense firewall virtual for your home network. I understand you may be trying to save money by not buying another device dedicated as your firewall/router but keep in mind you would be better off running pfSense on dedicated hardware. If you have an older desktop lying around I would suggest you use that instead.


    1st let's look at the ports on OMV itself. You have 3 physical NIC ports
    eth0 is for your OMV machine with the IP of 192.168.116. Your config tells me it is DHCP assigned based on the address range you provided of 192.16.1.100 to 192.168.1.250 which comes from your wireless router. eth0 connects directly to your wireless router. If you connected this to the wireless router, please move this connection to the 8 port gigabit switch after the following changes are made. In OMV I suggest you go to System -> Network -> Select eth0 and click edit. Set the "Method" to "Static". Set the "Address" to 192.168.1.10, "Subnet Mask" to 255.255.255.0, and set the "Gateway" to 192.168.1.1. Leave the other settings alone. Save and apply. You may need to set a static IP on your desktop or laptop to continue. Set your desktop or laptop with an IP of 192.168.1.11 for now using the same Subnet Mask and Gateway. We need this to connect to Virtualbox in OMV. You can change it back to DHCP later.
    eth1 is for your LAN network. eth1 is not connected. Change the Adapter 1 in Virtualbox to "Attached to: Bridged Adapter" and "Name: eth1" Connect this to the 8 port gigabit switch. If you assigned the address of 192.168.1.1 to eth1 in OMV, You need to change the static IP to 192.168.1.x where x equals 2 or some other number. You can also change this to DHCP later.
    eth2 is for your cable or DSL modem. It is not connected. It will directly connect to your cable or DSL modem. This is correct. I will go into more detail below.



    2nd Virtualbox settings in OMV. Your VM of pfSense should be using 2 network adapters.
    In the network settings for Adapter 1 you have "Attached to: Internal network" and "Name: eth1" This is not the correct setting to use. You need to set it to use Bridged Adapter for your LAN connected to the 8 port gigabit switch.
    In the network settings for Adapter 2 you have "Attached to: Bridged Adapter" and "Name: eth2" This is correct. I will go into more detail below. This directly connects to your modem.


    3rd pfSense settings. Once you have started the pfSense VM, the settings should be as follows:
    During setup, you should select "em1" as the network interface for the Internet or "WAN" connection. Set the IP address to DHCP unless your provider has given you a static IP and subnet info.
    During setup you should select "em0" as the "LAN" network for your LAN network. Set this to 192.168.1.1 with the above netmask and gateway information. After you are done, enable DHCP in pfSense to match your network.
    You may need to switch em0 and em1 based on your network settings in OMV.


    Depending on your country and service provider, you may need to copy the MAC address from your modem to "eth2" and "allow all" for "promiscuous mode".


    Hopefully this will point you in the right direction. I wish you the best of luck and share your experience with the OMV community!


    Thanks!


    ShadowZero

  • Hi shadowzero, first of all, thanks for you concerns about me running a router/firewall from my OMV. I can assure you, this is only for testing purposes and to see if it runs ok. I already have another desktop waiting to run this.


    I will try with your settings and let you know how it goes.


    Thanks again for you help, its really appreciated.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!