Page 1 of 1
Internet access on client with DHCP running on internal network
Posted: 29. Oct 2020, 16:53
by romavyn
Hi,
I'm trying to create a VLAN network like this:
DHCP ---------- CLIENT1
\ |
\---------CLIENT2
So I've added 2 adapters for each machine with Adapter1 set to Bridged Adapter and Adapter2 = Internal Network.
DHCP server is working fine, giving the IP addresses for the clients, and clients got access to the internet.
But the machine with DHCP cannot access the internet.
Used enp0s8 as interface for DHCP, and i'm not sure if i have to do anything with enp0s3.

- interfaces.JPG (47.7 KiB) Viewed 986 times

- ifconfig.JPG (105.65 KiB) Viewed 986 times

- ping.JPG (66.54 KiB) Viewed 986 times
Do you have ideas how to fix it?
Regards,
Roman
Re: Internet access on client with DHCP running on internal network
Posted: 29. Oct 2020, 16:55
by scottgus1
Please right-click each guest in the main Virtualbox window's guest list, choose "Show in Explorer/Finder/File Manager". In the window that opens, zip the guest's .vbox file, and post the zip file, using the forum's Upload Attachment tab. Please label which one is which.
Re: Internet access on client with DHCP running on internal network
Posted: 29. Oct 2020, 23:24
by romavyn
Hi,
Only .vbox files?
- O-RU.zip
- client1
- (1.69 KiB) Downloaded 3 times
Re: Internet access on client with DHCP running on internal network
Posted: 30. Oct 2020, 08:35
by BillG
DHCP might be working, but how is the internal network supposed to see the Internet? You are using private IP subnets. They need a NAT router somewhere to access the Internet.
The best idea is to give the guests just one NIC and run one vm as a router between the private LAN and the Internet via your physical LAN router. The router vm has one NIC in the internal network and one bridged to your physical LAN. The internal NIC is the gateway for your internal (virtual) LAN and the external NIC is set to bridged.
Internet
|
physical NAT router -> physical LAN (including host PC)
|
192.168.1.x (set to bridged - network config from physical NAT router)
virtual router
192.168.2.254 gateway blank
|
vms 192.168.2.x dg 192.168.2.254 (network config from local DHCP)
You don't even need DHCP on the internal network if you run the virtual router as a NAT router. You just need to set its private NIC manually to be the default gateway for the LAN, then set up the virtual router as a NAT router and it will do the DHCP for you.
There are plenty of router appliances you can use - pfSense works well with VirtualBox.