it's been two days (and nights) I'm trying to set up my dreamplug (that was working fine up to now) to act as a router; basically I'd like to connect my windows PC to eth0 being able to see the SAMBA share I created on the USB disk connected to the Dreamplug. I'd also like to be able to connect to the Internet from the above Windows PC connected to eth0


eth0: connected to my Windows PC wired
eth1: connected to the Internet and gets the IP address from my router via DHCP
Wifi: disabled

I'm using Debian Wheezy.

Following some posts around I modified /etc/network/interfaces, initSetup.sh, sysctl.conf as follow:


auto lo
iface lo inet loopback

auto eth0
        iface eth0 inet static

auto eth1
iface eth1 inet dhcp

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

/etc/init.d/udhcpd start # start DHCP server

# Set leds
echo 1 > `eval ls /sys/class/leds/guruplug\:green\:wmode/brightness`
echo 0 > `eval ls /sys/class/leds/guruplug\:red\:wmode/brightness`


interface eth0
opt      lease  86400
opt     router
opt     subnet
opt     dns
opt     domain     localdomain
max_leases     101
lease_file     /var/lib/udhcpd.leases
auto_time       5
I also installed bind9 to share the DNS with my Windows PC connected to eth0 (I also removed it just to check if the problem lied there)

eth1 works fine, gets the IP address from my ISP Router and connects to the Internet


Whenever I connect a LAN cable to eth0 (my Windows PC on the other side):

a) the PC does not get an IP address no matter how many times I restart udhcpd or the networking service
b) filesystem gets immediately corrupted, I cannot access files in etc/ and in many other locations, I have to take out the Dreamplug internal SD, insert it in my Ubuntu PC and run e2fsck in order to fix all the problems it finds. If I don't do ths the Dreamplug is not able to restart. the problems e2fsck finds are (just a few lines):

e2fsck 1.41.11 (14-Mar-2010)
e2fsck: Group descriptors look bad... trying backup blocks...
Superblock needs_recovery flag is clear, but journal has data.
Recovery flag not set in backup superblock, so running journal anyway.
dp-rootfs: recovering journal
Resize inode not valid.  Recreate<y>? yes

Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong for group #0 (31778, counted=31779).
Fix<y>? yes

Free blocks count wrong for group #1 (31428, counted=30973).
Fix<y>? yes

Free blocks count wrong for group #2 (31359, counted=30947).
Fix<y>? yes

Free blocks count wrong for group #4 (21905, counted=19898).
Fix<y>? yes

Free blocks count wrong for group #5 (22939, counted=9928).
Fix<y>? yes

Free blocks count wrong for group #6 (25060, counted=28039).
Fix<y>? yes

I'm really stuck here, anybody has any idea about why it is happening and how I can fix the problem and configure the Dreamplug as a router?

Thank you very much in advance for your help!!