I'm experimenting with OpenWrt on VirtualBox. So here is what I have:
- openwrt VM
- Adapter 1 is bridged. Gets 192.168.1.x address from my actual router.
- Adapter 2 is local network "openwrt-lan". Configured as static bridge.
- Debian VM
- Adapter 1 is local network "openwrt-lan". Configured with DHCP.
My /etc/config/network files is like this:
config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config interface 'wan' option proto 'dhcp' option ifname 'eth1' config interface 'lan' option ifname 'eth0' option proto 'static' option ipaddr '192.168.2.1' option netmask '255.255.255.0'
Now Debian VM gets 192.168.2.136 address successfully and can see as far as openwrt. Routing table are like this:
Destination Gateway Genmask Flags Metric Ref Use Iface default OpenWrt.lan 0.0.0.0 UG 0 0 0 eth0 link-local * 255.255.0.0 U 1000 0 0 eth0 192.168.2.0 * 255.255.255.0 U 1 0 0 eth0
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 127.0.0.1 search lan
However, it can't see beyond openwrt. tracert 188.8.131.52 shows that the traffic stops at the openwrt router.
A strange thing also is that on the openwrt VM eth0 doesn't have an IP despite the above configuration. Not sure if it's related.
Any input appreciated.