Warning: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in ..../includes/class_bootstrap.php(430) : eval()'d code on line 123
HOW TO: Get basic router functionality from the openWRT firmware
Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: HOW TO: Get basic router functionality from the openWRT firmware

  1. #1

    HOW TO: Get basic router functionality from the openWRT firmware

    Ok, thought I'd start off the openWRT HOWTOS :P

    Part 1. Flashing the firmware
    1. Get the openWRT firmware (with modified mount_root) from here
    2. Get the root2hdd.sh script from here
    3. Unrar that file to give you the .trx image
    4. Put your router into flash mode (unplug power, hold down EZ-Setup and plug power back in. Hold down EZ-Setup until ready light stops flashing)
    5. Check that your computer can ping the router at 192.168.1.1
    6. Upload the trx image ('tftp -i imagename.trx' in windows or
      Code:
      tftp 192.168.1.1
      tftp>binary
      tftp>trace
      tftp>put imagename.trx
      for linux
    7. Wait 30 seconds, then unplug router and plug back in again
    8. once the ready light has gone out, telnet to 192.168.1.1.
    9. Set a password for root
      Code:
      passwd root
      (from now on, you will have to login via ssh instead of telnet)
    10. do 'fdisk -l' to list the detected hard drives - note the name of the IDE drive device
    11. do 'fdisk /dev/harddrivename'
    12. issue the following commands to create a new ext3 partition WARNING - this will erase anything on your drive!
    13. n, enter, 1, enter, enter, t, enter, 1, enter, 83, enter
    14. pressing p and enter should show that you now have one partition on the disc of type linux
    15. press w and enter to write the disk changes, then do 'fdisk -l' again to get the partition name
    16. copy root2hdd.sh to /tmp using scp (puttyscp.exe for windows I think)
    17. modify the boot_partition variable to your hard drive device (with the part1 on the end)
    18. chmod +x /tmp/root2hdd.sh
    19. /tmp/root2hdd.sh
    20. as long as this completes successfully, you should now be able to reboot your router


    Part 2. Configuring the router
    Some extra packages need to be installed to enable full functionality of the router. You can compile them yourself by downloading the openWRT kamikaze source and putting M next to programs you want in the configuration(important ones listed below) - you can now find the ipkgs in a rar file here - kindly hosted by markc.
    1. Install the important ipkgs - that is, bridge, dnsmasq, iptables, the updated kernel with wifi drivers, kernel module brcm-wl.
    2. edit dnsmasq.cont as required (you need to set the fields with @@ parameters in them)
    3. start and stop the firewall to create the /etc/config/firewall file (/etc/init.d/firewall start/stop)
    4. follow the examples in that firewall file to setup port forwarding as required
    5. symbolically link /etc/init.d/dnsmasq to /etc/rc.d/S41dnsmasq - so that it runs on startup
    6. do the same with /etc/init.d/firewall (choose a different number from 41 for conventions sake )
    7. NOTE: the default layout of firewall will now prevent you connecting to ssh from the WAN side, uncomment the 2 rules in /etc/firewall.user to allow login from WAN-side
    8. reboot the router to get the new kernel running
    9. login to the router again and run /sbin/wifi detect > /etc/config/wireless
    10. edit this wireless file as you see fit to match your requirements (change ssid etc) more info on this here
    11. This should give you the basic router setup requirements!
    Last edited by d3viant; 29-01-2007 at 19:15.

  2. #2

    Downgrade feasibility

    Excellent tutorial, thank you very much. Some questions from a novice... is it possible to back out of this firmware upgrade and easily go back to the standard ASUS or kfurge firmware? ie; does the tftp part of CFE remain intact even after uploading this foreign firmware?

    Would it be feasible to use a USB flashdrive instead of the internal HDD for a test run for a first time install of kamikaze?

    And just curious, why did you use rar on the firmware image instead of, say, zip ?

  3. #3
    It IS possible to go back to the original ASUS firmware - there are instructions for that here

    It is also possible to use a usb drive(although you will need to compile a custom firmware image with USB support built in for this), when you do your fdisk -l steps, create an ext3 partition and point root2hdd.sh to the usb drive instead of the internal drive (it should be fairly easy to tell from drive sizes which device is your usb key)

    The original image wasn't created by me - I would have used .tar.gz instead of rar

    I think rar has slightly better compression ratios than zip does on a binary file though...

  4. #4
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    190
    Quote Originally Posted by d3viant View Post
    it would be good if someone could host some pre-built important ipkgs somewhere


    Path :: http://back2basic.shacknet.nu/WL700Ge/packages/
    PackageList
    Last edited by back2basic; 29-01-2007 at 16:56.

    Openwrt or Custom Firmware on asus? - http://wl700ge.hezik.nl/ - Http://wl700g.homelinux.net

    My ASUS collection: WL500gp(80GB usb-hdd - Running OpenWrt Kamikaze 7.09) | WL700gE(250GB - Running OpenWrt Kamikaze 8.09rc1)

  5. #5
    Quote Originally Posted by back2basic View Post
    I recently deleted all the packages on ubuntu, But I'm comling them agian and will share m with you on my webserver (200GB)

    Path :: http://back2basic.shacknet.nu/WL700Ge/(Still compiling please be patient )
    markc has kindly offered to host the packages also - don't worry about it if it'll take you too long to compile the ipkgs again - I already have a set on my home machine.

  6. #6
    Join Date
    Mar 2006
    Location
    Lisbon
    Posts
    5

    Smile Run it Access Point

    Hi

    Thanks for the Tutorial!

    One question If I whant to run ti as Access Point the packages that I don't need is the dnsmask and iptables isn't it?

    I should be easy to configure isn't it? I'm a little afrid of not beening able set it up.


    Thanks,
    Ricardo

  7. #7
    For a bridge/access point then you need dnsmasq and iptables installed.

    I am not sure exactly why, but iptables is needed to actually make the router route network packets. Dnsmasq is used to give out IP addresses, so I would recommend using this even if you make dnsmasq assign permanent IP addresses to MAC addresses of network cards.

  8. #8
    please help
    Part 2. Configuring the router
    Some extra packages need to be installed to enable full functionality of the router. You can compile them yourself by downloading the openWRT kamikaze source and putting M next to programs you want in the configuration(important ones listed below) - you can now find the ipkgs in a rar file here - kindly hosted by markc.

    1. Install the important ipkgs - that is, bridge, dnsmasq, iptables, the updated kernel with wifi drivers, kernel module brcm-wl.
    2. edit dnsmasq.cont as required (you need to set the fields with @@ parameters in them)


    I edit /etc/config/network bridge eth0.0 10.1.1.1
    vi /etc/dnsmasq.conf

    # filter what we send upstream
    domain-needed
    bogus-priv
    filterwin2k
    localise-queries

    # allow /etc/hosts and dhcp lookups via *.lan
    local=/lan/
    domain=lan
    expand-hosts
    resolv-file=/tmp/resolv.conf.auto

    @ifdef dhcp_enable
    dhcp-range=eth0.0,10.1.1.2,10.1.1.254,255.255.255.0,45h
    dhcp-authoritative
    dhcp-leasefile=/tmp/dhcp.leases
    @endif
    @ifdef wan_ifname
    except-interface=@@wan_interface@@
    @endif

    # use /etc/ethers for static hosts; same format as --dhcp-host
    # <hwaddr> <ipaddr>
    read-ethers

    # default gateway and dns for LAN ports
    dhcp-option=eth0.0,3,10.1.1.1,10.1.1.2
    dhcp-option=eth0.0,6,10.1.1.1,10.1.1.2



    eth0.0<> bridge (br-lan)

    root#:dnsmasq

    dnsmasq: bad option at line 13 of /etc/dnsmasq.conf
    dnsmasq: bad option at line 17 of /etc/dnsmasq.conf
    dnsmasq: bad option at line 18 of /etc/dnsmasq.conf
    dnsmasq: bad option at line 20 of /etc/dnsmasq.conf
    dnsmasq: failed to create listening socket: Address already in use

    even reboot takes no effect


  9. #9
    Quote Originally Posted by Amlet1 View Post
    please help
    Part 2. Configuring the router
    Some extra packages need to be installed to enable full functionality of the router. You can compile them yourself by downloading the openWRT kamikaze source and putting M next to programs you want in the configuration(important ones listed below) - you can now find the ipkgs in a rar file here - kindly hosted by markc.

    1. Install the important ipkgs - that is, bridge, dnsmasq, iptables, the updated kernel with wifi drivers, kernel module brcm-wl.
    2. edit dnsmasq.cont as required (you need to set the fields with @@ parameters in them)


    I edit /etc/config/network bridge eth0.0 10.1.1.1
    vi /etc/dnsmasq.conf

    # filter what we send upstream
    domain-needed
    bogus-priv
    filterwin2k
    localise-queries

    # allow /etc/hosts and dhcp lookups via *.lan
    local=/lan/
    domain=lan
    expand-hosts
    resolv-file=/tmp/resolv.conf.auto

    @ifdef dhcp_enable
    dhcp-range=eth0.0,10.1.1.2,10.1.1.254,255.255.255.0,45h
    dhcp-authoritative
    dhcp-leasefile=/tmp/dhcp.leases
    @endif
    @ifdef wan_ifname
    except-interface=@@wan_interface@@
    @endif

    # use /etc/ethers for static hosts; same format as --dhcp-host
    # <hwaddr> <ipaddr>
    read-ethers

    # default gateway and dns for LAN ports
    dhcp-option=eth0.0,3,10.1.1.1,10.1.1.2
    dhcp-option=eth0.0,6,10.1.1.1,10.1.1.2



    eth0.0<> bridge (br-lan)

    root#:dnsmasq

    dnsmasq: bad option at line 13 of /etc/dnsmasq.conf
    dnsmasq: bad option at line 17 of /etc/dnsmasq.conf
    dnsmasq: bad option at line 18 of /etc/dnsmasq.conf
    dnsmasq: bad option at line 20 of /etc/dnsmasq.conf
    dnsmasq: failed to create listening socket: Address already in use

    even reboot takes no effect

    try to chage your eth0.0 to br-lan that on your config

  10. #10
    Quote Originally Posted by hmantsao View Post
    try to chage your eth0.0 to br-lan that on your config
    I change to br-lan.Not work.

  11. #11
    The eth0.0 references shouldn't go in the IP address sections.

    It should be like this:

    dhcp-range=10.1.1.2,10.1.1.254,255.255.255.0,45h

    To specify one interface to run dnsmasq on (ie br-lan) remove the line

    except-interface=@@wan_interface@@

    and put in

    interface=br-lan

  12. #12

    root2hdd.sh

    I got as far as step 16. I use ubuntu as my main OS so I used the command:

    scp root2hdd.sh root@192.168.1.1:/tmp/root2hdd.sh

    This command transfers the file immediatly and I can go to the router and chmod the file to add execute. ls -al command verifies I have execute rights.

    However,

    the command

    /tmp/root2hdd.sh

    gives

    -ash: /tmp/root2hdd.sh: not found

    anyone know what may be the issue. Is there an alternative to the shell script?

    Thanks,

    Owen

  13. #13
    Quote Originally Posted by mecheng View Post
    I got as far as step 16. I use ubuntu as my main OS so I used the command:

    scp root2hdd.sh root@192.168.1.1:/tmp/root2hdd.sh

    This command transfers the file immediatly and I can go to the router and chmod the file to add execute. ls -al command verifies I have execute rights.

    However,

    the command

    /tmp/root2hdd.sh

    gives

    -ash: /tmp/root2hdd.sh: not found

    anyone know what may be the issue. Is there an alternative to the shell script?

    Thanks,

    Owen
    You probably need to convert the root2hdd.sh script to unix-style..

    Anyway, I have 2 issues:

    1. For some reason, the router still boots from it's own ROM instead om the hdd, after a cold-start (power removed and reconnected). If I issue the reboot command, the router will boot from the hdd

    2. I'm having big problems changing the IP address. I want to set the ip to 192.1680.0.100. I changed ip_address from nvram (and commited) and changed /etc/config/network. Now I reboot (poweroff required I believe) and the router comes up at the right IP. However, due issue 1, I have to reboot. And after this, I can no longer connect to the router (possibly the /etc/config/network on the hdd is a different one than the one I changed?)

  14. #14
    Join Date
    Jan 2007
    Location
    Netherlands
    Posts
    190
    use the new image created by flippo on http://wl700g.homelinux.net
    then change root to a usb stick youre problem shout be gone then

    Openwrt or Custom Firmware on asus? - http://wl700ge.hezik.nl/ - Http://wl700g.homelinux.net

    My ASUS collection: WL500gp(80GB usb-hdd - Running OpenWrt Kamikaze 7.09) | WL700gE(250GB - Running OpenWrt Kamikaze 8.09rc1)

  15. #15

    hi all

    Please help.DC++ correct working passiv mode.
    Activ mode It is possible??
    please help rules to iptables

    I used rules

    iptables -t nat -A PREROUTING -d 10.155.15.3 -p tcp -m tcp --dport 23296 -j DNAT --to-destination 10.1.1.1:23296

    iptables -t nat -A PREROUTING -d 10.155.15.3 -p udp -m udp --dport 23297 -j DNAT --to-destination 10.1.1.1:23297

    I used strong dc++.Search not working to activ mode.Please help.
    Last edited by Amlet1; 21-09-2007 at 21:14.

Page 1 of 2 12 LastLast

Similar Threads

  1. Firmware upgrading HOWTO
    By Styno in forum WL-500g/WL-500gx Tutorials
    Replies: 6
    Last Post: 30-07-2008, 21:00
  2. Replies: 0
    Last Post: 24-01-2007, 03:54
  3. How-to: updating the firmware (need comments)
    By GerardNL in forum WL-700g Tutorials
    Replies: 13
    Last Post: 25-09-2006, 07:25
  4. Completely new WL700gE router crashed after firmware update - plz help!
    By ClaudeX in forum WL-700g Firmware Discussion
    Replies: 4
    Last Post: 20-07-2006, 00:03
  5. WL700GE openwrt or Oleg firmware
    By lewislin in forum WL-700g Q&A
    Replies: 7
    Last Post: 30-06-2006, 16:50

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •