H2KFM

I. OpenWRT in VirtualBox
------------------------

  https://wiki.openwrt.org/doc/howto/virtualbox

> C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" convertfromraw openwrt-15.05-x86-generic-combined-ext4.img openwrt.vdi --format VDI

Converting from raw image file="openwrt-15.05-x86-generic-combined-ext4.img" to file="openwrt.vdi"...
Creating dynamic image with size 55050240 bytes (53MB)...

dmesg boot messages scroll by
Press Enter to activate the console

To shutdown:

  # halt
  
II. Install Python 2.7
----------------------

  https://wiki.openwrt.org/doc/packages?s[]=opkg

  # opkg update
  # opkg list | wc -l
  4530
  # opkg install python

Weird behaviour
---------------

with /etc/config/network

  config interface 'lan'
      option ifname 'eth0'
      option type 'bridge'
      option proto 'static'
      option ipaddr '192.168.1.1'
      option netmask '255.255.255.0'
      option dns '8.8.8.8'
      option ip6assign '60'
    
  config interface 'wan'
      option ifname 'eth1'
      option proto 'dhcp'

  config interface 'wan'
      option ifname 'eth1'
      option proto 'dhcpv6'
      
1. doesn't provide DNS to computers on eth0 ('internal network')

2. gets somewhere ip 10.0.3.15 on eth1 ('NAT')
   found workaround: Use NatNetwork instead 
   (10.0.2.0/24, [v] Supports DHCP)
   
Notes
-----

After editing and saving /etc/config/network you need to execute

  /etc/init.d/network reload

Tips
----

SSH

  /etc/init.d/ssh start
  /etc/init.d/ssh enable # make permanent
  
Accessible from 192.168.1.x after (Firewall masquerading) 

  /etc/init.d/firewall (re)start
  /etc/init.d/firewall enable
  
FIREWALL

  /etc/init.d/firewall disable # script buggy, 
                               # after restart firewall is up again.
  