installing ipcop and addons [how to]

Discussion in 'PFsense M0n0wall IPcop & others PC based routers' started by Deeza, Sep 28, 2010.


  1. Deeza

    Deeza staff Staff Member




    hello guys,

    para sa mga gusto mag try ng IPCop Linux based Router.
    gumawa ako ng munting tutorials.

    Hardware requisites:

    - Old intel or amd PC: 1.x Ghz, 512 Mb memory and 20 GBytes at least.
    - Two NICs (same brand/ model recommended) and one CD drive installed on it.

    - ADSL Line.
    - Router/Modem and Switch (100 Mbps)
    - Network connected to Switch (at least one PC)

    Software requisites:

    Ipcop v1.4.15 (ISO burned CD) http://ipcop.org/
    Ipcop kernel with L7-filter and Ipp2p compiled modules for Ipcop v1.4.15 http://www.mhaddons.tk/
    QoS_NG addon for Ipcop v.1.5.1 http://www.mhaddons.tk/
    WinSCP (for WinXX) http://winscp.net/
    Putty (for WinXX) http://www.chiark.greenend.org.uk/~sgtatham/putty/

    Other requisites:

    - User level knowledge about Linux.
    - Little practice with IPCOP
    - Two hours of your time for fun. :)

    Installing IPCOP and Addons.

    At this point I guess you have all requirements, so I continue.

    1) Turn you old computer and go to your BIOS setting and set it to boot cd-rom in the priority list. From now this Old computer is called “Ipcop box”
    2) Insert Ipcop v1.4.15 CDROM and restart.
    3) In the First screen you press ENTER. In the next window you select your prefered language. If know about language codes in the first screen you can enter something like: “vmlinuz lang=<language_code>”. By example “vmlinuz lang=es” if you live in spanish or latin america. This selection is for IPcop language installation.

    [​IMG]

    4) Now you see a welcome window.

    [​IMG]

    5) Press OK. In the next window you must select CDROM/USB-KEY

    [​IMG]

    6) Now Ipcop installer is going to format “Ipcop Box” hardisk and install all files. Press OK.

    [​IMG]

    [​IMG]

    7) Select “Skip” when it prompt you for backup

    [​IMG]

    8) Now its gonna setup your GREEN NIC, select “Probe” and it will autodetect you first NIC

    [​IMG]

    [​IMG]

    9) Now its gonna ask for the ip address for GREEN interface. We enter IP: 192.168.0.2 and Mask: 255.255.255.0

    [​IMG]

    10) Now you finish installing it, so take out your CD and enter “OK”. Now select your keyboard language and timezone

    [​IMG]

    [​IMG]

    11) Enter your Ipcop box name. I use the default name “ipcop”. In the next window you must enter domain_name/workgroup of your network. I used “starcraft” workgroup

    [​IMG]

    [​IMG]

    12) Select “Disable ISDN”, we won’t need this.

    [​IMG]

    13) Now you are in Ipcop network configuration Menu.

    [​IMG]

    14) Now go to “Network configuration type” and select “GREEN + RED”

    [​IMG]

    15) Then go to “Drivers and card assignments” and select “OK” and it will automatic scan for your other NIC (RED interface).

    [​IMG]

    16) Now go to “Address Setting” in Netwok configuration Menu and select “RED” interface. Then select “Static” and type ex: IP: 192.168.1.5 and Mask: 255.255.255.0 Select “OK”, then “Done”.

    [​IMG]

    17) Now go to “DNS and Gateway settings” and type DNS servers provided by your ISP. In Default Gateway type 192.168.1.1 (router IP) Select “OK”

    [​IMG]

    18 ) Select “Enabled” and enter your prefered starting address and ending address.

    [​IMG]

    19) Now in Network configuration menu, select “Done”. The next window will be DHCP configuration again (I don’t know why), select “OK”.
    20) Now enter your root, admin and backup password. Remember your passwords. The password needs at least 6 characters. Then select “OK” to reboot.

    [​IMG]

    21) Finally you done installing Ipcop on “Ipcop Box”

    [​IMG]


    installing of IPCop addons

    to be continued..............
    ==============================================================================================
    ^^ im back!

    guys,lets continue..

    22) Now you don’t need keyboard, mouse, monitor anymore on “Ipcop box”. connect one PC to your network and set up network configuration

    [​IMG]

    23) Set up all PC network configuration like (22).
    24) Lets prepare Ipcop for installing addons. Open a firefox window and go to: http://192.168.0.2:81/. This is the homepage of your Ipcop box. Go to System/SSH Access.

    [​IMG]

    25) Ipcop will ask you User and Password of “admin”. After that you must click on “SSH Access” and “Save”. Now Ipcop will listen port 222 for SSH incoming connections.

    [​IMG]

    26) Ipcop will ask you User and Password of “admin”. After that you must click on “SSH Access” and “Save”. Now Ipcop will listen port 222 for SSH incoming connections.
    27) Now we have to copy addons files to /tmp on “ipcop box” using WinSCP tool. First we have to establish SSH a connection. Remember that 222 is the port number. Click on “Login” and then “Ok” in next message box. We are using PC to the network to do this job.

    [​IMG]

    28 ) Select addons files and copy them to /tmp folder on “ipcbox” using “F5”

    [​IMG]

    29 )Close WinSCP and open a Putty window and establish a connection to “Ipcop box”. Remember that 222 is the port number. Click “Open” and then “Ok” in next message box.

    [​IMG]


    gathering information....

    to be continued...
    ==============================================================================================
    image below naka save yan sa email add ko, buti hindi pa nabura. send yan ng isang friend ko sa mhforums. mr.azeqc
    =======================================

    30) Log in with “root” user and password you typed in (20), and you land here.

    [​IMG]

    31) Lets move to /tmp. Now extract the new compiled kernel with L7-filter and Ipp2p modules with “tar xvfj ipcop-1.4.15-kernel.tar.bz2 -C /”. After that run this command “touch /var/run/need-depmod-`uname -r`”. Now reboot “ipcop box” and reestablish connection in putty

    [​IMG]

    32) It’s time to install addons. I start with QoS_NG

    [​IMG]

    34) Finally you done installing Addons on “Ipcop Box”. Test using firefox in this address http://192.168.0.2:81 . In Services menu you must see “QoS”.

    ..itutuloy ...


    EDIT:
    my example QoS_NG configuration
    see this link

    http://www.pinoydsl.net/viewtopic.php?p=352986#352986
     
    dissell likes this.
  2. Unwired

    Unwired Member




    @Deeza, if you want to continue this tutorial, just edit your thread and post the continuation.

    Thanks
     
  3. Deeza

    Deeza staff Staff Member




    ^^ ok sir.. thnx
     
  4. vanix_09

    vanix_09 Member




    Nice tut's thanks a lot.
     
  5. Deeza

    Deeza staff Staff Member




    ^^ thanks
     
  6. sa-joedy

    sa-joedy Member

  7. friday13

    friday13 Member




    nice share.

    THANKS
     
  8. Laserion

    Laserion Member




    uy, okay toh, ah... TFS!
     
  9. choyits78

    choyits78 Member




    Sir applicable po ba e2 sa 28pc for icafe/gaming? no lag po ba sa online games? im using pldtdsl 3.5mb
     
  10. sa-joedy

    sa-joedy Member

  11. choyits78

    choyits78 Member




    Yes sir nabasa ko po yung 85units po. pero hindi po kc malinaw sa akin kung hindi ba mag lalag sa online games. kc 2 dsl po gamit ko and pfsense po ako. kung ok po sya talaga cguro baka mag switch na ako sa ipcop para ma pa disconnect ko na yung isang dsl ko. sir sa-joedy ok lang ba speed sa youtube? and no lags po ba sa online games pag nag sabay sabay youtube,fb,online games and downloading files?
     
  12. josekym

    josekym Member




    ^^Sir, ganito po iyan:

    Sa PFSense niyo ba, may QOS at Squid caching? Maaari niyong doon nalang i-tweak yung network ninyo without the need to switch to IPCop, since PFSense na ang kabisado ninyo.

    The performance you are after depends on many factors. For example, para maiwasan lang "lag" sa games, dapat ay meron QOS facility yung PFSense gateway/server mo. In this way, maaari mong i-define ang rules para sa online games mo (highest priority) vs. browsing or streaming (lowest priority). Yung squid cache can help in conserving bandwidth by caching the most often-accessed, cacheable objects on the LAN. A combination of the two can help you streamline your network such that maiiwasan ang "agawan" sa available bandwidth.
     
  13. choyits78

    choyits78 Member




    sir josekym mag kaiba po ba yung traffic shaper at QOS na sinasabi nyo sa pfsense? kc po na try ko na po configure yung traffic shaper no luck pa rin po. mas lalo pa po tumataas ping ko sa online games. baka po pede ma2lungan nyo ako sa pag configure ng qos sa pfesense ko. sayang kc yung isang dsl ko kung kakayanin nman sya na isa lang ang gagamitin.

    specs po ng pfsense box ko

    p4 3.0ghz
    1gb ram
    20gb hdd
    2x 3com lancard
    1 onboard lan

    sir pede nyo rin po ako i YM kung may time po kau
    [email protected]
     
  14. sa-joedy

    sa-joedy Member




    awts, mag 1 PLDT plan ka na lang 3.5mbps 28pc lang naman.. sayang lang ang pera kung dala-dalawa ang dsl^^

    ok lang naman mga online games ko walang lag.. like SF,Garena,mga online private server Ragna.

    ok din ang browsing,youtube cashing nauuna,facebookgames,y3,y8. merun pa nga mga naka alt-tab sa Dota tas nag you-youtube.

    nag post ako speedtest ko makikita mo sa link.
     
  15. choyits78

    choyits78 Member




    sir sa-joedy bkit po ganon hindi ko ma update yung layer7 pattern? ano po dapat gawin
     
  16. josekym

    josekym Member




    Maaaring magkaiba, since traffic shaping is under QOS afaik. The fact na tumaas ang ping mo after applying traffic shaping may mean na tama yung ginawa mo, pero hindi mo lang nailagay sa high priority ang ICMP packets.

    Siguro, mas marami pang makatulong kung i-post mo yung details ng current configuration mo sa PFSense Traffic Shaping, nang sa gayon eh mapag-aralan natin kung ano dapat gawin.
     
  17. moliro

    moliro Member




    edited my post...
    sori ts :D
     
  18. sa-joedy

    sa-joedy Member




    Edit /var/ipcop/l7filter/l7update and replace contents written below - tapos try to update balitaan mo ako pag nagawa mo.

    Code:
    #!/bin/bash
    #
    
    #modification to change the year automatically
    setyear=2009
    thisyear=2009
    if [ "x$setyear" != "x$thisyear" ]
    then
    sed -i -e "s/$setyear/$thisyear/g" $0
    echo -e "\nautomatically updated download-link, please start l7update again!\n"
    exit 0
    fi
    # end modification
    
    if [ "x$1" != "x" -a "x$1" != "xstartup" ]
    then
    MIRROR=$1
    else
    MIRROR=switch
    fi
    cd /var/ipcop/l7filter
    #
    #link to donwloadsection of "Linux layer 7 packet classifier" sourceforge project may change!
    #
    /var/ipcop/l7filter/wget -O "/var/ipcop/l7filter/index.html" -q "http://sourceforge.net/projects/l7-filter/files/"
    #
    currentY=$(cat localversion | cut -f1 -d"-")
    currentM=$(cat localversion | cut -f2 -d"-")
    currentD=$(cat localversion | cut -f3 -d"-")
    currentV="$currentD$currentM$currentY"
    #echo $currentV
    #
    #changes may be necessary due to changes in the structure of the htmlcode!
    #
    lastY=2009
    lastM=05
    lastD=28
    #
    lastV="$lastD$lastM$lastY"
    lastupdate="$lastY-$lastM-$lastD"
    #echo $lastV
    #echo $lastupdate
    [ "$lastV" == "" ] && echo -e "Unable to detect online Version, exiting..........." && exit 1
    [ "$currentV" == "" ] && echo -e "Unable to detect installed Version, exiting..........." && exit 1
    /bin/rm index.html
    if [ "$lastV" != "$currentV" ]
    then
    #
    #changes may be necessary due to changes in the structure of the downloadlinks!
    #
    CHECK=`/var/ipcop/l7filter/wget --spider http://$MIRROR.dl.sourceforge.net/project/l7-filter/Protocol%20definitions/"$lastupdate"/l7-protocols-"$lastupdate".tar.gz 2>&1`
    #
    #echo $CHECK
    SIZE=`/bin/echo $CHECK| cut -dL -f2| awk {'print $2'}|cut -d, -f1`
    NOTFOUND=`/bin/echo $SIZE|grep http`
    NOTFOUND="x${NOTFOUND}"
    FAILED=`/bin/echo $CHECK| grep failed| cut -d: -f6`
    FAILED="x${FAILED}"
    #echo $SIZE
    #echo;echo;echo
    #echo $NOTFOUND
    #echo;echo;echo
    #echo $FAILED
    if [ "$FAILED" != "x" ]
    then
    if [ "x$1" != "xstartup" ]
    then
    /bin/echo "Error while downloading file."
    exit 0
    else
    /bin/echo -e "[\033[1;31m Failed \033[0m]"
    exit 0
    fi
    fi
    if [ "$NOTFOUND" != "x" ]
    then
    if [ "x$1" != "xstartup" ]
    then
    /bin/echo "File is not on the mirror right now."
    exit 0
    else
    /bin/echo -e "[\033[1;31m Failed \033[0m]"
    exit 0
    fi
    fi
    if [ $SIZE -le 2 ]
    then
    if [ "x$1" != "xstartup" ]
    then
    /bin/echo "File is not on the mirror right now."
    exit 0
    else
    /bin/echo -e "[\033[1;31m Failed \033[0m]"
    exit 0
    fi
    fi
    #
    #changes may be necessary due to changes in the structure of the downloadlinks!
    #
    /var/ipcop/l7filter/wget -q http://$MIRROR.dl.sourceforge.net/project/l7-filter/Protocol%20definitions/"$lastupdate"/l7-protocols-"$lastupdate".tar.gz
    #
    /bin/echo $lastupdate > localversion
    /bin/tar xfz l7-protocols-"$lastupdate".tar.gz
    /bin/rm -rf /etc/l7-protocols/
    /bin/mv l7-protocols-"$lastupdate" /etc/l7-protocols
    /bin/chown -R root.root /etc/l7-protocols
    /bin/rm l7-protocols-"$lastupdate".tar.gz
    /bin/echo "$(date) : Layer7 protocols updated successefully" >>/var/log/messages
    if [ "x$1" == "xstartup" ]
    then
    echo -e "[\033[1;32m Done \033[0m]"
    fi
    else
    /bin/echo "$(date) : Your Layer7 protocols are up to date" >>/var/log/messages
    if [ "x$1" == "xstartup" ]
    then
    echo -e "[\033[1;32m Done \033[0m]"
    fi
    fi
     
  19. Deeza

    Deeza staff Staff Member




    gamit ka ng winscp tapos hanapin mo file na to

    l7filter

    [​IMG]
     
  20. choyits78

    choyits78 Member




    Sir ano po ba dapat ang lalabas pag ok na sya? at ask ko rin po ilan po ang ping nyo sa games ka2lad po ng crossfire. kc nag try ako kagabi umaabot sya 50 - 150 ms or baka may mali lang ako sa setting ng qos
     
                                 

Share This Page