Miau IRC Bouncer

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 22:23, 27 April 2006 (edit)
WikiSysop (Talk | contribs)
m (Wiederhergestellt zur letzten Änderung von WikiSysop)
← Previous diff
Current revision (15:00, 30 April 2010) (edit) (undo)
Glenn (Talk | contribs)
(catchg)
 
(23 intermediate revisions not shown.)
Line 1: Line 1:
DD-WRT allows you to install the [http://miau.sourceforge.net Miau IRC Bouncer], which enables you to keep your IRC nickname and channels open while the client pc is disconnected from the server. DD-WRT allows you to install the [http://miau.sourceforge.net Miau IRC Bouncer], which enables you to keep your IRC nickname and channels open while the client pc is disconnected from the server.
-A detailed installation guide for installing the OpenWRT Miau ipkg can be found at the [http://www.linksysinfo.org/modules.php?name=Forums&file=viewtopic&p=20979 Linksysinfo Forum]. Be aware that a writeable jffs filesystem with proper ipkg support is required. The installation was tested to work with prefinal 5 and above (tested also with 22r2 final) - prefinal 4 does not work since ipkg is not implemented correctly. 
-'''[[Note:]]''' Most IRC servers will not let you connect if you are not running an [http://en.wikipedia.org/wiki/Ident ident server] - A suitable replacement for this would be oident, which can be found on the [http://tracker.openwrt.org/packages/list.php?name=oidentd OpenWRT package tracker].+== Prerequesites ==
 +DD-WRT Installed
-== Suppressing the jffs logging ==+[http://www.dd-wrt.com/wiki/index.php/JFFS#Testing_ipkg ipkg up to date]
-Under 0.5.3 "hairball", if you want to suppress all the logging and hence save the flash memory from some additional exertion, don't fork to the background at all. Miau author has been kindly agreed to add a miaurc option for us jffs users to turn off logging in the next miau release. In the meanwhile there's an unofficial detour (use at your own risk):+JFFS enabled: [http://www.dd-wrt.com/wiki/index.php/JFFS#Directions_for_.28freaky.29_Linux_Gurus:_CLI CLI] or [http://www.dd-wrt.com/wiki/index.php/JFFS#Directions_for_.28normal.29_users:_using_Web-GUI_Interface Web Interface] - if the web interface does not appear to work, use the CLI
- # /jffs/usr/bin/miau -d /jffs/usr/bin -f 1>/dev/null 2>&1 & 
-Under 0.5.4-p3 - "compatible catnap" and later edit the miaurc file with vi like this:+== Installation ==
 +The current ipkg update doesn't seem to include miau although it is listed as being a supported package. The current version of miau in .ipk form is on sourceforge, so you'll need to download it to the router to install it. At an ssh prompt, change directory to /jffs and type:
- # statelog = "state": Should miau write state log. When true, log will+ wget http://downloads.sourceforge.net/miau/miau_0.6.5-1_mipsel_ipv4.ipk?modtime=1193170098&big_mirror=0
- # be written to "$MIAUDIR/log". If set to false, the same stuff+
- # is printed on stdout (on terminal).+
- #+
- # Default: true+
- +
- statelog = "false"+
-Then with vi check that the /jffs/etc/config/miau.startup file looks like this:+It will say "Connecting to downloads.sourceforge.net (216.34.181.59:80)". Press enter again and the file should finish downloading. Once that is done, run
 + ls
 +If it put an extension on the file you downloaded, then you will need to run
 + mv miau_0.6.5-1_mipsel_ipv4.ipk?modtime\=1193170098 miau_0.6.5-1_mipsel_ipv4.ipk
- #!/bin/ash+After that, type:
- iptables -I INPUT -s 192.168.1.100 -p tcp --dport 4096 -j ACCEPT+
- /jffs/usr/bin/miau -d /jffs/usr/bin+
-Replace the 192.168.1.100 with the client IP address you're ircing from. You can update the catnap with ipkg if you haven't cleared the "hairball" from your WRT:+ ipkg -d root install miau_0.6.5-1_mipsel_ipv4.ipk
- /jffs/usr/bin # ipkg install http://www.linuxops.net/ipkg/miau_0.5.4_mipsel.ipk 
- Downloading http://www.linuxops.net/ipkg/miau_0.5.4_mipsel.ipk ... 
- Connecting to www.linuxops.net[83.143.85.18]:80 
- miau_0.5.4_mipsel.ip 100% |***********************************************| 29777 00:00 ETA 
- Done. 
- Unpacking miau...Done. 
- Configuring miau...Done. 
-== Using the email feature for collecting private messages in Miau ==+Note: miau supports ipv6 but you need to change the 4 to a 6 in the above link to get the version with that feature compiled in
-If you want to use the emailing feature, you need to setup a smtp client and edit the miaurc file accordingly. Here's an example how to do it with msmtp. 
- /jffs/usr/bin # ipkg install http://www.wildcatwireless.net/wrt54g/msmtp_1.2.4-wrt1_mipsel.ipk+== Configuration ==
- Downloading http://www.wildcatwireless.net/wrt54g/msmtp_1.2.4-wrt1_mipsel.ipk ...+Miau holds its settings in a config file called miaurc, which has a lot of options you can set, these are all explained [http://miau.sourceforge.net/manual.html#SEC7 here].
- Connecting to www.wildcatwireless.net[63.77.16.216]:80+
- msmtp_1.2.4-wrt1_mip 100% |********************************************| 21740 00:00 ETA+
- Done.+
- Unpacking msmtp...Done.+
- Configuring msmtp....: 2: Can't open /etc/wireless.conf+
-Then using vi, type in following:+This is an example of a working config file, set to connect to efnet with the nickname mynick, accepting connections from any ip address. It is set to join #testchannel when it connects to the server, and to attempt to rejoin those channels whenever it re-connects.
- /jffs/usr/bin # vi msmtprc+ nicknames = {
- account default+ "mynick"
- host smtp.yourisp.com+ }
- from you@yourdomain.com+ realname = "none"
 + username = "user"
 + password = "password"
 + listenport = "44123"
 + servers = {
 + "irc.efnet.org":"6667"
 + }
 + connhosts = {
 + "*.*.*.*"
 + }
 + channels = {
 + "#testchannel"
 + }
 + rejoin = "true"
-Inside vi, use "i" to insert text, Esc to stop editing, ":w" to write the file and ":q" to close the file. Replace smtp.yourisp.com with your own smtp smarthost, which accepts incoming mail from you. Replace you@yourdomain.com with a valid email address. We're almost done now. Using vi again, edit the miaurc and find the forwardmsg line. Edit it to:+First, telnet in, and do
 + mkdir .miau
 + cd .miau
 +Then type
 + vi miaurc
 +Fill out the sample config listed above in a text editor on your computer, and when you are finished, right click in the SSH window and select "Paste". '''Note that the password variable is the password for the router's IRC bouncer, ''not'' for your IRC username.''' You do not set your IRC password in this config file.
- forwardmsg = "/jffs/usr/bin/msmtp --file=/jffs/usr/bin/msmtprc send.to@thisdomain.com"+Check to make sure it pasted correctly, then press Escape and do
 + :w! <press enter>
 +then do
 + :q <press enter>
-Replace send.to@thisdomain.com with a different valid email address where you want your logs to arrive.+== Usage ==
-----+You can run the bouncer by typing miau at the command prompt. It seems to look in /tmp/root/.miau for its files by default; in the telnet, you created the config file here.
 +Simply type
 + miau
 +and it should start.
-'''You are here: ''' '''[[Main Page]]'''/'''[[DD-WRT Docu (EN)]]'''/'''[[Miau IRC Bouncer]]'''+If you made a config file in a different location, run
 + miau -d <the folder where you put your miaurc file>
 + 
 +For example, if you put it in /jffs/usr/bin, then run
 + miau -d /jffs/usr/bin
 + 
 +miau should start and connect to the server, listening on the port you specified in miaurc. To connect to the bouncer, in your favourite irc client, type:
 + 
 + /server <the ip of your router>:<listening port> <your set password here>
 + 
 +Make sure that your ident is set to the same value as the username you set in miaurc or miau will reject the connection.
 + 
 +If you're connecting to the bouncer externally, it's probably a good idea to set the listenhost variable in miaurc to localhost, and tunnel the connection via SSH (how to do this in [http://www.revsys.com/writings/quicktips/ssh-tunnel.html linux] and in [http://www.gb.nrao.edu/pubcomputing/tunnel-howto.shtml windows using PuTTY]).
 + 
 +For ways to get miau to run when the router starts up, look [http://dd-wrt.com/wiki/index.php/Startup_Scripts here]
 + 
 + 
 + 
 +[[Category:Applications]]
 +[[Category:Basic tutorials]]

Current revision

DD-WRT allows you to install the Miau IRC Bouncer, which enables you to keep your IRC nickname and channels open while the client pc is disconnected from the server.


Contents

[edit] Prerequesites

DD-WRT Installed

ipkg up to date

JFFS enabled: CLI or Web Interface - if the web interface does not appear to work, use the CLI


[edit] Installation

The current ipkg update doesn't seem to include miau although it is listed as being a supported package. The current version of miau in .ipk form is on sourceforge, so you'll need to download it to the router to install it. At an ssh prompt, change directory to /jffs and type:

wget http://downloads.sourceforge.net/miau/miau_0.6.5-1_mipsel_ipv4.ipk?modtime=1193170098&big_mirror=0

It will say "Connecting to downloads.sourceforge.net (216.34.181.59:80)". Press enter again and the file should finish downloading. Once that is done, run

ls

If it put an extension on the file you downloaded, then you will need to run

mv miau_0.6.5-1_mipsel_ipv4.ipk?modtime\=1193170098 miau_0.6.5-1_mipsel_ipv4.ipk

After that, type:

ipkg -d root install miau_0.6.5-1_mipsel_ipv4.ipk


Note: miau supports ipv6 but you need to change the 4 to a 6 in the above link to get the version with that feature compiled in


[edit] Configuration

Miau holds its settings in a config file called miaurc, which has a lot of options you can set, these are all explained here.

This is an example of a working config file, set to connect to efnet with the nickname mynick, accepting connections from any ip address. It is set to join #testchannel when it connects to the server, and to attempt to rejoin those channels whenever it re-connects.

nicknames = { 
    "mynick" 
}
realname = "none"
username = "user" 
password = "password" 
listenport = "44123" 
servers = { 
    "irc.efnet.org":"6667" 
}
connhosts = { 
    "*.*.*.*" 
}
channels = { 
    "#testchannel" 
}
rejoin = "true" 

First, telnet in, and do

mkdir .miau
cd .miau

Then type

vi miaurc

Fill out the sample config listed above in a text editor on your computer, and when you are finished, right click in the SSH window and select "Paste". Note that the password variable is the password for the router's IRC bouncer, not for your IRC username. You do not set your IRC password in this config file.

Check to make sure it pasted correctly, then press Escape and do

:w! <press enter>

then do

:q <press enter>

[edit] Usage

You can run the bouncer by typing miau at the command prompt. It seems to look in /tmp/root/.miau for its files by default; in the telnet, you created the config file here. Simply type

miau

and it should start.

If you made a config file in a different location, run

miau -d <the folder where you put your miaurc file>

For example, if you put it in /jffs/usr/bin, then run

miau -d /jffs/usr/bin

miau should start and connect to the server, listening on the port you specified in miaurc. To connect to the bouncer, in your favourite irc client, type:

/server <the ip of your router>:<listening port> <your set password here>

Make sure that your ident is set to the same value as the username you set in miaurc or miau will reject the connection.

If you're connecting to the bouncer externally, it's probably a good idea to set the listenhost variable in miaurc to localhost, and tunnel the connection via SSH (how to do this in linux and in windows using PuTTY).

For ways to get miau to run when the router starts up, look here