Page 1 of 2

Virtual NIC Configuration

Posted: 28. Jan 2017, 13:44
by M4UROX
Hello,

Im making a configuration of a firewall (ipfire) on vb and I want to get the red interface on the 192.168 subnet. I think it is in the virtual NIC configuration, and I believe that you make the modification in virtualbox; you have to change the way the virtual NIC is being created. Anyone knows how to do this?

Thank you.

Re: Virtual NIC Configuration

Posted: 28. Jan 2017, 14:56
by socratis
M4UROX wrote:I want to get the red interface on the 192.168 subnet.
I have no clue what that might mean. Can you please explain?
M4UROX wrote:you have to change the way the virtual NIC is being created.
In what sense?

Re: Virtual NIC Configuration

Posted: 28. Jan 2017, 22:53
by M4UROX
Im making a configuration of a firewall (ipfire) and i was getting some problems while connecting with openvpn and someone told me this:
I'm going to concentrate on simplification first. I don't know how much experience you have with VirtualBox, but it has been a while since I used it. I do remember there were several networking modes, and one used a bridged network for the virtuals, putting some rules in it that made it hard to access from the outside.

In this case, I'm assuming you are using the 192.168 subnet for your network, so you want to vpn to a machine on that network. Your firewall does not have that from what I see, so there is no way to connect (ie, I'm assuming if you ping the 10. subnet, you'll get nothing)

IF you have a spare machine you can lose for a quick test, set it up as the IPFire machine (two nic's), assigning one nic to the network at the office (using dhcp is fine), and the other nic to either connect to a baby workgroup switch or even directly to some other machine. Run your test that way to see if it is VirtualBox issues causing the networking wierdness.

I use virtualization for several IPFire boxes, mainly at our NOC, so I know the virtualization does not cause the problem by itself. But the networking I'm seeing does not make sense to me.

IF you do not have a separate machine, figure out how to get the red interface on the 192.168 subnet. I think it is in the virtual NIC configuration, though like I said, it has been a very long time.


Thread Link ( http://forum.ipfire.org/viewtopic.php?f=27&t=18041 )

Re: Virtual NIC Configuration

Posted: 28. Jan 2017, 23:54
by socratis
What I understood from the little that I read is that you try to simulate a network topology. From the 10.0.2.15 address that you mentioned, it seems that you selected the NAT mode for networking in your VM, the easiest to get on the Internet and the default.

If you want to have the VM participate as an equal to the network, you've got to go to the VM Settings » Network » Adapter 1 » Attached to. Set that to "Bridged". Select the actual NIC that you're bridging it to (best if it's wired). Reboot your VM and it will take an IP from your home network, just like if it was another computer. If it's a wireless card that you're bridging to, it might or might not work.

For more information see 6.2. Introduction to networking modes and 6.5. Bridged networking on the User Manual.

Re: Virtual NIC Configuration

Posted: 29. Jan 2017, 14:07
by M4UROX
Hmm but it needs to stay as internal network (im doing this configuration for a school evaluation). Basically i want to be on my personal pc and be able to from there to connect with openvpn to the virtual machine running ipfire. That isnt possible with internal network?

Thank you for taking your time trying to help me.

Re: Virtual NIC Configuration

Posted: 29. Jan 2017, 14:50
by socratis
Draw your network topology. Treat your VM as another computer.

Re: Virtual NIC Configuration

Posted: 30. Jan 2017, 01:36
by M4UROX
Image

Re: Virtual NIC Configuration

Posted: 30. Jan 2017, 02:04
by socratis
Please:
  1. Lower the resolution of the topology. I just returned from the eye doctor and I'm not farsighted, thank you ;). Something that matches approximately the size of the rest of the site?
  2. (the really important part and why I want to see an edited picture) Include your actual computer (where's the host in the diagram?) and put some numbers (like subnets, masks). Color-names mean absolutely nothing in basic networking. And we have to have a common language if you want for us to understand each other.

Re: Virtual NIC Configuration

Posted: 3. Feb 2017, 23:27
by M4UROX
Sorry for the late answer.
https://scontent.fopo1-1.fna.fbcdn.net/ ... e=58979439

Tried to put the image here but it was enormous lol.I think the problem is on the gateway

Re: Virtual NIC Configuration

Posted: 4. Feb 2017, 06:28
by BillG
I doubt that it is simply a default gateway problem. I think you are using the wrong network setting for the vm.

If the vm has an IP of 10.0.2.15 you are using the default setting of NAT. I would suggest that you try bridged mode so that your host has a normal network connection to the vm. The vm should have an IP in the same IP subnet as the host.

Re: Virtual NIC Configuration

Posted: 4. Feb 2017, 17:52
by M4UROX
So you suggest that i use bridged adapter on all the firewall nic and on the pc that is simulating a user or only change the one that i have NAT and leave the others as internal network?

This are my nic settings.

Image
Image

Re: Virtual NIC Configuration

Posted: 5. Feb 2017, 03:17
by BillG
I am more concerned about the network config of your host machine and how you propose to connect your ipfire setup to the physical machine and the physical world. (This has been asked before). It will do nothing otherwise.

I would think that the Internet side of it somehow has to connect to a NIC on the host so that it can connect to the physical Internet. Have you worked out how to do this? Which of the protected networks do you want to connect the Win 7 vm to? I would think it should be the green.

Why did you set adapter 1 to NAT? What was that supposed to achieve?

Re: Virtual NIC Configuration

Posted: 5. Feb 2017, 12:04
by M4UROX
Why did you set adapter 1 to NAT? What was that supposed to achieve?
Teacher told me at school to use adapter 1 as NAT.
I am more concerned about the network config of your host machine and how you propose to connect your ipfire setup to the physical machine and the physical world. (This has been asked before). It will do nothing otherwise.

I would think that the Internet side of it somehow has to connect to a NIC on the host so that it can connect to the physical Internet. Have you worked out how to do this? Which of the protected networks do you want to connect the Win 7 vm to? I would think it should be the green.
Hmm i dont understand what youre trying to say. My problem here is that im trying to connect to the virtual machine of ipfire with openvpn from my personal computer and im getting an error. Someone told me that the problem was probably with the gateway that would need to be changed.

Re: Virtual NIC Configuration

Posted: 6. Feb 2017, 02:33
by BillG
Then I suggest that you ask your teacher for more help.

Re: Virtual NIC Configuration

Posted: 6. Feb 2017, 11:58
by M4UROX
If it was you what would you use?