I am trying to learn about networking and create a FreeBSD virtual machine to act as a router for other virtual machines. I cannot it to work propertly and have the client machine(s) get online.
The FreeBSD machine is configured with two NIC's in VirtualBox.
em0 192.168.0.20 - is a 'Bridged adaptor and functions as the internet as a member of the 192.168.0.0/24 network
em1 10.0.0.1 - is the second 'Internal Adapter' and will be the router for the other machines on the internal network.
I have set gateway_enable="YES" in rc.conf and rebooted.
The client machine is configured with one NIC
eth0 - 10.0.0.10/24 with default router 10.0.0.1
Nameservers I have tested - 8.8.8.8 (Google), 192.168.0.4 (another machine running bind), 10.0.0.1 (BSD router), 68.x.x.x (ISP nameservers) and I still can't ping web hosts.
The client machine can ping localhost, 10.0.0.10 (itself), 10.0.0.1 (BSD virtual rouer), and even 192.168.0.1 (the real router) but it is not actually online and can't ping hosts on the internet.
What am I missing and why can't my machines get online? Do I have to setup NAT? I am having such a confusing time understand how to set this up.
The FreeBSD machine is configured with two NIC's in VirtualBox.
em0 192.168.0.20 - is a 'Bridged adaptor and functions as the internet as a member of the 192.168.0.0/24 network
em1 10.0.0.1 - is the second 'Internal Adapter' and will be the router for the other machines on the internal network.
I have set gateway_enable="YES" in rc.conf and rebooted.
sysctl -a | grep forward
shows that IP forwarding is enabled.The client machine is configured with one NIC
eth0 - 10.0.0.10/24 with default router 10.0.0.1
Nameservers I have tested - 8.8.8.8 (Google), 192.168.0.4 (another machine running bind), 10.0.0.1 (BSD router), 68.x.x.x (ISP nameservers) and I still can't ping web hosts.
The client machine can ping localhost, 10.0.0.10 (itself), 10.0.0.1 (BSD virtual rouer), and even 192.168.0.1 (the real router) but it is not actually online and can't ping hosts on the internet.
What am I missing and why can't my machines get online? Do I have to setup NAT? I am having such a confusing time understand how to set this up.