Guide for installing IRC bouncer on the WRT

Discussion in 'DD-WRT Firmware' started by Toxic, May 8, 2005.

  1. Toxic

    Toxic Administrator Staff Member

    All thx to Duality on the bsr forums for this one. I had tried this myself a while back but couldn't figure the ipk stuff out. I have now written a guide with his help of how to install an IRC bouncer onto the jffs2 filesystem
    of the WRT54G using DDWRT firmware.

    First of all you need to enable JFFS2 and telnet, in the management.asp page

    then once jffs2 as started (which can take upto 2 mins) you can then start the installation proceedure.

    Telnet to the router.

    The install IPKG package

    ~ # ipkg update
    Downloading ...
    Connecting to[]:80
    Packages 100% |**************************************************| 14932 00:00 ETA
    Updated list of available packages in //jffs/usr/lib/ipkg/lists/openwrt

    installing the miau ipk package:

    ~ # ipkg install
    Downloading ...
    Connecting to[]:80
    miau_0.5.3_mipsel.ip 100% |**************************************************| 27209 00:00 ETA
    Unpacking miau...Done.
    Configuring miau...Done.

    changer directory to the miau install, check it is there.

    ~ # cd /jffs/usr/bin

    /jffs/usr/bin # ls -la
    drwxr-xr-x 1 root root 0 May 8 03:16 .
    drwxr-xr-x 1 root root 0 May 8 03:16 ..
    -rwxr-xr-x 1 root root 76856 Jun 5 2004 miau
    -rwxr-xr-x 1 root root 673 Jun 5 2004 miau-check

    we then install the configuration file. this needs to be edited. either do this first before you
    download it to your router or download the default miaurc and then use the vi editor in telnet.

    get the file here: default miau.cfg

    i had already edited mine and downloaded it to the same folder "/jffs/usr/bin/" as "miaurc"

    /jffs/usr/bin # wget -O/jffs/usr/bin/miaurc
    Connecting to[]:80
    miaurc 100% |**************************************************| 15887 00:00 ETA

    just checking it is there:

    /jffs/usr/bin # ls -la
    drwxr-xr-x 1 root root 0 May 8 03:18 .
    drwxr-xr-x 1 root root 0 May 8 03:16 ..
    -rwxr-xr-x 1 root root 76856 Jun 5 2004 miau
    -rwxr-xr-x 1 root root 673 Jun 5 2004 miau-check
    -rw-r--r-- 1 root root 15887 May 8 03:18 miaurc

    now comes the configuring of the startup script. this is needed to initialise the miau program when the router powers up or reboots.

    create a file called miau.startup. the text that should be used is below:

    iptables -I INPUT -s -p tcp --dport 4096 -j ACCEPT
    /jffs/usr/bin/miau -d /jffs/usr/bin

    note: The iptable, this allows your pc to access port 4096 to the router. my pc as this example was

    once you've completed this you need to upload the file to /jffs/etc/config
    however you need to create this folder.

    # mkdir /jffs/etc/
    # mkdir /jffs/etc/config
    wget -O/jffs/etc/config/miau.startup

    then the file needs a file permission added to it.

    # chmod 700 /jffs/etc/config/miau.startup

    then last thing is reboot:

    # reboot

    once the router has started up you can then check if it is running by "ps x"

    you should see something like this:

    ~ # ps x
    PID Uid VmSize Stat Command
    1 root 700 S init noinitrd
    2 root SW [keventd]
    3 root SWN [ksoftirqd_CPU0]
    4 root SW [kswapd]
    5 root SW [bdflush]
    6 root SW [kupdated]
    10 root SW [mtdblockd]
    41 root SWN [jffs2_gcd_mtd4]
    63 root 324 S resetbutton
    90 root 280 S /usr/sbin/telnetd
    91 root 308 S tftpd -s /tmp -c -l
    93 root 436 S httpd -d /www
    101 root 312 S dnsmasq --conf-file /tmp/dnsmasq.conf
    107 root 296 S /sbin/wland
    149 root 276 S /usr/sbin/cron
    157 root 252 S udhcpc -i vlan1 -p /var/run/ -s /tmp/udhcpc
    165 root 364 S /jffs/usr/bin/miau -d /jffs/usr/bin
    257 root 428 S process_monitor
    2443 root 468 S -sh
    2447 root 312 R ps x
    ~ #

    hope this is helpful to some folk....
  2. oh2lna

    oh2lna Network Guru Member

    Logging off and the mail function in miau?

    Is there an easy way to turn the logging off, or at least redirecting it to ramfs on /tmp? I tried that in miaurc, but it still outputs data in the flash memory:

    I've also tried to get the mail function working. So far this is the closest:

    ~ # LD_LIBRARY_PATH=/jffs/usr/lib /jffs/usr/bin/ssmtp [email]my@email.addr[/email]ess
    But it returns just a ssmtp: Cannot open mailhub:25 error message. Has anyone succeeded in installing a working MTA for miau?

    By the way the v0.5.3 "hairball" isn't the latest version available. Has anyone compiled the ipkg packages for the v0.5.4 "catnap"?

  3. atzekalle

    atzekalle Guest

    Re: Logging off and the mail function in miau?

    that's my question, too. :drinking:
  4. Rurimoon

    Rurimoon Network Guru Member

    no one knows how to turn off logging?
  5. oh2lna

    oh2lna Network Guru Member

    Well then, I wrote a mail to the miau author. He promised to add an miaurc option to suppress all the logging. In the meantime there's a non-official way to establish the same effect within DD-WRT:

    /jffs/usr/bin/miau -d /jffs/usr/bin -f 1>/dev/null 2>&1 &
    So no forking, but instead running it in the background and redirecting everything to /dev/null.
  6. ultimate11

    ultimate11 LI Guru Member

    is there a way to run psybnc?
  7. ultimate11

    ultimate11 LI Guru Member

    as soon as i turn on my jffs router reboots and when i login from telnet it says there is no space on the device , what should i do
  8. Gelegrodan

    Gelegrodan Network Guru Member

  9. myers

    myers Guest

  10. THILE

    THILE Network Guru Member

    Hope its ok I reply in this thread. I have some problems to get this to work.
    After a lot of reading I got miau installed on the Jffs filesystem. Made a conf file, and the startup file.

    First problem the bouncer don’t start up, when the router reboots. I have to start it manually.
    /jffs/usr/bin/miau -d /jffs/usr/bin

    I can see that it joins the cannel on quakenet. Good it works…

    I looked in the dd-wrt wiki and found this:
    ~ # nvram set rc_startup="
      > for I in `/bin/ls /jffs/etc/config/*.startup`
      > do
      >    sh $I &
      > done
      > "
    ~ # nvram commit
    But it didn’t help either.
  11. THILE

    THILE Network Guru Member

    Another thing.

     iptables -I INPUT -s -p tcp --dport 4096 -j ACCEPT
    Looks to me like this is totally unnecessary. I was able to connect with my laptop with a different ip than the one created in the script.

    So I should also be able to join it from the internet?
  12. juuser

    juuser Guest

    I have other kind of problem.

    It's not logging anything so i can't debug what's wrong.

    Problem is that it won't connect to my specified IRC server. I have overlooked config miaurc 3 times already and tried some different settings, like removed some optional and etc, but still it doesn't join any channels nor server. I've logged in with my client and waiting miau to join my specified channels, but nothing. And /whois doesn't show it either.

    i do it that way:

    /jffs/usr/bin # miau -d /jffs/usr/bin
    miau v0.6.0.2 "only 18446744073709551615 bugs remaining"
    Copyright (C) 2002-2005 Tommi Saviranta <>
    (C) 2002 Lee Hardy <>
    (C) 1998-2002 Sebastian Kienzl <>

    This is free software; see the GNU General Public Licence version 2 or
    later for copying conditions. There is NO warranty.
    Read 'COPYING' for copyright and licence details.

    this will stay on screen and i can write anything after that Read 'COPYING' line, but nothing happens if i write or don't write.

    No log files:
    /jffs/usr/bin # ls -la
    drwx------ 1 1000 1000 0 Nov 14 22:05 .
    drwx------ 1 1000 1000 0 Nov 14 21:21 ..
    -rwxr-xr-x 1 1000 1000 111980 Jan 1 2006 miau
    -rwxr-xr-x 1 1000 1000 673 Jan 1 2006 miau-check
    -rw------- 1 root root 16737 Nov 14 22:46 miaurc

    i have ran out of any ideas.

    Anyone has some suggestions? Anything at all?

    Oh, and it is running when i type ps just nothing at IRC server.


    oh, forgot to say that my router is wrt54gl and i'm running dd-wrt v23 SP2 mini firmware

    i looked at 'top' and found that out:
    1155 root R 220 413 96.1 1.5 miau

    it's having almost 100% of CPU all the time...


    solved my problem thanks to fast response time by miau author. i had too old version, which had bug. downloaded newest one and everything fine. Also i noticed, that there's option to turn off logging:
    statelog = "state"

    Should miau write state log to $MIAUDIR/log? When true, log will be written in this file. If set to false, the same stuff is printed on stdout (on terminal).

    And answer to previous poster:
    iptables -I INPUT -p tcp --dport 4096 -j ACCEPT

    if you put without source ip, then it means it's open for everyone. type "iptables -L | more" to see list.

    Get the newest version:
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice