Page 1 of 3 123 LastLast
Results 1 to 15 of 36

Thread: ASUS WL-500gP [DURAK EDITIONS]

  1. #1

    Exclamation ASUS WL-500gP [DURAK EDITIONS]

    , "" !!!

    .

    . "" .
    windows.
    .
    .


    , . .

    , .
    , "".



    , . ? ) ) ) (). Linux. .

    , , .

    :
    ( vectorm)
    http://wl500g.info - .

    ================================================== =========================================

    .

    1. ASUS, (1.9.2.7-10), 1.9.2.7-10a (1.9.2.7-10.7) ( 10a)
    2. . MLC 2-4Gb. . . - Transcend JetFlash 4096 Mb (TS4GJFT3W), , , USB .

    ================================================== =========================================

    00. .
    01.

    ) "" WL-500gPremium V1
    ) STP ( )
    ) SSH-
    ) PPTP ( )
    ) () /

    02. HDD (FLASH)
    03. SCRIPTS
    04. IPKG
    ) nano
    ) Midnight Commander )
    ) cron ( )
    05. Lighttpd (php-fcgi, perl) (WEB )
    06. vnStat + vnStat PHP frontend (WEB )
    07. RRDTool
    08. Samba
    09. Darkstat
    10. QOS !!!
    11. ADOS & MySql & Curl Download Master


    :::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::


    203.59MB http://www.ex.ua/view/108357


    ================================================== =========================================



    . WEB - LINUX. . - PuTTY. WINDOWS , . (URL, )




    . [ENTER].

    PHP Code:
    ROUTER login
    , [ENTER].

    PHP Code:
    Password
    , .
    PHP Code:
    [admin@ROUTER root]$ 
    !!! [CODE] () , , [ENTER].

    ================================================== =========================================

    :

    , .

    . . Linux: . .

    Last edited by leshiy_odessa; 27-09-2009 at 19:55.

  2. #2
    01.

    ) "" WL-500gPremium V1 - http://wl500g.info/showpost.php?p=38611&postcount=1.

    (WL-500gP), .


    Code:
    cat /proc/cpuinfo
    BogoMIPS

    PHP Code:
    system type             Broadcom BCM4704 chip rev 9 pkg 0
    processor               
    0
    cpu model               
    BCM3302 V0.6
    BogoMIPS                
    263.78
    wait instruction        
    no
    microsecond timers      
    yes
    tlb_entries             
    32
    extra interrupt vector  
    no
    hardware watchpoint     
    no
    VCED exceptions         
    not available
    VCEI exceptions         
    not available
    unaligned_instructions  
    2
    dcache hits             
    0
    dcache misses           
    0
    icache hits             
    0
    icache misses           
    0
    instructions            


    Code:
    nvram set clkfreq=300,150
    nvram commit



    Code:
    flashfs save && flashfs commit && flashfs enable && reboot
    . .



    Code:
    cat /proc/cpuinfo
    :

    PHP Code:
    BogoMIPS                299.82 
    ) STP ( )



    Code:
    nvram set lan_stp=0
    nvram commit


    Code:
    flashfs save && flashfs commit && flashfs enable && reboot
    , . .

    ) SSH- . .. .



    Code:
    mkdir -p /usr/local/etc/dropbear
    dropbearkey -t dss -f /usr/local/etc/dropbear/dropbear_dss_host_key
    dropbearkey -t rsa -f /usr/local/etc/dropbear/dropbear_rsa_host_key
    mkdir -p /usr/local/sbin/
    touch /usr/local/sbin/post-boot
    touch /usr/local/sbin/post-firewall
    touch /usr/local/sbin/post-mount
    touch /usr/local/sbin/pre-mount
    touch /usr/local/sbin/pre-shutdown
    chmod +x /usr/local/sbin/*
    echo "#!/bin/sh" >> /usr/local/sbin/post-boot
    echo "dropbear > /dev/null 2>&1" >> /usr/local/sbin/post-boot


    Code:
    flashfs save && flashfs commit && flashfs enable && reboot
    ps . dropbear.

    Code:
    ps
    :

    PHP Code:
      PID  Uid     VmSize Stat Command
    ...............................................................
      
    120 admin       468 S   dropbear
      130 admin           SW  
    [kjournald]
      
    134 admin       548 S   -sh
      137 admin       392 R   ps 
    ================================================== ==========

    putty.exe . - \putty.exe -ssh -pw [ ] []@[IP] . - 1111, - admin, IP 192.168.1.1 putty.exe putty D:, - D:\Putty\putty.exe -ssh -pw 1111 admin@192.168.1.1
    ================================================== ==========

    ) PPTP ( ) - http://wl500g.info/showthread.php?t=14953


    Code:
    mkdir -p /usr/local/sbin
    vi - .
    [i], [ESC].
    .
    :wq, - :q!

    () post-firewall

    Code:
    vi /usr/local/sbin/post-firewall


    - [i]



    PHP Code:
    #!/bin/sh
    iptables -t nat -nvL POSTROUTING grep MASQUERADE awk '{
        "ifconfig "$7" | grep Mask" | getline ip;
        split(ip,ip,":"); split(ip[2],ip," ");
        split($8,src,"!");
        if (src[1]=="") {src="! -s "src[2]} else {src="-s "src[1]};
        if ($9=="0.0.0.0/0") {dst=""} else {dst="-d "$9};
        system("iptables -t nat -A POSTROUTING -o "$7" "src" "dst" -j SNAT --to-source "ip[1]);
        system("iptables -t nat -D POSTROUTING -o "$7" "src" "dst" -j MASQUERADE");
    }' 


    - [ESC]
    :wq


    Code:
    chmod +x /usr/local/sbin/*


    Code:
    flashfs save && flashfs commit && flashfs enable && reboot


    Code:
    iptables -t nat -nvL POSTROUTING
    :
    PHP Code:
    Chain POSTROUTING (policy ACCEPT 382 packets24727 bytes)
     
    pkts bytes target     prot opt in     out     source               destination
      257 17919 SNAT       all  
    --  *      ppp0   !111.111.1.172        0.0.0.0/0          to:213.231.4.172
       40  1923 SNAT       all  
    --  *      vlan1  !172.18.21.54         0.0.0.0/0          to:172.18.21.54
      305 14640 SNAT       all  
    --  *      br0     10.1.1.0/24          10.1.1.0/24        to:10.1.1.1 
    target - SNAT. MASQUERADE, , .

    ) () /

    pre-boot *

    Code:
    vi /usr/local/sbin/pre-boot


    - [i]

    !!! (EET-2EEST,M3.5.0/3,M10.5.0/4). , , .

    PHP Code:
    #!/bin/sh
    TZ="EET-2EEST,M3.5.0/3,M10.5.0/4"
    "$TZ!= "$(nvram get time_zone)" ] && nvram set time_zone="$TZ"
    echo "$TZ> /etc/TZ 


    - [ESC]
    :wq


    Code:
    chmod +x /usr/local/sbin/pre-boot


    Code:
    flashfs save && flashfs commit && flashfs enable && reboot
    :

    PHP Code:
    Kyiv                  EET-2EEST,M3.5.0/3,M10.5.0/4
    Moscow                MSK
    -3MSD,M3.5.0,M10.5.0/3
    St
    .Petersburg         MST-3MDT,M3.5.0/2,M10.5.0/3
    Kaliningrad           EET
    -2EEST,M3.5.0,M10.5.0/3
    Irkutsk               IRKT
    -8IRKST,M3.5.0,M10.5.0/3
    Kamchatka             PETT
    -12PETST,M3.5.0,M10.5.0/3
    Krasnoyarsk           KRAT
    -7KRAST,M3.5.0,M10.5.0/3
    Magadan               MAGT
    -11MAGST,M3.5.0,M10.5.0/3
    Novosibirsk           NOVT
    -6NOVST,M3.5.0,M10.5.0/3
    Omsk                  OMST
    -6OMSST,M3.5.0,M10.5.0/3
    Sakhalin              SAKT
    -10SAKST,M3.5.0,M10.5.0/3
    Vladivostok           VLAT
    -10VLAST,M3.5.0,M10.5.0/3
    Yakutsk               YAKT
    -9YAKST,M3.5.0,M10.5.0/3
    Yekaterinburg         YEKT
    -5YEKST,M3.5.0,M10.5.0/3
    Minsk                 EET
    -2EEST,M3.5.0,M10.5.0/3
    Riga                  EET
    -2EEST,M3.5.0/3,M10.5.0/4
    Tallinn               EET
    -2EEST-3,M3.5.0/03:00:00,M10.5.0/04:00:00
    Baku                  AZT
    -4AZST,M3.5.0/4,M10.5.0/5
    Yerevan               AMT
    -4AMST,M3.5.0,M10.5.0/3
    Ashgabat              TMT
    -5
    Ashkhabad             TMT
    -5
    Samarkand             UZT
    -5
    Tashkent              UZT
    -5
    Tbilisi               GET
    -4
    Tel_Aviv              IDDT
    Ulan_Bator            ULAT
    -8
    Bishkek               KGT
    -
    * /usr/local/sbin/pre-boot - , ,
    , flashfs
    /etc /usr/etc.
    Last edited by leshiy_odessa; 18-07-2009 at 11:44.

  3. #3
    02. HDD (FLASH)

    df -h
    Code:
    df -h
    :
    PHP Code:
    Filesystem               Size   Used     Available  Use%  Mounted on
    /dev/root                3.0M   3.0M     0          100%  /
    /
    dev/discs/disc0/part2   3.3G   152.2M   3.0G       5%    /tmp/mnt/disc0_2 
    - /dev/root , /dev/discs/disc0/part2 HDD 4Gb.


    Code:
    umount /tmp/mnt/disc0_2

    Code:
    fdisk -l
    :
    PHP Code:
    Disk /dev/scsi/host0/bus0/target0/lun0/disc4102 MB4102028288 bytes
    127 heads
    62 sectors/track1017 cylinders
    Units 
    cylinders of 7874 512 4031488 bytes 
    fdisk

    Code:
    fdisk /dev/scsi/host0/bus0/target0/lun0/disc
    (HELP) m
    , d

    , 1 [ENTER]. d .
    Code:
    d
    (swap) ( , )
    Code:
    n [ENTER]
    p [ENTER]
    1 [ENTER]
    [ENTER]
    +512M [ENTER]
    ================================================== ==========

    "+512" . . .. 64 . .. 2 . 512 , .

    ================================================== ==========

    - Linux swap
    Code:
    t [ENTER]
    82 [ENTER]
    /opt !!! [ENTER]
    Code:
    n [ENTER]
    p [ENTER]
    2 [ENTER]
    [ENTER]
    [ENTER]

    Code:
    p
    :
    PHP Code:
    Device Boot                                Start   End   Blocks   Id  System
    /dev/scsi/host0/bus0/target0/lun0/part1    1       128   503905   82  Linux swap
    /dev/scsi/host0/bus0/target0/lun0/part2    129     1017  3499993  83  Linux 
    q, .
    Code:
    w

    Code:
    fdisk -l
    PHP Code:
    Device Boot                                Start   End   Blocks   Id  System
    /dev/scsi/host0/bus0/target0/lun0/part1    1       128   503905   82  Linux swap
    /dev/scsi/host0/bus0/target0/lun0/part2    129     1017  3499993  83  Linux 
    ()
    Code:
    mkswap /dev/scsi/host0/bus0/target0/lun0/part1
    swapon /dev/scsi/host0/bus0/target0/lun0/part1
    - 0. - 503896.
    Code:
    free
    :
    PHP Code:
             total    used    free     shared    buffers
    Mem
    :     30164    17304   12860    0         1704
    Swap
    :    503896   0       503896
    Total
    :   534060   17304   516756 
    , fdisk -l. . .
    Code:
    mke2fs -j /dev/scsi/host0/bus0/target0/lun0/part2
    /etc/fstab
    Code:
    echo "/dev/scsi/host0/bus0/target0/lun0/part1  none swap sw 0 0" > /etc/fstab
    echo "/dev/scsi/host0/bus0/target0/lun0/part2 /opt ext3 rw,noatime 1 1" >> /etc/fstab
    fstab " " .
    Code:
    echo "/etc/fstab" >> /usr/local/.files
    , , .
    Code:
    flashfs save && flashfs commit && flashfs enable && reboot
    . df -h . free .
    Code:
    df -h
    :
    PHP Code:
    Filesystem                                 Size   Used    Available   Use%   Mounted on
    /dev/root                                  3.0M   3.0M    0           100%   /
    /
    dev/scsi/host0/bus0/target0/lun0/part2    3.3G   64.1M   3.1G        2%     /opt 
    /opt. () . , .

    ================================================== ==================

    ================================================== ==================

    opt ftp.
    opt , .

    http://wl500g.info/showpost.php?p=156896&postcount=481

    ================================================== ==================

    ================================================== ==================
    Last edited by leshiy_odessa; 20-08-2009 at 21:44.

  4. #4
    03. SCRIPTS

    sqlite
    Code:
    echo "chmod 777 /tmp" >> /usr/local/sbin/post-boot
    ) rc.unslung -

    - vi .

    Code:
    mkdir /opt/etc
    mkdir /opt/etc/init.d
    Code:
    vi /opt/etc/init.d/rc.unslung


    PHP Code:
    #!/bin/sh

    # Start/stop all init scripts in /opt/etc/init.d
    # starting them in numerical order and
    # stopping them in reverse numerical order
    #
    if [ $# -ne 1 ]; then
    printf "Usage: $0 {start|stop}\n" >&2
    exit 1
    fi

    daemons
    =`echo $(/usr/bin/dirname $0)/S??*`
    [ $
    "stop" ] && daemons=`echo $daemons | /usr/bin/tr " " "\n" | /usr/bin/sort -r`

    for 
    i in $daemons; do

    # Ignore dangling symlinks (if any).
    [ ! -"$i] && continue

    # Write to syslog
    logger -t rc.unslung "$1 service $i"

    case "$iin
    *.sh)
    # Source shell script for speed.
    (
    trap INT QUIT TSTP
    set 
    $1
    $i
    )
    ;;
    *)
    # No sh extension, so fork subprocess.
    $i $1
    ;;
    esac
    done 

    Code:
    chmod +x /opt/etc/init.d/rc.unslung
    - rc.unslung
    Code:
    vi /usr/local/sbin/post-mount

    PHP Code:
    #!/bin/sh
    /opt/etc/init.d/rc.unslung start 
    ) .

    Code:
    vi /usr/local/sbin/pre-shutdown


    PHP Code:
    #!/bin/sh

    /opt/etc/init.d/rc.unslung stop
    sleep 10s
    for i in `cat /proc/mounts | awk '/ext3/{print($1)}'` ; do
    mount -o remount,ro $i
    done
    swapoff 
    -a
    sleep 1s 

    Code:
    flashfs save && flashfs commit && flashfs enable && reboot
    :

    * /usr/local/sbin/pre-boot - , , , flashfs /etc /usr/etc.
    * /usr/local/sbin/post-boot - , , - usb ( 10 "" hot plug , )
    * /usr/local/sbin/post-mount - , usb , ,
    * /usr/local/sbin/pre-shutdown -
    * /usr/local/sbin/post-firewall - , iptables, , firewall
    Last edited by leshiy_odessa; 22-07-2009 at 11:24.

  5. #5
    04. IPKG
    ipkg. () , () .


    Code:
    mkdir -p /opt/tmp/ipkg
    cd /opt/tmp/ipkg
    .
    Code:
    ipkg.sh update
    ipkg.sh install ipkg-opt
    ipkg update
    :
    Code:
    ipkg update
    ipkg upgrade
    :
    Code:
    ipkg list
    ,
    Code:
    ipkg install -force-reinstall [_]

    Code:
    ipkg remove [_]
    )
    nano , . , .
    Code:
    ipkg install nano
    Code:
    ipkg install unzip
    Code:
    ipkg install tar
    Code:
    ipkg install gzip
    Code:
    ipkg install unrar
    , - Successfully terminated

    . , () .

    ) Midnight Commander -
    Code:
    ipkg install mc
    MC

    profile
    Code:
    echo "export TERMINFO=/opt/share/terminfo">>/opt/etc/profile
    echo "alias mc=\"mc -c\"">>/opt/etc/profile

    Code:
    chmod +x /opt/etc/profile
    - putty
    Putty Configuration -> Terminal -> Keyboard -> Xterm R6

    - mc.

    ) cron
    Cron - , .

    Code:
    ipkg install cron
    /opt/etc/ :
    Code:
    mkdir /opt/etc/cron.5mins
    mkdir /opt/etc/cron.hourly
    mkdir /opt/etc/cron.daily
    mkdir /opt/etc/cron.weekly
    mkdir /opt/etc/cron.monthly

    ============================
    .
    , crontab. .
    cron.5mins - 5
    cron.hourly -
    cron.daily -
    cron.weekly -
    cron.monthly -
    ============================


    /opt/etc/crontab
    Code:
    nano /opt/etc/crontab
    :
    PHP Code:
    SHELL=/bin/sh
    PATH
    =/sbin:/bin:/usr/sbin:/usr/bin:/opt/bin:/opt/sbin:/opt/usr/bin:/opt/usr/sbin
    MAILTO
    =""
    HOME=/
    # ---------- ---------- Default is Empty ---------- ---------- #
    # Syntax for lines is : minute hour day month dayofweek command #
    */* * * * admin run-parts /opt/etc/cron.5mins
    01 
    * * * * admin run-parts /opt/etc/cron.hourly
    02 4 
    * * * admin run-parts /opt/etc/cron.daily
    22 4 
    * * 0 admin run-parts /opt/etc/cron.weekly
    42 4 1 
    * * admin run-parts /opt/etc/cron.monthly 
    "run-parts" ,

    run-parts /opt/bin/
    Code:
    nano /opt/bin/run-parts

    PHP Code:
    #!/bin/sh
    #
    # runparts.sh by macsat@macsat.com
    # intended for use with cron
    #
    # based on rc.unslung by unslung guys :-)
    #
    if [ -"$1" ]
    then
    echo "Usage : $0 "
    fi

    RUNDIR
    =$1"/*"

    for i in $RUNDIR ;do

    # Ignore dangling symlinks (if any).
    [ ! -"$i] && continue

    case 
    "$iin
    *.sh)
    # Source shell script for speed.
    (
    trap INT QUIT TSTP
    set start
    $i
    )
    ;;
    *)
    # No sh extension, so fork subprocess.
    $i start
    ;;
    esac
    done 

    Code:
    chmod +x /opt/bin/run-parts

    Code:
    flashfs save && flashfs commit && flashfs enable && reboot
    ============== ==============
    , 03. SCRIPTS -> " rc.unslung". , S(). - S10cron.

    cron
    Code:
    nano /usr/local/sbin/post-boot

    PHP Code:
    /opt/etc/init.d/S10cron 
    ============== ==============
    Last edited by leshiy_odessa; 26-03-2009 at 00:11.

  6. #6
    05. Lighttpd (php-fcgi, perl)

    :
    http://wl500g.info/showthread.php?t=5247
    http://wl500g.info/showthread.php?t=9091
    http://www.wl500g.info/showpost.php?...3&postcount=17


    WEB IP ( DynDNS) , 80 , WEB . WEB - [ip]:[] - http://10.1.1.1:8082

    WEB ASUS

    nvram set http_lanport=[ ]

    Code:
    nvram set http_lanport=123456
    nvram commit
    ++++++++++++++++++++++++++++++++++++++++++++++++++ +++++


    Code:
    ipkg install lighttpd
    ipkg install php-fcgi
    ipkg install perl

    Code:
    nano /opt/etc/lighttpd/lighttpd.conf
    ( #):
    PHP Code:
    "mod_access"
    "mod_cgi"
    "mod_accesslog" 

    PHP Code:
    server.document-root        "/opt/share/www/" 

    PHP Code:
    accesslog.filename "/opt/share/www/log/access.log" 
    :
    PHP Code:
    url.access-deny = ( "~"".inc"".sqlite" 
    , , . .
    PHP Code:
    server.port 8082 
    ( #):
    PHP Code:
    cgi.assign                 = ( ".pl"  => "/opt/bin/perl",
                                   
    ".cgi" => "/opt/bin/perl" 


    - 10-php-fcgi.conf
    Code:
    nano /opt/etc/lighttpd/conf.d/10-php-fcgi.conf

    PHP Code:
    server.modules += ( "mod_fastcgi" )

    fastcgi.server = ( ".php" =>
                       ( 
    "localhost" =>
                         ( 
    "socket" => "/tmp/php-fcgi.sock",
                           
    "bin-path" => "/opt/bin/php-fcgi",
                           
    "max-procs" => 1,
                           
    "bin-environment" =>
                             ( 
    "PHP_FCGI_CHILDREN" => "2",
                               
    "PHP_FCGI_MAX_REQUESTS" => "1000" )
                         )
                       )
                     ) 
    c
    Code:
    mkdir /opt/share/www/log/

    Code:
    chmod 777 /opt/share/www/

    Code:
    flashfs save && flashfs commit && flashfs enable && reboot
    php-fcgi ( 60-90 , , )
    Code:
    ps

    PHP Code:
      280 admin      4384 S   /opt/bin/php-fcgi
      284 admin      6568 S   
    /opt/bin/php-fcgi
      285 admin      6296 S   
    /opt/bin/php-fcgi 
    - /opt/var/log/lighttpd/error.log
    Last edited by leshiy_odessa; 26-07-2009 at 14:10.

  7. #7
    06. vnStat + vnStat PHP frontend (WEB ) - + ( , , ). .



    ========================= : ===========================================


    eth0 --- ( )
    eth1 --- () Wi-Fi

    eth0 vlan ( 0 5). 2:
    vlan0 - 4 LAN ( - LAN1, LAN2, LAN3, LAN4)
    vlan1 - WAN
    br0 - bridge, 4 lan + wifi
    br0 - vlan0 + eth1
    eth1 - Wi-Fi
    ppp0 - VPN

    , .







    - ifconfig

    :

    vlan1 = WAN ( [dual access] + VPN), .. - ppp0, .
    ppp0 = VPN
    eth1 = Wi-Fi
    vlan0 = Ethernet ( )

    ========================= ===========================================

    :

    Lighttpd

    vnstat
    Code:
    ipkg install vnstat

    Code:
    vnstat -u -i vlan1
    vnstat -u -i vlan0
    vnstat -u -i ppp0
    vnstat -u -i eth1
    WEB
    Code:
    cd /opt/share/www/
    vnStat PHP frontend (WEB )
    Code:
    wget http://www.leshiy.net.ua/ASUS_WL500gP/vnstat-1.4.1.ru.zip
    -
    Code:
    wget http://mixon.ua/admin/vnstat-1.4.1.ru.zip

    Code:
    unzip ./vnstat-1.4.1.ru.zip
    !!! vnStat PHP frontend, bbsc - 1.4.1


    Code:
    nano /opt/share/www/vnstat/config.php
    $iface_list = array
    PHP Code:
    $iface_list = array('ppp0''vlan1''vlan0''eth1');


    $iface_title['vlan1'] = 'WAN';
    $iface_title['vlan0'] = 'Ethernet';
    $iface_title['eth1'] = 'Wi-Fi';
    $iface_title['ppp0'] = 'Internet'
    $vnstat_bin vnstat
    $vnstat_bin = '/opt/bin/vnstat';

    vnstat, root admin
    Code:
    nano /opt/etc/cron.d/vnstat
    ,
    Code:
    ipkg install php-gd

    Code:
    flashfs save && flashfs commit && flashfs enable && reboot
    , , 30-40 , http://[IP ]:[ Lighttpd]/vnstat - http://192.168.1.1:8082/vnstat/

    .. 5 . .

    ========================= =========================
    , BAD FILE MODE (/opt/etc/cron.d/vnstat)
    , .

    ========================= =========================

    ================================================== ================================================== =====

    ========================= =========================

    , . , +4. , ~4. .

    ========================= =========================

    Additional pppd options ( , )
    Code:
    ip-down-script /tmp/local/sbin/ppp0-ip-down



    Code:
    nano /tmp/local/sbin/ppp0-ip-up

    PHP Code:
    #!/bin/sh
    if [ ! -/tmp/ppp/link.ppp0 ]; then
            
    /opt/bin/vnstat ----enable -i ppp0
    fi
    logger 
    "ppp0-ip-up: vnstat ppp0 stats enabled" 

    Code:
    nano /tmp/local/sbin/ppp0-ip-down

    PHP Code:
    #!/bin/sh
    /opt/bin/vnstat ----disable -i ppp0
    logger 
    "ppp0-ip-down: vnstat ppp0 stats disabled" 

    Code:
    chmod +x /tmp/local/sbin/ppp0-ip-up
    chmod +x /tmp/local/sbin/ppp0-ip-down
    post-firewall
    Code:
    nano /tmp/local/sbin/post-firewall

    PHP Code:
    # vnstat
    (while [ $(date +%s) -lt 1000000000 ]; do sleep 2done; /tmp/local/sbin/ppp0-ip-up ) & 
    post-mount
    Code:
    nano /tmp/local/sbin/post-mount

    PHP Code:
    # vnstat
    (while [ $(date +%s) -lt 1000000000 ]; do sleep 2done; /tmp/local/sbin/ppp0-ip-up ) & 

    Code:
    flashfs save && flashfs commit && flashfs enable && reboot
    Attached Files Attached Files
    Last edited by leshiy_odessa; 23-06-2009 at 16:18.

  8. #8
    , .
    .

    203.59MB







    Last edited by Omega; 11-10-2011 at 21:42. Reason: fixed

  9. #9
    !!! .

    Svet98 EDITION

    update Power - ( ) .


    ADOS & MySql & Curl Download Master

    3 . MySql. , , Curl.
    http://wl500g.info/showthread.php?t=10012 , http://vectormm.net/routery-asus/6-ustanovka-ados.html
    WL500g Premium v.1, 1.9.2.7-10

    1. :
    PHP Code:
    ipkg update
    ipkg install php
    -mbstring
    ipkg install libcurl
    ipkg install sqlite 
    2. ADOS
    ADOS
    Code:
    mkdir /opt/share/www/ados

    Code:
    cd /opt/share/www/ados

    Code:
    wget http://download.dini.su/ados/stable

    Code:
    tar xzfv ./*
    3. /opt/etc/lighttpd/lighttpd.conf
    Code:
    nano /opt/etc/lighttpd/lighttpd.conf
    # ( #) :
    Code:
    "mod_fastcgi"
    # ( #) :
    Code:
    dir-listing.activate = "enable"
    # , index.* .. .. http. transmission.

    4. /opt/etc/crontab.
    :
    SHELL=/bin/sh
    PATH=/sbin:/bin:/usr/sbin:/usr/bin
    MAILTO=""
    HOME=/
    # ---------- ---------- Default is Empty ---------- ---------- #
    */1 * * * * admin run-parts /opt/etc/cron.1min
    */5 * * * * admin run-parts /opt/etc/cron.5mins
    01 * * * * admin run-parts /opt/etc/cron.hourly
    02 4 * * * admin run-parts /opt/etc/cron.daily
    22 4 * * 0 admin run-parts /opt/etc/cron.weekly
    42 4 1 * * admin run-parts /opt/etc/cron.monthly
    :
    Code:
    mkdir /opt/etc/cron.1min
    : ( ADOS )
    Code:
    mkdir /opt/share/www/ados/files
    5. Mysql
    Code:
    ipkg install mysql
    ipkg install php-mysql
    roota mysql
    Code:
    /opt/bin/mysqladmin -u root password ' '
    mysql
    Code:
    mysql -p -u root
    CREATE DATABASE ados;
    use mysql;
    insert into user values ('localhost','ados','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','','0','0','0');
    insert into user values ('%','ados','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','','0','0','0');
    exit
    flashfs save && flashfs commit && flashfs enable && reboot
    6.
    Code:
    http://_/ados
    . , mysql Curl.

    ################################
    5. . root. ADOS.

    UPDATE - denis-on

    /opt/etc/php.ini

    Code:
    nano /opt/etc/php.ini
    extension, :

    Code:
    extension=pdo.so
    extension=pdo_sqlite.so
    extension=sqlite.so
    http://wl500g.info/showpost.php?p=112888&postcount=1232
    Last edited by leshiy_odessa; 16-09-2009 at 13:58.

  10. #10
    Join Date
    May 2007
    Location
    Posts
    1,243
    Quote Originally Posted by XaBbl4 View Post
    , '>' (...sh" >> /us...) ( )
    P.S. , "vi" ( ), .

    P.P.S. , ( , .. copy/paste):
    Code:
    cd /usr/local/sbin/
    echo "#!/bin/sh" > post-firewall
    echo "iptables -t nat -nvL POSTROUTING | grep MASQUERADE | awk '{" >> post-firewall
    ...
    - , - . .. , , ( , , ).

    vi , echo. - J ( Shift+j) - , (, , ).

    , - ( System Command) - echo (, vi "cat > /usr/local/sbin/post-firewall", Enter, / , Ctrl+d).

  11. #11
    Quote Originally Posted by GUID View Post

    .

    :



    , (, "*" - , ), "\". .

    .
    echo .
    Last edited by leshiy_odessa; 11-02-2009 at 21:10.

  12. #12
    Quote Originally Posted by Warning View Post
    .
    pre-shutdown: "-o remount"
    . , . . .

    Quote Originally Posted by korsika View Post
    leshiy_odessa, , , ! , , .., , , , , .
    GUID , .

    - ipkg remove _

    . . .

    , . () , 3 . .

    . 15 .
    2 - Setting Management Flashfs Management, .

    . :
    System Setup -> Setting Management -> Save As a File
    System Setup -> Flashfs Management -> Save As a File

    Quote Originally Posted by korsika View Post
    leshiy_odessa, , , ! , , .., , , , , .
    . , .
    . "", , , , .., .
    .

    .
    Last edited by leshiy_odessa; 28-02-2009 at 12:37.

  13. #13
    , cron, busybox crond? rc.unslung

    /opt/etc/init.d/S10crond
    Code:
    #!/bin/sh
    
    prefix="/opt"
    PATH=${prefix}/bin:${prefix}/sbin:/sbin:/bin:/usr/sbin:/usr/bin
    NAME=crond
    DAEMON=/usr/sbin/${NAME}
    DAEMON_OPTS="-L /dev/null"
    DAEMON_DIR=/var/spool/cron
    CRONTABS_DIR=${DAEMON_DIR}/crontabs
    CRONTABS_SRC=${prefix}/etc/crontabs
    
    test -x $DAEMON || exit 0
    
    mkdir -p ${DAEMON_DIR}
    if [ ! -h "${CRONTABS_DIR}" ]; then
        ln -s ${CRONTABS_SRC} ${DAEMON_DIR}
    fi
    
    if [ -z "$1" ] ; then
        case `echo "$0" | sed 's:^.*/\(.*\):\1:g'` in
    	S??*) rc="start" ;;
            K??*) rc="stop" ;;
            *) rc="usage" ;;
        esac
    else
        rc="$1"
    fi
    
    case "$rc" in
        start)
    	echo -e -n "$NAME "
    	if [ -n "`pidof $NAME`" ]; then
                echo -e "is already running."
    	else
    	    echo -e "started."
    	    $DAEMON $DAEMON_OPTS
    	fi
            ;;
        stop)
            echo -e -n "$NAME "
            if [ -n "`pidof $NAME`" ]; then
    	    echo -e "stopped"
                killall $NAME 2> /dev/null
    	else
    	    echo -e "is not running."
            fi
            ;;
        restart)
            "$0" stop
            sleep 1
            "$0" start
            ;;
        *)  
            echo "Usage: $0 (start|stop|restart|usage)"
            ;;
    esac
    ( admin)
    /opt/etc/crontabs/admin
    Code:
    #min h d m wday	command
    #--------------	----------------------------------------------
    #*/10 * * * *	/sbin/start_ddns
    #*/30 * * * *	/opt/etc/cron.d/logcleaner
    #*/10  * * * *	/opt/etc/cron.d/watchdog
    flashfs, /hdd

    p.s CRONTABS_SRC , /opt/etc/crontabs
    p.p.s DAEMON_OPTS="-L /dev/null" syslog
    Last edited by theMIROn; 01-03-2009 at 14:12.

  14. #14
    Quote Originally Posted by SargeT View Post
    ...
    .
    Code:
    /dev/scsi/host1/bus0/target0/lun0/part1    916.9G    128.2M    870.2G   0% /home
    - ?) NTFS - 938 - , , 1000. 47 20 , 128 - )
    .


    Code:
    fdisk    ,  df - ,   10%   ext3  
    wl500gp-1.9.2.7-d-r1222 + StoreJet 35 Ultra >>> rtorrent+rutorrent -|- lighhtpd + ssl + auth -|- vnStat + vnStat PHP frontend -|- vsftpd -|- squid + lightsquid...

  15. #15
    Quote Originally Posted by falselight View Post
    ...
    ipkg update, .. - !

    Ps. , 3.3
    ftp .


    Code:
    ipkg install <file.ipk>


    Code:
    ipkg install /opt/samba_3.2.8-1_mipsel.ipk
    wl500gp-1.9.2.7-d-r1222 + StoreJet 35 Ultra >>> rtorrent+rutorrent -|- lighhtpd + ssl + auth -|- vnStat + vnStat PHP frontend -|- vsftpd -|- squid + lightsquid...

Page 1 of 3 123 LastLast

Similar Threads

  1. asus 500gp asus 520gc
    By shi in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 56
    Last Post: 12-04-2009, 11:17
  2. Asus WL 500gP D-link DI-524
    By Diggerua in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 4
    Last Post: 20-11-2008, 08:36
  3. ASUS wl 500gp + карманный Hdd
    By Gayjin in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 2
    Last Post: 15-06-2008, 18:30

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
  •