This is my configuration:
1st (router):
- eth0 is bridget adapter with my physical wlan card (Broadcom 802.11n Network Adapter)
is configured by DHCP and it has already
ip: 192.168.1.108,
netmask: 255.255.255.0,
gateway: 192.168.1.1
- eth1 is VirtualBox Host-Only Ethernet Adapter (Promiscuous Mode:Allow All - but I think in my case it isn't important, is it?)
is configured manually and it has already:
ip: 192.168.0.1
netmask: 255.255.255.0
gateway: 192.168.0.1
dns servers: 8.8.8.8
I wrote in console as root:
Code: Select all
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE -t nat
- eth0 is VirtualBox Host-Only Ethernet Adapter (Promiscuous Mode: Allow all)
is configured manually and it has already:
ip: 192.168.0.2
netmask: 255.255.255.0
gateway: 192.168.0.1
dns servers: 8.8.8.8
From 2nd VM I can ping 192.168.0.1 but I can't ping any address from the Internet (Unknown host for google for example). It looks like router doesn't want to forward packages but I don't know why. I am beginner but the instruction for iptables looks good for me. Do you have any ideas? Of course I have the internet access on the virtual router. What maybe can be important that I use livecd version of CateOS (without installation) so I don't reboot it anytime.