updated documentation
[xboard.git] / manual / html_node / Firewalls.html
1 <html lang="en">
2 <head>
3 <title>Firewalls - XBoard</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="XBoard">
6 <meta name="generator" content="makeinfo 4.12">
7 <link title="Top" rel="start" href="index.html#Top">
8 <link rel="prev" href="Chess-Servers.html#Chess-Servers" title="Chess Servers">
9 <link rel="next" href="Environment.html#Environment" title="Environment">
10 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
11 <meta http-equiv="Content-Style-Type" content="text/css">
12 <style type="text/css"><!--
13   pre.display { font-family:inherit }
14   pre.format  { font-family:inherit }
15   pre.smalldisplay { font-family:inherit; font-size:smaller }
16   pre.smallformat  { font-family:inherit; font-size:smaller }
17   pre.smallexample { font-size:smaller }
18   pre.smalllisp    { font-size:smaller }
19   span.sc    { font-variant:small-caps }
20   span.roman { font-family:serif; font-weight:normal; } 
21   span.sansserif { font-family:sans-serif; font-weight:normal; } 
22 --></style>
23 </head>
24 <body>
25 <div class="node">
26 <p>
27 <a name="Firewalls"></a>
28 Next:&nbsp;<a rel="next" accesskey="n" href="Environment.html#Environment">Environment</a>,
29 Previous:&nbsp;<a rel="previous" accesskey="p" href="Chess-Servers.html#Chess-Servers">Chess Servers</a>,
30 Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
31 <hr>
32 </div>
33
34 <h2 class="chapter">5 Firewalls</h2>
35
36 <p>By default, XBoard communicates with an Internet Chess Server\r
37 by opening a TCP socket directly from the machine it is running on\r
38 to the ICS. If there is a firewall between your machine and the ICS,\r
39 this won't work. Here are some recipes for getting around common\r
40 kinds of firewalls using special options to XBoard.\r
41 Important: See the paragraph in the below about extra echoes, in\r
42 <a href="Limitations.html#Limitations">Limitations</a>.\r
43 \r
44 Suppose that you can't telnet directly to ICS, but you can telnet\r
45 to a firewall host, log in, and then telnet from there to ICS.\r
46 Let's say the firewall is called &lsquo;<samp><span class="samp">firewall.example.com</span></samp>&rsquo;. Set\r
47 command-line options as follows:\r
48 \r
49 <pre class="example">     xboard -ics -icshost firewall.example.com -icsport 23\r
50 </pre>
51    <p class="noindent">Or in your <samp><span class="file">.Xresources</span></samp> file:\r
52 \r
53 <pre class="example">     XBoard*internetChessServerHost: firewall.example.com\r
54      XBoard*internetChessServerPort: 23\r
55 </pre>
56    <p class="noindent">Then when you run XBoard in ICS mode, you will be prompted\r
57 to log in to the firewall host. This works because port 23 is the\r
58 standard telnet login service. Do so, then telnet to ICS, using a\r
59 command like &lsquo;<samp><span class="samp">telnet chessclub.com 5000</span></samp>&rsquo;, or whatever command\r
60 the firewall provides for telnetting to port 5000.\r
61 \r
62 If your firewall lets you telnet (or rlogin) to remote hosts but\r
63 doesn't let you telnet to port 5000, you may be able to connect to the\r
64 chess server on port 23 instead, which is the port the telnet program\r
65 uses by default.  Some chess servers support this (including\r
66 chessclub.com and freechess.org), while some do not.\r
67 \r
68 If your chess server does not allow connections on port 23 and your\r
69 firewall does not allow you to connect to other ports, you may be able\r
70 to connect by hopping through another host outside the firewall that\r
71 you have an account on.  For instance, suppose you have a shell\r
72 account at &lsquo;<samp><span class="samp">foo.edu</span></samp>&rsquo;. Follow the recipe above, but instead of\r
73 typing &lsquo;<samp><span class="samp">telnet chessclub.com 5000</span></samp>&rsquo; to the firewall, type\r
74 &lsquo;<samp><span class="samp">telnet foo.edu</span></samp>&rsquo; (or &lsquo;<samp><span class="samp">rlogin foo.edu</span></samp>&rsquo;), log in there, and\r
75 then type &lsquo;<samp><span class="samp">telnet chessclub.com 5000</span></samp>&rsquo;.\r
76 \r
77 Suppose that you can't telnet directly to ICS, but you can use rsh\r
78 to run programs on a firewall host, and that host can telnet to ICS.\r
79 Let's say the firewall is called &lsquo;<samp><span class="samp">rsh.example.com</span></samp>&rsquo;. Set\r
80 command-line options as follows:\r
81 \r
82 <pre class="example">     xboard -ics -gateway rsh.example.com -icshost chessclub.com\r
83 </pre>
84    <p>\r
85 Or in your <samp><span class="file">.Xresources</span></samp> file:\r
86 \r
87 <pre class="example">     XBoard*gateway: rsh.example.com\r
88      XBoard*internetChessServerHost: chessclub.com\r
89 </pre>
90    <p>\r
91 Then when you run XBoard in ICS mode, it will connect to\r
92 the ICS by using <samp><span class="file">rsh</span></samp> to run the command\r
93 &lsquo;<samp><span class="samp">telnet chessclub.com 5000</span></samp>&rsquo; on host &lsquo;<samp><span class="samp">rsh.example.com</span></samp>&rsquo;.\r
94 \r
95 Suppose that you can telnet anywhere you want, but you have to\r
96 run a special program called <samp><span class="file">ptelnet</span></samp> to do so.\r
97 \r
98 First, we'll consider the easy case, in which\r
99 &lsquo;<samp><span class="samp">ptelnet chessclub.com 5000</span></samp>&rsquo; gets you to the chess server.\r
100 In this case set command line options as follows:\r
101 \r
102 <pre class="example">     xboard -ics -telnet -telnetProgram ptelnet\r
103 </pre>
104    <p>\r
105 Or in your <samp><span class="file">.Xresources</span></samp> file:\r
106 \r
107 <pre class="example">     XBoard*useTelnet: true\r
108      XBoard*telnetProgram: ptelnet\r
109 </pre>
110    <p>\r
111 Then when you run XBoard in ICS mode, it will issue the\r
112 command &lsquo;<samp><span class="samp">ptelnet chessclub.com 5000</span></samp>&rsquo; to connect to the ICS.\r
113 \r
114 Next, suppose that &lsquo;<samp><span class="samp">ptelnet chessclub.com 5000</span></samp>&rsquo; doesn't work;\r
115 that is, your <samp><span class="file">ptelnet</span></samp> program doesn't let you connect to\r
116 alternative ports. As noted above, your chess server may allow you to\r
117 connect on port 23 instead.  In that case, just add the option\r
118 &lsquo;<samp><span class="samp">-icsport ""</span></samp>&rsquo; to the above command, or add\r
119 &lsquo;<samp><span class="samp">XBoard*internetChessServerPort:</span></samp>&rsquo; to your <samp><span class="file">.Xresources</span></samp> file.\r
120 But if your chess server doesn't let you connect on port 23, you will have\r
121 to find some other host outside the firewall and hop through it. For\r
122 instance, suppose you have a shell account at &lsquo;<samp><span class="samp">foo.edu</span></samp>&rsquo;. Set\r
123 command line options as follows:\r
124 \r
125 <pre class="example">     xboard -ics -telnet -telnetProgram ptelnet -icshost foo.edu -icsport ""\r
126 </pre>
127    <p>\r
128 Or in your <samp><span class="file">.Xresources</span></samp> file:\r
129 \r
130 <pre class="example">     XBoard*useTelnet: true\r
131      XBoard*telnetProgram: ptelnet\r
132      XBoard*internetChessServerHost: foo.edu\r
133      XBoard*internetChessServerPort:\r
134 </pre>
135    <p>\r
136 Then when you run XBoard in ICS mode, it will issue the\r
137 command &lsquo;<samp><span class="samp">ptelnet foo.edu</span></samp>&rsquo; to connect to your account at\r
138 &lsquo;<samp><span class="samp">foo.edu</span></samp>&rsquo;. Log in there, then type &lsquo;<samp><span class="samp">telnet chessclub.com 5000</span></samp>&rsquo;.\r
139 \r
140 ICC timestamp and FICS timeseal do not work through some\r
141 firewalls.  You can use them only if your firewall gives a clean TCP\r
142 connection with a full 8-bit wide path.  If your firewall allows you\r
143 to get out only by running a special telnet program, you can't use\r
144 timestamp or timeseal across it.  But if you have access to a\r
145 computer just outside your firewall, and you have much lower netlag\r
146 when talking to that computer than to the ICS, it might be worthwhile\r
147 running timestamp there.  Follow the instructions above for hopping\r
148 through a host outside the firewall (foo.edu in the example),\r
149 but run timestamp or timeseal on that host instead of telnet.\r
150 \r
151 Suppose that you have a SOCKS firewall that will give you a clean\r
152 8-bit wide TCP connection to the chess server, but only after you\r
153 authenticate yourself via the SOCKS protocol.  In that case, you could\r
154 make a socksified version of XBoard and run that.  If you are using\r
155 timestamp or timeseal, you will to socksify it, not XBoard; this may\r
156 be difficult seeing that ICC and FICS do not provide source code for\r
157 these programs.  Socksification is beyond the scope of this document,\r
158 but see the SOCKS Web site at http://www.socks.permeo.com/.\r
159 If you are missing SOCKS, try http://www.funbureau.com/.\r
160 \r
161
162    </body></html>
163