Is in spanish, but quite self explanatory...
So the host is a windows 10 PC with virtualbox 6.1.26 and extension pack.
Then the first VM would be my Ubuntu that acts as a Firewall ( which is Ubuntu 18.04): Ive got in the setup of the vm vbox two network adapters one in mode bridge ( the first, to get ip dynamically from institute), and other for the internal network called cognom.
The config:
Code: Select all
auto lo
iface lo inet loopback
# enp0s3: # Interfície 1
# enp0s8: # Interfície 2
# se activan cuando se producen eventos hotplug en las intefaces de red, como la detección de la tarjeta por parte del kernel,
#la conexión del cable de red, etc
allow-hotplug enp0s3 enp0s8
# enp0s3: # Interfície 1
auto enp0s3
iface enp0s3 inet dhcp
auto enp0s8
iface enp0s8 inet static
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
# enp0s3: # Interfície 1
up iptables -t nat -A POSTROUTING -o enp0s3 -s 192.168.0.0/24 -j MASQUERADE
down iptables -t nat -D POSTROUTING -o enp0s3 -s 192.168.0.0/24 -j MASQUERADE
Static ip address: 192.168.02
Netmask: 255.255.255.0
Gateway: 192.168.0.1
But when i connect from a client in LAN, i can ping to the other machine, and the 192.168.0.1.. but i cant ping or access internet.
How can i do this ??
Somehow NAT isnt working....
For make things easy, we can suppose that the client is also an Ubuntu 18.04 machine.
Code: Select all
auto lo
iface lo inet loopback
# enp0s3: # Interfície 1
allow-hotplug enp0s3
auto enp0s3
iface enp0s3 inet static
address 192.168.0.5
netmask 255.255.255.0
gateway 192.168.0.1
network 192.168.0.0
Thanks