Results 1 to 6 of 6

Thread: Beginners mistakes

  1. #1

    Beginners mistakes

    Hi, There

    After fighting two days to set up my router to work decided to write about the mistakes that I made during installation.

    The Hard Disk partition.

    I hade a big hard disk. I partitioned the first time as r0kanon said.
    http://wl500g.info/showthread.php?t=6222

    2 partitions:
    1st small boot.
    2nd the rest.

    But I just could not get transmission work.
    I suspected the that I could not configure transmission so I thought of making a three partition system so that I can mount the 3rd partition to /tmp/harddisk/

    Than I went for Moody Blue guide:
    http://wl500g.info/showthread.php?t=5909&page=3

    This also did not worked out because my the router kept on out mounting the first boot partition to the /tmp/harddisk/
    In the /tmp/harddisk/ I used to have two mounted partitions. System mounted the boot partition and I mounted the 3rd. Could not unmount the boot. This did not worked out.

    So I thought maybe I’ll go for marcnesium way because if the system auto mounts the first drive than it will mount my big storage partition.
    http://wl500g.info/showthread.php?t=5909

    So I put the small boot partition in the back. But now I do not know why but the system did not did the auto mount.
    But that was not a problem, because I mounted twice and that worked fine.

    Code:
    nano /usr/local/sbin/post-boot
    Code:
    #!/bin/sh
    
    # test if USB disc has been attached
    # if not - then insert needed modules
    if [ ! -d /dev/discs ]
        then
    insmod scsi_mod && insmod sd_mod && insmod usb-storage && sleep 5s
        fi
    
    # Wait for /opt to mount
    mount /dev/discs/disc0/part1 /opt
    mount /dev/discs/disc0/part1 /tmp/harddisk
        i=0
    while [ $i -le 30 ]
        do
    if [ -d /opt/etc ]
        then
        break
        fi
    sleep 1
    i=`expr $i + 1`
        done
    
    # Activate swap
    swapon /dev/discs/disc0/part2
    
    # Set hostname
    hostname my.router
    
    # Synchoronize time
    # For GMT time zone you would want to:
    echo "GMT+0BST-1,M3.5.0/01:00:00,M10.5.0/02:00:00" > /etc/TZ && sleep 2s
    # Then ntpclient can update the time correctly
    ntpclient -l -h 0.uk.pool.ntp.org -c 1 -s
    
    # Run all active services - active means starts with S
    # SAMBA will be started from there if you have follow marcnesium's instructions
    /opt/etc/init.d/rc.unslung

  2. #2

    Second mistake

    My second big mistake was the /opt/etc/init.d/rc.unslung
    Oh, boy, I kept on doing every configuration Till I realized that rc.unslung needs to be created and written right after mounting the data drive.
    rc.unslung is the file that executes the startup configs from the
    /opt/etc/init.d/ directory. (S05syslogd, S10cron, S80busybox_httpd, S97Samba)
    Kept on writing those files and did not realize that they are not working.
    Man, and marcnesium, r0kanon, Moody Blue they never speek about this in their tutorial. If they read this than they shoud update.

    wengi wrote how the file should look:
    http://wl500g.info/showthread.php?t=...ght=rc.unslung

    So in marcnesium tutorial before
    Initiate ipkg and install nano, screen, midnight commander (or in between)
    make sure that you create rc.unslung.
    See wengi's post
    Last edited by Freelancer; 29-07-2007 at 16:11.

  3. #3

    Third mistake

    An other mistake that I made was when I copy pasted the various config files.
    I did not noticed that one of the comment lines ended in the new row.
    like this:

    Code:
    #This is very long comment line and here is carried return
    and this is a new line and it interprets it like a code line.
    I kept on getting the:
    "Unable to find recent transfer stats in syslog"
    error line on my transmission and simply could not figure what is wrong.

    I found the error accidentally.
    As I was browsing trough my config files with the Midnight Commander F3 editor which gave highlight I noticed, hey that is not good.
    So my advice is as you configured all look, with the colorful Midnight Commander at your config files and review them if they are okey. Do not use the black and white Midnight commander or other editor because that is not good.

  4. #4

    A very expensive mistake!

    I just fucked up the post-firewall from the beginning and only now I realized my mistake.
    This costed me a lot of ratio.
    The situation is that you need to open up both TCP and IP so that you became an active torrenter and not a passive one.
    I used to have:

    Code:
    # Allow access to various router services from WAN
    for P in 22 65534; do
      iptables -I INPUT 1 -p tcp --syn -i "$1" --dport $P -j ACCEPT
    done
    This opened up only TCP and I was not an active torrenter so only actives were able to download from me...
    No passive guys.

    To become an active I opened up the IP too.
    Like this:
    Code:
    ## also open the old stuff
    iptables -I INPUT 1 -p tcp --syn -i "$1" --dport 65534 -j ACCEPT
    iptables -I INPUT 1 -p udp --syn -i "$1" --dport 65534 -j ACCEPT
    Now my post firewall looks like this:

    Code:
    #!/bin/sh
    ## FIREWALL
    ## set default policy
    iptables -P INPUT DROP
    ## deny ftp access from WAN
    iptables -I INPUT 1 -p tcp -i "$1" --syn --dport 21 -j DROP
    
    #Old stuff.
    ## Allow access to various router services from WAN
    #for P in 22 65534; do
    #  iptables -I INPUT 1 -p tcp --syn -i "$1" --dport $P -j ACCEPT
    #done
    
    #New stuff
    ## open 51413 for torrent
    iptables -I INPUT 1 -p tcp --syn -i "$1" --dport 51413 -j ACCEPT
    iptables -I INPUT 1 -p udp --syn -i "$1" --dport 51413 -j ACCEPT
    
    ## also open the old stuff
    iptables -I INPUT 1 -p tcp --syn -i "$1" --dport 65534 -j ACCEPT
    iptables -I INPUT 1 -p udp --syn -i "$1" --dport 65534 -j ACCEPT
    You can check if you are an active at torrent sites if it list you connectible.

  5. #5
    Quote Originally Posted by al37919 View Post
    PHP Code:
    for P in 22 65534; do
      
    iptables -I INPUT 1 -p tcp --syn -"$1" --dport $P -j ACCEPT
    done 
    this seems to be anyway a terrible solution. You open almost all ports, so it's equivalent of switching off firewall. Plus you do it in a very stupid way --- by adding 65K rules. After that was your internet working at all? I think it should result in a considerable slowdown.
    for P in 22 65534 => it is executed for 22 and for 65534. Not for 22 till 65534.
    So actually it's quite elegant...

  6. #6
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    hm, really... I think you are right. Sorry for the misleading statement.

Similar Threads

  1. WL-500g custom firmware tutorial for beginners (norwegian)
    By Bertie in forum WL-500g/WL-500gx Tutorials
    Replies: 5
    Last Post: 05-09-2006, 13:47
  2. beginners probleem lezen/schrijven
    By matchless in forum Dutch Discussion - Nederlands
    Replies: 3
    Last Post: 25-10-2005, 12:45
  3. Beginners question on bridging seperated LANs
    By joe_heaven in forum WL-500g Q&A
    Replies: 10
    Last Post: 24-02-2005, 14:25
  4. Printer works but there are mistakes on pages
    By Tnet in forum WL-500g Q&A
    Replies: 5
    Last Post: 06-06-2004, 19:54

Posting Permissions

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