added documentation folder
[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
37 by opening a TCP socket directly from the machine it is running on
38 to the ICS. If there is a firewall between your machine and the ICS,
39 this won't work. Here are some recipes for getting around common
40 kinds of firewalls using special options to XBoard. 
41 Important: See the paragraph in the below about extra echoes, in
42 <a href="Limitations.html#Limitations">Limitations</a>.
43
44    <p>Suppose that you can't telnet directly to ICS, but you can telnet
45 to a firewall host, log in, and then telnet from there to ICS. 
46 Let's say the firewall is called &lsquo;<samp><span class="samp">firewall.example.com</span></samp>&rsquo;. Set
47 command-line options as follows:
48
49 <pre class="example">     xboard -ics -icshost firewall.example.com -icsport 23
50 </pre>
51    <p class="noindent">Or in your <samp><span class="file">.Xresources</span></samp> file:
52
53 <pre class="example">     XBoard*internetChessServerHost: firewall.example.com
54      XBoard*internetChessServerPort: 23
55 </pre>
56    <p class="noindent">Then when you run XBoard in ICS mode, you will be prompted
57 to log in to the firewall host. This works because port 23 is the
58 standard telnet login service. Do so, then telnet to ICS, using a
59 command like &lsquo;<samp><span class="samp">telnet chessclub.com 5000</span></samp>&rsquo;, or whatever command
60 the firewall provides for telnetting to port 5000.
61
62    <p>If your firewall lets you telnet (or rlogin) to remote hosts but
63 doesn't let you telnet to port 5000, you may be able to connect to the
64 chess server on port 23 instead, which is the port the telnet program
65 uses by default.  Some chess servers support this (including
66 chessclub.com and freechess.org), while some do not.
67
68    <p>If your chess server does not allow connections on port 23 and your
69 firewall does not allow you to connect to other ports, you may be able
70 to connect by hopping through another host outside the firewall that
71 you have an account on.  For instance, suppose you have a shell
72 account at &lsquo;<samp><span class="samp">foo.edu</span></samp>&rsquo;. Follow the recipe above, but instead of
73 typing &lsquo;<samp><span class="samp">telnet chessclub.com 5000</span></samp>&rsquo; to the firewall, type
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
75 then type &lsquo;<samp><span class="samp">telnet chessclub.com 5000</span></samp>&rsquo;.
76
77    <p>Suppose that you can't telnet directly to ICS, but you can use rsh
78 to run programs on a firewall host, and that host can telnet to ICS. 
79 Let's say the firewall is called &lsquo;<samp><span class="samp">rsh.example.com</span></samp>&rsquo;. Set
80 command-line options as follows:
81
82 <pre class="example">     xboard -ics -gateway rsh.example.com -icshost chessclub.com
83 </pre>
84    <p class="noindent">Or in your <samp><span class="file">.Xresources</span></samp> file:
85
86 <pre class="example">     XBoard*gateway: rsh.example.com
87      XBoard*internetChessServerHost: chessclub.com
88 </pre>
89    <p>Then when you run XBoard in ICS mode, it will connect to
90 the ICS by using <samp><span class="file">rsh</span></samp> to run the command
91 &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;.
92
93    <p>Suppose that you can telnet anywhere you want, but you have to
94 run a special program called <samp><span class="file">ptelnet</span></samp> to do so.
95
96    <p>First, we'll consider the easy case, in which
97 &lsquo;<samp><span class="samp">ptelnet chessclub.com 5000</span></samp>&rsquo; gets you to the chess server. 
98 In this case set command line options as follows:
99
100 <pre class="example">     xboard -ics -telnet -telnetProgram ptelnet
101 </pre>
102    <p class="noindent">Or in your <samp><span class="file">.Xresources</span></samp> file:
103
104 <pre class="example">     XBoard*useTelnet: true
105      XBoard*telnetProgram: ptelnet
106 </pre>
107    <p class="noindent">Then when you run XBoard in ICS mode, it will issue the
108 command &lsquo;<samp><span class="samp">ptelnet chessclub.com 5000</span></samp>&rsquo; to connect to the ICS.
109
110    <p>Next, suppose that &lsquo;<samp><span class="samp">ptelnet chessclub.com 5000</span></samp>&rsquo; doesn't work;
111 that is, your <samp><span class="file">ptelnet</span></samp> program doesn't let you connect to
112 alternative ports. As noted above, your chess server may allow you to
113 connect on port 23 instead.  In that case, just add the option
114 &lsquo;<samp><span class="samp">-icsport ""</span></samp>&rsquo; to the above command, or add
115 &lsquo;<samp><span class="samp">XBoard*internetChessServerPort:</span></samp>&rsquo; to your <samp><span class="file">.Xresources</span></samp> file. 
116 But if your chess server doesn't let you connect on port 23, you will have
117 to find some other host outside the firewall and hop through it. For
118 instance, suppose you have a shell account at &lsquo;<samp><span class="samp">foo.edu</span></samp>&rsquo;. Set
119 command line options as follows:
120
121 <pre class="example">     xboard -ics -telnet -telnetProgram ptelnet -icshost foo.edu -icsport ""
122 </pre>
123    <p class="noindent">Or in your <samp><span class="file">.Xresources</span></samp> file:
124
125 <pre class="example">     XBoard*useTelnet: true
126      XBoard*telnetProgram: ptelnet
127      XBoard*internetChessServerHost: foo.edu
128      XBoard*internetChessServerPort:
129 </pre>
130    <p class="noindent">Then when you run XBoard in ICS mode, it will issue the
131 command &lsquo;<samp><span class="samp">ptelnet foo.edu</span></samp>&rsquo; to connect to your account at
132 &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;.
133
134    <p>ICC timestamp and FICS timeseal do not work through some
135 firewalls.  You can use them only if your firewall gives a clean TCP
136 connection with a full 8-bit wide path.  If your firewall allows you
137 to get out only by running a special telnet program, you can't use
138 timestamp or timeseal across it.  But if you have access to a
139 computer just outside your firewall, and you have much lower netlag
140 when talking to that computer than to the ICS, it might be worthwhile
141 running timestamp there.  Follow the instructions above for hopping
142 through a host outside the firewall (foo.edu in the example),
143 but run timestamp or timeseal on that host instead of telnet.
144
145    <p>Suppose that you have a SOCKS firewall that will give you a clean
146 8-bit wide TCP connection to the chess server, but only after you
147 authenticate yourself via the SOCKS protocol.  In that case, you could
148 make a socksified version of XBoard and run that.  If you are using
149 timestamp or timeseal, you will to socksify it, not XBoard; this may
150 be difficult seeing that ICC and FICS do not provide source code for
151 these programs.  Socksification is beyond the scope of this document,
152 but see the SOCKS Web site at http://www.socks.permeo.com/. 
153 If you are missing SOCKS, try http://www.funbureau.com/.
154
155    </body></html>
156