标签: ddwrt

  • How to Remotely access the iLO4 of Home HP MicroServer Gen8 behind a corporation firewall

    By ssh local port forward, we can access the iLO4 and Remote console of Home from the corporation network which protected by firewall,  with only 80 and 433 ports opened via proxy.

     

    HOME

    HP Proliant MicroServer Gen8
    iLO4 Advance License installed
    iLO4  IP=HOME_ILO4_IP               ( Local IP of iLO4 port,   172.24.0.xxx )

    WAN Router
    WNR2000 V3
    DD-WRT build 24160,
    Remote ssh login enabled
    WAN IP=HOME_WAN_IP              ( 220.234.xxx.xxx, public IP )

     

    OFFICE

    Network:

    Only out going 89/443 allowed via HTTP Proxy:
    OFFICE_PROXY_IP : OFFICE_PROXY_PORT

    Linux workstation:
    Ubuntu 10.10
    Open JDK v7.0      Installed
    CorkScrew             Installed

     

    Windows workstation:

    Windows 7
    putty 0.63   Installed

    How to Accesss ILO4 and Remote Console

    by using SSH local port forward,  From Office Workstation to Home SSH Server (Router),  we can assess iLO4 and Remote Console in Office.

     

    Linux:

    #!/bin/sh

    # Http proxy of Corp
    HTTP_PROXY_HOST=OFFICE_PROXY_IP
    HTTP_PROXY_PORT=OFFICE_PROXY_PROXY

    #  Home ssh server
    SSH_HOST=HOME_WAN_IP
    SSH_PORT=443
    SSH_USER=xxxx

    #  Home ILO4 Host
    REMOTE_ILO_HOST=HOME_ILO4_IP
    REMOTE_ILO_PORT=”22 23 17990 80 443 17988 161 162 623″

    # Office Workstation  ILO4 IP
    BIND_ILO_HOST=127.0.0.1
    #BIND_ILO_HOST=192.168.127.8

    #Generate proxy config file

    ILO_SSH_PROXY_CONFIG=/tmp/ilo_ssh_config

    echo “Host ${DDWRT_SSH_HOST}” > ${ILO_SSH_PROXY_CONFIG}
    echo “ProxyCommand corkscrew ${HTTP_PROXY_HOST} ${HTTP_PROXY_PORT} %h %p” >> ${ILO_SSH_PROXY_CONFIG}
    echo “port ${DDWRT_SSH_PORT}” >> ${ILO_SSH_PROXY_CONFIG}

    echo “Host ${LINUX_SSH_HOST}” >> ${ILO_SSH_PROXY_CONFIG}
    echo “ProxyCommand corkscrew ${HTTP_PROXY_HOST} ${HTTP_PROXY_PORT} %h %p” >> ${ILO_SSH_PROXY_CONFIG}
    echo “port ${LINUX_SSH_PORT}” >> ${ILO_SSH_PROXY_CONFIG}

    ILO_OPT_LIST=””
    for p in ${REMOTE_ILO_PORT}; do
    ILO_OPT_LIST=”${ILO_OPT_LIST} -L ${BIND_ILO_HOST}:${p}:${REMOTE_ILO_HOST}:${p}”
    done

    # Stop local services already bind to the local ILO4 Ports
    sudo /etc/init.d/ssh stop
    sudo /etc/init.d/lighttpd stop

    # Setup SSH local forward link from Office to Home
    echo “sudo ssh -N -f -F ${ILO_SSH_PROXY_CONFIG} ${ILO_OPT_LIST} ${SSH_USER}@${SSH_HOST}”
    sudo ssh -N -f -F ${ILO_SSH_PROXY_CONFIG} ${ILO_OPT_LIST} ${SSH_USER}@${SSH_HOST}

    SSH_PID=`pgrep -f “${ILO_OPT_LIST}”`

    # Access the iLO4 via firefox browser
    firefox https://${BIND_ILO_HOST}/

    # Launch the Java remote console from iLO4

    # cleanup,  stop the ssh local forward
    sudo kill -9 ${SSH_PID}

     

    Windows 7:

    Config putty iLO4 session as following:

    Config  Connection/Proxy/HTTP proxy

    Config  Connection/SSH/Tunnels,  by add follow local port forwarding:

    (BIND_ILO_HOST -> HOME_ILO4_IP)

    22 23 17990 80 443 17988 161 162 623

    Launch firefox,  and   goto https:// BIND_ILO_HOST  => iLO4 Panel Access

    Launch  remote console/ .iNET.IRC from iLO4 panel

     

     Note:

    Note:

    If the PC support Intel AMT technology, you may meet the error 10013 when try to forward 623 port,
    because the port 623 have been taken by the LMS.exe service:

    Solution: Disable the LMS service

    Launch the terminal with admin permission, and run:

    sc stop “UNS”
    sc stop “LMS”
    Or disable it forever:

    sc config “UNS” start= disabled
    sc config “LMS” start= disabled

     

    *********************************************

    iLO 2 Advanced License Keys:
    35DPH-SVSXJ-HGBJN-C7N5R-2SS4W
    35SCR-RYLML-CBK7N-TD3B9-GGBW2

     

  • uninstal DD-WRT from WNDR3700 v4

    Download factory image WNDR3700v4-V1.0.1.32 from netgear web site
    Flash back via TFTP method

    http://forum1.netgear.com/showthread.php?t=53239

    – plug the PC into LAN port 1
    – set the pc to a static IP of 192.168.1.2
    – power on the router
    – press and hold the RESET button as soon as the switch LEDs light up.
    – keep holding RESET until the power LED begins to flash orange and then green.
    – only the power LED is flashing green (and of course port 1), release RESET and than
    -tftp -i -v 192.168.1.1 PUT <filename>

  • Install dd-wrt onto wndr3700 v4

    Hardware:                       2.4G/5G Wifi,  USB,  128MB RAM/128B NAND

    Version Installed:             DD-WRT v24-sp2 (01/04/15) std – build 25760

    Feature Integrated:

    FreeRadius,                   PPPoE Server / Relay
    PPTP Server / Client,     OpenVPN Server / Client
    USB:                               Printer,  Storage,     USB Over IP
    FTP Server,                    DLNA Server,          Samba Server
    SIP Proxy,                       Http Server (Lighttpd)
    Mikrotik MAC Telnet,      IP over DNS Tunneling (nstx)
    SNMP,                            VNC Repeat,          Zabbix client

     

    Add 32G USB key with following partition setting:

    Part1 LABEL=”EXEC”   SIZE=2G   TYPE=”ext4″ With Journal

    Part2  LABEL=”DATA”   SIZE=30G  TYPE=”ext4″ Without Journal

     

    SSH into the route and execute:

    umount /dev/sda1
    umount /dev/sda2
    mkdir /mnt/exec
    mkdir /mnt/data
    mount /dev/sda1 /mnt/exec
    mount /dev/sda2 /mnt/data
    cp -r -p  /opt /mnt/exec/
    cp -r -p  /etc /mnt/exec/
    cp -r -p /www /mnt/exec/
    cp -r -p /jffs /mnt/exec/

    Startup Script:
    umount /dev/sda1
    umount /dev/sda2
    cp -r -p /tmp /tmp/mnt
    mkdir /mnt/exec
    mkdir /mnt/data
    mount /dev/sda1 /mnt/exec
    mount /dev/sda2 /mnt/data
    mount –bind /mnt/exec/www /www
    mount –bind /mnt/exec/opt /opt
    mount –bind /mnt/exec/etc /etc
    mount –bind /mnt/exec/jffs /jffs
    mv /tmp/mnt/tmp /mnt/exec/
    mount –bind /mnt/exec/tmp /tmp

  • WNDR3700V4

    WNDR3700 v4:
    Atheros AR9344 560MHz + AR9582 [an 2×2:2] + AR9344 [bgn 2×2:2]
    128MiB RAM + 128MiB NAND
    1 WAN + 4 LAN (GBit) + 1 USB 2.0

    WNDR4300 v1
    3×3 5GHz (AR9580 instead of AR9582)

    TP-LINK TL-WDR4300 v1.0-v1.7
    Similar as WNDR4300
    8 MiB NAND
    2 USB

    DDWRT:
    http://www.dd-wrt.com/wiki/index.php?title=TP-Link_TL-WDR4300&redirect=no

    OpenWRT:
    http://wiki.openwrt.org/toh/netgear/wndr3700

    Netgear GPL:
    http://kb.netgear.com/app/answers/detail/a_id/2649/related/1

    wiki
    https://wikidevi.com/wiki/Netgear_WNDR3700v4

    Reset to OEM image:
    Enter into TFTP mode
    tftp -i 192.168.1.1 put WNDR3700-V1.0.4.68NA.img
    http://www.dd-wrt.com/phpBB2/viewtopic.php?t=79802

  • Install windows7 onto iscsi target: Server Setup

    A PC (IP=192.168.127.88) with ubuntu/debian installed is used as:

    TFTP server

            HTTP Server

            CIFS Server

            ISCSI Server (Target)

     

    TFTP server

    #  Setup tftp server

    apt-get install tftpd-hpa

    /etc/init.d/tftpd-hpa start

     

    #  Testing tftp server

    apt-get install tftp

    uname -a >/srv/tftp/test

    tftp 127.0.0.1

    >get test

    >quit

    diff test /srv/tftp/test

     

    # Install syslinux 4.x  (SYSLINUX 4.0.1 debian-20100714)

    apt-get install syslinux
    
    
    cp /usr/lib/syslinux/pxelinux.0 /srv/tftp/
    
    # copy other interested support files
    cp /usr/lib/syslinux/menu.c32 /srv/tftp
    cp /usr/lib/syslinux/memdisk /srv/tftp
    cp /usr/lib/syslinux/mboot.c32 /srv/tftp
    cp /usr/lib/syslinux/chain.c32 /srv/tftp
    mkdir -pv /srv/tftp/pxelinux.cfg

    To simplify the script across ubuntu and debian,  create the /tftp linkto the actual tftp root directory (/srv/tftp in case)

     

     

  • Install windows7 onto iscsi target: Overview

    Target:

    Install windows7 from ISO file on Cifs server, onto to the iscsi target.

    With the help of the following software:

       pxe/ipxe

       http

       cifs

       winpe

     

     

    Test Environment:

    Server:      Linux PC,  IP_Server=192.168.127.88

    Including tftp/samba/iscsc server

    Client:       Diskless Virtual Box on window7

    Router:     DDWRT with IP_router=192.168.127.2

     

    (更多…)

  • Setup VLAN on wnr2000v3 (Athero AR7241, ddwrt r24160 )

    wnr2000v3 configuration:

    LAN1-LAN4 (switch chip)   <—-> eth1—-CPU—eth0 <—> WAN

    A separate switch chip is used out of route CPU

    The switch is initialized in Uboot,  and  can be configured via swconfig command in ddwrt.

     

     

     

  • WNR2000V3 安装最新版DDWRT / Install latest ddwrt on wnr2000v3

    软件内容: DDWRT 精简版本

    适用硬件: Netgear wnr2000v3 / 4M flash 版本

    Web 刷机方法:

    步骤一:>

    将WNR2000v3  固件降为上一版本原厂固件,重复操作直到版本1.0.x

    Netgear 固件下载地址

    步骤二:>

    刷DDWRT factory image, r18777:

    wnr2000v3-factory_WW.imgwnr2000v3-factory_NA.img

    DDWRT 固件下载地址

    步骤三:>

    刷DDWRT 精简版:

    DDWRT 精简版下载地址

    *****************************************************************

    ignore r24118 ,   seem’s dosen’t work on WNR2000V3

    ignore r24461,    as it have  downgrade bug