Revert "Revert "and added files""
[bcm963xx.git] / userapps / opensource / reaim / html / setup.html
1 <html>
2 <head>
3   <title>Setting Up The Proxy</title>
4   <link rel="stylesheet" href="doc-ns4.css" type="text/css" />
5   <style type="text/css">
6     @import url("doc.css");
7   </style>
8   <meta name="Author" content="Mark P. Cooke" />
9   <meta name="Version" content="$Id: setup.html,v 1.6 2003/03/27 14:39:37 mark-c Exp $" />
10 </head>
11 <body>
12 <div class="page">
13 <a href="index.html"><img src="back.gif" width="20" height="20" class="back" /></a><h1>Setting Up The Proxy</h1>
14
15 <h2>Basic Requirements</h2>
16
17 <p>The proxy is designed to transparently proxy and massage AIM and MSN
18 messages.  To do this, -and still be able to know the original destination-,
19 I use a Linux 2.4.x kernel on the firewall, built with iptables.</p>
20
21 <p>Linux 2.4.x with ipchains -does not work-, as the original destination
22 is not available.  Rumour has it that Linux 2.2.x with ipchains provides a
23 mechanism to retrieve the original destination, but I haven't checked into
24 this yet.</p>
25
26 <p class="last">I have put together a basic script to setup firewalling, with a fair
27 amount of hand-holding checks along the way.  It's available in CVS, and
28 will be included in the fifth release.</p>
29
30 <h2>Local LAN (eth0) Interface</h2>
31
32 <p>The proxy expects to receive redirected AIM and MSN messages on ports
33 5190 and 1863 respectively.</p>
34
35 <ul>
36 <li>iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 5190 -j REDIRECT --to-ports 5190</li>
37 <li>iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 1863 -j REDIRECT --to-ports 1863</li>
38 </ul>
39
40 <p>If you have the firewall port restricted, you also need to allow the
41 redirected connections to be received.</p>
42
43 <ul>
44 <li>iptables -A INPUT -i eth0 -p tcp --dport 5190 -j ACCEPT</li>
45 <li>iptables -A INPUT -i eth0 -p tcp --dport 1863 -j ACCEPT</li>
46 </ul>
47
48 <p class="last">That's it for the inside, other than your usual rules for
49 allowing other outbound connections.</p>
50
51 <h2>External Network (ppp0) Interface</h2>
52
53 <p>The proxy will massage the redirected AIM and MSN messages, and AIM Share,
54 so that direct connections appear to be from the external IP address, on the
55 port range 40000-40099.  However, this is not enough - the AIM software
56 does not honour the overrides ReAim uses, so we also listen to ports
57 4443 and 5566.  For good measure, we listen to the MSN port too.</p>
58
59 <p>So, the very basic setup, in addition to you current ruleset, is to
60 permit connections to these ports.</p>
61
62 <ul>
63 <li>iptables -A INPUT -i ppp0 -p tcp --dport 1863:1864   -j ACCEPT</li>
64 <li>iptables -A INPUT -i ppp0 -p tcp --dport 4443        -j ACCEPT</li>
65 <li>iptables -A INPUT -i ppp0 -p tcp --dport 5566        -j ACCEPT</li>
66 <li>iptables -A INPUT -i ppp0 -p tcp --dport 40000:40099 -j ACCEPT</li>
67 </ul>
68
69 <p class="last">All done.</p>
70
71 <h2>Troubleshooting</h2>
72
73 <ol>
74 <li>Start up with 'reaim -d' and check for obvious error messages.</li>
75 <li>Check that there are no [FATAL] lines showing listenning socket errors.  This shows that reaim is listenning for connections.</li>
76 <li>Connect to AIM from a machine inside your lan.  This should have [CONN_BH] and [CONN_NB] lines creating and establishing connections.  This shows your firewall is redirecting correctly.</li>
77 <li>If reaim takes 100% cpu during step 3, it is likely you have redirected reaim back to itself.  Check you can 'telnet login.oscar.aol.com 5190' from the firewall without reaim running.</li>
78 <li>With reaim running, try a direct connect to a friend who is not behind a firewall.  If this fails, check the incoming firewall rules are allowing connections as shown above.</li>
79 <li>Try a file transfer, instead of a direct connect.</li>
80 <li>Report a possible bug, with versions of clients, network setups, etc.</li>
81 </ol>
82 <p class="last"></p>
83
84 <br>
85 <center><A href="http://sourceforge.net"><IMG src="http://sourceforge.net/sflogo.php?group_id=40800" width="88" height="31" border="0" alt="SourceForge Logo"></A></center>
86
87 </div>
88 </body>
89 </html>