• 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

     

  • gravatar with wordpress

    By default, wordpress will use icon on gravatar,  but the gravatar site is blocked in China, solution:

    Install gravatar https plugin for WordPress

     

  • OpenWrt swconfig

    swconfig 是OpenWrt用来配置交换机的命令。

    swconfig list 现实系统交换机。

    swconfig dev <switch0/eth1> show现实当前端口配置。

     

    http://wiki.openwrt.org/zh-cn/doc/uci/network/switch

  • DNS software: rbldnsd

    rbldnsd:
    http://www.corpit.ru/mjt/rbldnsd.html

    git://git.corpit.ru/rbldnsd.git

    RBLDNSD :- Meaning is “DNS daemon suitable for running DNS-based blocklists”.
    rbldnsd is a small DNS-protocol daemon which is designed to handle queries to DNS-based IP-listing or NAME-listing services. Such services are a simple way to share/publish a list of IP addresses or (domain) names which are “listed” for for some reason, for example in order to be able to refuse a service to a client which is “listed” in some blocklist.

    http://linux.die.net/man/8/rbldnsd

     http://www.blue-quartz.com/rbl/

    Example

    http://www.uceprotect.net/en/?m=6&s=10

     

    Setup within Debian

    # Disable existed DNS service
    update-rc.d bind9 disable
    /etc/init.d/bind9 stop

    # Install rbldnsd

    setup.zip

  • DNS software

    Copy from:  http://maradns.samiam.org/dns_software.html

    DNS software

    The “big five”. The “CVE” links point to the National Vulnerability Database’s list of security issues for the program in question; I also have a comparison of DNS servers’ security history.

    • BIND is the swiss army knife of DNS servers. It has a lot of features and can do pretty much everything. It’s also a big binary and sometimes difficult to configure. CVE
    • Unbound and NSD make up a suite of DNS servers; they are both from NLnet Labs.Basically, one (NSD) puts your web page on the Internet; the other (Unbound) looks for web pages on the Internet. NSD CVE (None of those entries look to point to NSD; it appears to have no CVE entries) Unbound CVE
    • PowerDNS (which like Unbound/NSD, is two separate programs) has a lot of flexibility with connecting to databases or what not to resolve a DNS name. Used by Wikimedia, among others. CVE.
    • DjbDNS. Great tiny two-program DNS suite that sadly hasn’t been updated by DJB since 2001. Yes, it does have security problems (That’s a CVE link). Note that there are still people on the Internet who pretend DjbDNS 1.05 is magically perfectly secure. Sigh; there’s a lot of stupid out there on the ’net.For anyone who wants to use DjbDNS, use N-DjbDNS, which is patched against all known security holes (be sure to use a version with commit 16cb625e).
    • MaraDNS. I think it’s the best one, but my opinion is a little biased. It was once a single program, now two separate programs (like Unbound/BSD and PowerDNS) Easy-to-configure; tiny binary suitable for embedded systems. CVE

    There are many many other DNS servers, both open source and non-open source.

    Some other DNS servers:

    Freely downloadable DNS servers

    Caching DNS servers

    • DnsMasq is a non-recursive caching DNS server.
    • pdnsd is a recursive caching DNS server. Paul Rombouts is (was?) the current maintainer of this program.
    • Posadis is another DNS server project, similar to MaraDNS. This server is now both a resolving and an authoritative DNS server. Hasn’t been updated in a while.

    Non-recursive DNS servers

    • Knot DNS has DNSSEC support.
    • MyDNS is an authoritative-only DNS server which uses MySQL as a database back end. The most currently updated version appears to be MyDNS-ng, the “next generation” version of MyDNS.
    • SDNS is a project written in the late 1990s by Sandia Labs. Like MaraDNS, this project was written with security in mind. Since this is a government project, the code is public domain. The program does not seem to be downloadable anywhere, so I am mirroring it here. I would like to thank Fred Cohen for informing me about this package.
    • The Pliant language/package comes with a DNS server. This DNS server can not recursively process DNS queries given a list of root servers.
    • Twisted includes a non-recursive DNS server.
    • DnsJAVA is an authoritative-only DNS server written in Java.
    • The Eddit project includes a DNS server
    • SheerDNS is a simple non-caching DNS server that stores all records as their own files.

    Abandoned DNS server projects

    These are DNS server projects which have not released any files for a significant period of time, and are not fully functioning DNS servers (either because the program did not have basic DNS functionality when abandoned, the program was not documented before being abandoned, or because the program was abandoned so long ago that it is not fully functional on today’s internet).

    • Oak DNS is a DNS server written completely in python. It is compatible (I think) with both BIND zone files and cache files. The file can be downloaded here, or here. The most recent alpha version can be downloaded here. The most recent file in this alpha is from February of 2003; the original website is now owned by a cyber-squatter. (Thanks, Michel Talon, for the update)
    • MooDNS is another DNS server project. A CVS checkout on January 21, 2003 shows that no files have been updated since July 20, 2002, except for a single readme file updated on August 1, 2002. This project is abandoned.I have made a tarball available for people who do not want to bother with a CVS checkout.
    • Dents is a DNS server that showed a lot of promise. Unfortunately, no files have been released since 1999.
    • Yaku-NS is a DNS server geared towards embedded systems. According to the changelog, no one has made any changes to this software since Feburary, 2001.
    • CustomDNS has not released any files since the summer of 2000.

    Other

    Proprietary DNS solutions

    No, I have not listed every single DNS server that exists here.

  • DNS proxy

    Penetration Testers and Malware Analysts

     

    DNSChef:         (Python)

    https://thesprawl.org/projects/dnschef/

     

    Tcp-DNS-proxy   (Python)

    https://github.com/henices/Tcp-DNS-proxy

     

    DNSCrypt-proxy   ( DNS => DNSCrypt protocol )

    http://dnscrypt.org/

     

    dnsproxy

    http://www.wolfermann.org/dnsproxy.html

     

    Acrylic DNS Proxy  (windows)

               http://sourceforge.net/projects/acrylic/

  • Build openjdk 7 on ubuntu 10.10

    sudo apt-get install git mercurial zip bzip2 unzip tar gawk
    sudo apt-get install ccache make gcc g++ ca-certificates ca-certificates-java
    sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev
    sudo apt-get install libasound2-dev libcups2-dev libfreetype6-dev
    sudo apt-get install build-essential ruby-dev pkg-config
    sudo apt-get install openjdk-6-jdk
    sudo apt-get install fpm

    mkdir /build/openjdk
    cd /build/openjdk
    git clone https://github.com/hgomez/obuildfactory.git

    XBUILD=true ./obuildfactory/openjdk7/linux/standalone-job.sh

    # List output file
    ls OBF_DROP_DIR/openjdk7/
    j2re-image-x86_64-u80-b05-20150127.tar.bz2
    j2sdk-image-x86_64-u80-b05-20150127.tar.bz2

     

    # Install to /opt/openjdk7
    sudo mkdir /opt/openjdk7
    cd /opt/openjdk7
    sudo tar xvfj /build/openjdk/OBF_DROP_DIR/openjdk7/j2sdk-image-x86_64-u80-b05-20150127.tar.bz2