OSDN Git Service

Ver.1.5.2: fixed mulfunctions by remained cookie and null http_host.
[opengate/opengate.git] / opengate / conf / opengatesrv.conf.sample
1 <?xml version="1.0"?>
2 <Opengate ConfigVersion="1.5.0">
3
4 <!-- ################################################# 
5      ####### NEED TO MODIFY FOLLOWING PARAMETERS #####  -->
6
7         <!-- #########################################################
8              ## Opengate gateway server hostname(FQDN or IP address)## -->
9
10         <OpengateServerName>opengate.og.saga-u.ac.jp</OpengateServerName>
11
12         <!-- #######################################################
13              ## Authentication servers (can set multiple servers) ##
14              ## REFER document at the end of this file            ## -->
15
16         <AuthServer>
17                 <Protocol>pop3s</Protocol>
18                 <Address>192.168.0.2</Address>
19         </AuthServer>
20
21 <!-- ########################################################## 
22      #### usually, need not to modify following parameters #### -->
23
24 <!-- ###################################################
25         if you want to switch parameters with userID or extraID
26         (entered by user as [userID@extraID] in auth page),
27         REFER the information of ExtraSet at the end of this file.
28     ###################################################  --> 
29
30         <!-- Debug dump level -->
31         <!-- Set 0 to write only open/close and error messages to syslog -->
32         <!-- Set 1 to write some information adding to 0 -->
33         <!-- Set 2 to write many information to syslog -->
34         <Debug>1</Debug>
35
36         <!-- client usage watch mode in default('Http', or 'Time') -->
37         <WatchMode>Http</WatchMode>
38         
39         <!-- Syslog (local0, local1, .., local7)-->
40         <Syslog>
41                 <Enable>1</Enable>
42                 <Facility>local1</Facility>
43         </Syslog>
44
45         <!-- SQLite database file -->
46         <SqliteDb>/tmp/opengate.db</SqliteDb>
47
48         <!-- Allowable duration for users to use network(seconds) -->
49         <!-- If no connection with http, network is closed after this. -->
50         <Duration>
51                 <Default>300</Default>
52                 <Max>3600</Max>
53         </Duration>
54         
55         <!-- Client Live Check (seconds) -->
56         <!-- In HTTP connection, existance of HELLO request. -->
57         <!-- In no connection, check mac address mismatch and no packet. -->
58         <ActiveCheckInterval>50</ActiveCheckInterval>
59
60         <!-- Close when no packet is passed between the interval -->
61         <NoPacketInterval>5400</NoPacketInterval>
62
63         <!-- Watch client with Http Keep-Alive -->
64         <HttpWatch>
65                 <!-- HTTP_USER_AGENT that is not compatible with http watch mode -->
66                 <!-- defined by "POSIX Extended Regular Expression" -->
67                 <SkipAgentPattern>^$</SkipAgentPattern>
68         </HttpWatch>
69
70         <!-- IPFW rule number range and tag number used by opengate -->
71         <IpfwRule>
72                 <Min>10000</Min>
73                 <Max>40000</Max>
74                 <Interval>2</Interval>
75         </IpfwRule>
76
77         <!-- IPFW Tag number used in rc.firewall -->
78         <IpfwTagNumber>123</IpfwTagNumber>
79
80         <!-- Port number range used by opengate -->
81         <ListenPort>
82                 <Min>30000</Min>
83                 <Max>60000</Max>
84         </ListenPort>
85
86         <!-- communication reply timeout(second) -->
87         <CommWaitTimeout>10</CommWaitTimeout>
88
89         <!-- http reconnect timeout(second) -->
90         <ReconnectTimeout>180</ReconnectTimeout>
91
92         <!-- ipfw exclusive exec lock timeout (second) -->
93         <LockTimeout>10</LockTimeout>
94
95         <!-- max delay from fwd.cgi to auth.cgi (second) -->
96         <ForwardingDelay>300</ForwardingDelay>
97
98         
99         <!-- Available HTML languages (first lang is used as default) -->
100         <HtmlLangs>en ja</HtmlLangs>
101
102         <!-- Path to Apache Contents -->
103         <DocumentRoot>/usr/local/www/apache22/data</DocumentRoot>
104         <CgiDir>/cgi-bin</CgiDir>
105         <OpengateDir>/opengate</OpengateDir>
106
107         <!-- HTML Documents (in each language dir)-->
108         <DenyDoc>deny.html</DenyDoc>
109         <AcceptDocHttp>accept-http.html</AcceptDocHttp>
110         <AcceptDocTime>accept-time.html</AcceptDocTime>
111         <AcceptDoc2>accept2.html</AcceptDoc2>
112         <AuthDoc>index.html</AuthDoc>
113         <AuthDocSsl>index-ssl.html</AuthDocSsl>
114         <FwdDoc>topindex.html</FwdDoc>
115         <RetryDoc>retry.html</RetryDoc>
116         <HttpKeepDoc>httpkeep.html</HttpKeepDoc>
117         <SkipAuthDoc>skip-auth.html</SkipAuthDoc>
118
119         <!-- CGI programs -->
120         <AuthCgi>opengateauth.cgi</AuthCgi>
121         <FwdCgi>opengatefwd.cgi</FwdCgi>
122         <MainCgi>opengatesrv.cgi</MainCgi>
123
124         <!-- JavaScript (in opengate dir) -->
125         <HttpKeepJS>httpkeep.js</HttpKeepJS>
126         <Md5JS>md5.js</Md5JS>
127
128         <!-- URL used for retrying -->
129         <ExternalUrl>http://www.google.com/</ExternalUrl>
130
131         <!-- Url to start browsing after authentication -->
132         <!-- type:0=acceptdoc2.html,1=below Url,2=redirected(requested) Url -->
133         <StartPage>
134                 <Type>0</Type>
135                 <Url>http://www.yahoo.com/</Url>
136         </StartPage>
137
138         <!-- authentication by http-cookie is allowed(1) or not(0) --> 
139         <EnableCookieAuth>1</EnableCookieAuth>
140
141         <!-- Related command path -->
142         <ArpPath>/usr/sbin/arp</ArpPath>
143         <NdpPath>/usr/sbin/ndp</NdpPath>
144         <IpfwPath>/sbin/ipfw</IpfwPath>
145         <PsPath>/bin/ps</PsPath>
146
147         <!-- Ipfw is opened via perl script(1) or direct from C(0) -->
148         <IpfwScript>
149                 <Enable>0</Enable>
150                 <Path>/etc/opengate/ipfwctrl.pl</Path>
151         </IpfwScript>
152
153         <!-- Lock file for exclusive exec to prevent overlapped rule number -->
154         <LockFile>/tmp/opengate.lock</LockFile>
155
156         <!-- Separate char between userID and extraID [userID@extraID] -->
157         <UserIdSeparator>@</UserIdSeparator>
158
159
160         <!-- #### Config for exceptional users, See below document #### -->
161         ## To use below sample, remove the XML comment mark ## 
162
163 <!--    ## ExtraSet sample 1 ##
164         <ExtraSet ExtraId="guest">
165                 <AuthServer>
166                         <Address>192.168.0.1</Address>
167                         <Protocol>ftp</Protocol>
168                 </AuthServer>
169                 <IpfwTagNumber>999</IpfwTagNumber>
170
171         </ExtraSet>
172         ## End of sample 1 ##  -->
173
174 <!--    ## ExtraSet sample 2 ##
175         <ExtraSet ExtraId="admin">
176                 <AuthServer>
177                         <Protocol>pam</Protocol>
178                 </AuthServer>
179                 <AuthServer>
180                         <Address>192.168.0.1</Address>
181                         <Protocol>pop3s</Protocol>
182                         <Timeout>10</Timeout>
183                 </AuthServer>
184                 <AuthServer>
185                         <Address>192.168.0.2</Address>
186                         <Protocol>ftp</Protocol>
187                         <Timeout>10</Timeout>
188                 </AuthServer>
189         </ExtraSet>
190         ## End of sample 2 ##  -->
191
192 <!--    ## ExtraSet sample 3 ##
193         <ExtraSet ExtraId="default" UserIdPattern="^user1$|^user2$">    
194                 <Syslog>
195                         <Enable>1</Enable>
196                         <Facility>local2</Facility>
197                 </Syslog>
198         </ExtraSet>
199         ## Caution: if no userid is entered, set as userid="?"  ##
200         ## End of sample 3 ##  -->
201
202 </Opengate> 
203 <!-- ## End of Configuration ## -->
204
205
206
207
208
209 <!-- ## Following is only documentation ## -->
210
211 <!-- ###### about ExtraSet #######
212
213      <ExtraSet> overwritten on default settings 
214
215         You can switch parameter values by userID and extraID 
216         entered as [userID@extraID] in userID field on auth page.
217         
218         Each <ExtraSet> has conditions such as <.. ExtraId="aaa"> or 
219         <.. UserIdPattern="bbb">.
220         The conditions is compared with the string entered in 
221         userID field.
222
223         When you set the condition as <.. ExtraId="aaa">, 
224         the string [any_user@aaa] is matched and the ExtraSet is used.
225                 
226         When you set the condition as <.. UserIdPattern="bbb">,
227         the string [any_bbb_any] is matched.
228         UserIdPattern has the form of "POSIX Extended Regular Expression".
229         Matching is insensitive to upper/lower case.
230         
231         The <ExtraSet> having both conditions is used when both are true.
232         Omitted condition matched to every string. 
233
234         The first matched <ExtraSet> is used, at existing many matched set.
235
236         The paremeters in <ExtraSet> overwrite the default value.
237         When a parameter is not found in <ExtraSet>, the default is used.
238         
239         When userID is entered without extraID, ExtraId matchs to "default".
240         Thus if you want to find [user1] only in default server,
241         use as <ExtraSet ExtraId="default" UserIdPattern="^user1$">.
242
243         Example1 is used when user entered as [any_user@guest],
244         where "any_user" is any string.
245         It means that [xxx@guest] uses different auth server.
246
247         Example2 is used when [anyuser@admin].
248         It means that [xxx@adimin] can use many auth servers.
249
250         Example3 is used when [user1] or [user2].
251         It means that [user1] and [user2] emerge specific syslog(eg. mail).
252
253 -->
254
255 <!--    ###### About AuthServer setting ######
256         
257         ########### Format ############# 
258                 {a|b}: a or b, set one of them 
259                 [ x ]: x is optional
260                  -x- : x is a value
261         
262         #### TYPE 1 (POP or FTP) ####
263         <AuthServer>
264                 <Protocol>{pop3|pop3s|ftp|ftpse|ftpsi}</Protocol>
265                 <Address>{-hostname-|-ip_address-}</Address>
266                 [ <Port>-portno-</Port> ]
267                 [ <Timeout>-seconds-</Timeout> ]
268         </AuthServer>
269         #   AuthOK, if request by <Protocol> is accepted by <Address>.
270         #   Address is FQDN or IP address       
271         #   If <Port> is not defined, port number in /etc/services is used.
272         #   The request is aborted at <Timeout> seconds.
273         #   If <Timeout> is not defined, system value is used.
274         #   pop3s is SSLed pop3
275         #   ftpse is SSLed ftp run in Explicit mode. 
276         #   ftpsi is SSLed ftp run in Implicit mode.
277
278         #### TYPE 2 (PAM) ####
279         <AuthServer>
280                 <Protocol>pam</Protocol>
281                 [ <ServiceName>-servicename_in_pam_conf-</ServiceName> ]
282                 [ <Timeout>-second-</Timeout> ]
283         </AuthServer>
284         #   Auth by PAM
285         #   If not define <ServiceName>, "opengate" is used in "pam.conf".
286
287         #### TYPE 3 (RADIUS) ####
288         <AuthServer>
289                 <Protocol>radius</Protocol>
290                 [ <ConfFile>-path_to_radius_conf-</ConfFile> ]
291                 [ <Timeout>-second-</Timeout> ]
292         </AuthServer>
293         #   Auth by RADIUS
294         #   If not define <ConfigFile>, "/etc/radius.conf" is used.
295         
296         #### TYPE 4 (LDAP) ####
297         <AuthServer>
298                 <Protocol>ldap</Protocol>
299                 <Uri>-uri-of-ldap-server-</Uri>
300                 <BaseDN>-ldap_base_dn_to_search-</BaseDN>
301                 [ <Timeout>-second-</Timeout> ]
302         </AuthServer>
303         #   Auth by LDAP/LDAPS
304         #   Uri examples
305         #     'ldap://foo.bar.com' for NonSSL
306         #     'ldaps://foo.bar.com' for SSL
307         #     'ldaps://foo.bar.com:1234' to use specific port
308         
309         #### TYPE 5 (ACCEPT or DENY) ####
310         <AuthServer>
311                 <Protocol>{accept|deny}</Protocol>
312         </AuthServer>
313         #   The user is accepted or denied without inquiry.
314         #   This setting is prepared for debugging.
315 -->     
316
317 <!--    ######## Examples of Auth Server Setting ##############
318         <AuthServer>
319                 <Address>pop.saga-u.ac.jp</Address>
320                 <Protocol>pop3s</Protocol>
321                 <Timeout>30</Timeout>
322         </AuthServer>
323
324         <AuthServer>
325                 <Protocol>ldap</Protocol>
326                 <Uri>ldaps://ldap.saga-u.ac.jp</Uri>
327                 <BaseDN>ou=people,dc=saga-u,dc=ac,dc=jp</BaseDN>
328                 <Timeout>5</Timeout>
329         </AuthServer>
330
331         <AuthServer>
332                 <Address>192.168.0.1</Address>
333                 <Protocol>ftpsi</Protocol>
334                 <Timeout>15</Timeout>
335         </AuthServer>
336
337         <AuthServer>
338                 <Protocol>radius</Protocol>
339         </AuthServer>
340
341         <AuthServer>
342                 <Protocol>pam</Protocol>
343         </AuthServer>
344 -->
345
346 <!--    ####### An Example of Multiple authentication servers ######
347         If multiple auth servers are set, check these servers sequentially.
348         When denied by a server, request is sent to the next one.
349         And when accepted by a server, following servers are ignored.
350
351         <AuthServer>
352                 setting for first priority
353         </AuthServer>
354         <AuthServer>
355                 setting for second priority
356         </AuthServer>
357         <AuthServer>
358                 setting for third priority
359         </AuthServer>
360
361 -->