Saturday, April 05, 2008

X-WRT with TFTPD in minutes

Download X-wrt Whiterussian version.. NOT KAMIKAZE.. I REPEAT.. NOT!~!! (Ignore me, and it wont work.. trust me I tried)

SSH to the router, and copy and paste the following commands one by one.

ipkg update
ipkg install atftp
ipkg install ip
ipkg install kmod-ext2
cd /lib/modules/2.4.30
wget http://www.linuxdingsda.de/mmc.o
echo "0x9c" > /proc/diag/gpiomask
insmod mmc
insmod ext2
mkdir /mnt/sd

echo 'echo "0x9c" > /proc/diag/gpiomask
ifconfig vlan1:0 192.168.100.10 netmask 255.255.255.0
ip route add default via 192.168.100.1 dev vlan1 table default
iptables -I INPUT -p udp -i vlan1 -d 192.168.100.10 --sport 1024:65535 --dport 69 -j ACCEPT

iptables -I INPUT -p udp -d 192.168.0.1 --dport 69 -j ACCEPT
iptables -t nat -I PREROUTING 1 -p udp --dport 69 -j DNAT --to 192.168.100.10:69

iptables -I INPUT 1 -p udp --dport 53 -j ACCEPT

atftpd --no-timeout --daemon --port 69 --user root.root /tftpboot' >> /etc/init.d/S95custom-user-startup

then simply scp the files into /tftpboot and robert is your mothers brother.

Hope that helps :D