OSDN Git Service

Ver.0.8.1
[opengatem/opengatem.git] / conf / opengatemd.conf.sample
1 <?xml version="1.0"?>
2 <Opengatemd ConfigVersion="0.6.0">
3
4         <!-- Debug dump level -->
5         <!-- Set 0 to write only open/close and error messages to syslog -->
6         <!-- Set 1 to write some information adding to 0 -->
7         <!-- Set 2 to write many information to syslog -->
8         <!-- Set 3 to write many information (including busy loop) to syslog -->
9         <Debug>1</Debug>
10
11         <!-- Syslog (local0, local1, .., local7)-->
12         <Syslog>
13                 <Enable>1</Enable>
14                 <Facility>local1</Facility>
15         </Syslog>
16
17         <!-- ### MUST BE MODIFIED ## -->
18         <!-- MySql database (for mac address management) parameters -->
19         <MySqlDb>
20                 <Server>localhost</Server>
21                 <User>root</User>
22                 <Password></Password>
23                 <Database>opengatem</Database>
24         </MySqlDb>
25         
26         <!-- UDP server port to receive command from managing machine -->
27         <!-- Be care to set firewall properly to pass the udp packet -->
28         <UdpServerPort>4989</UdpServerPort>
29
30         <!-- ### MUST BE MODIFIED ## -->
31         <!-- # Set hosts where opengateMmng are running # --> 
32         <!-- OpengateMmng acts as UDP client and Md(daemon) acts as server -->
33         <!-- DB update is transmitted immediately with this UDP --> 
34         <!-- (If failed, update is transmitted after cache timeout) --> 
35         <!-- Following set trusted UDP clients from which UDP are allowed -->
36         <!-- (Local host is trusted) -->
37         <!-- Be care to set firewall properly to pass the packet -->
38         <!--
39                 <UdpClient>192.168.1.1</UdpClient>
40                 <UdpClient>192.168.2.1</UdpClient>
41                 <UdpClient>192.168.3.1</UdpClient>
42         -->
43         
44         <!-- ### MUST BE MODIFIED ## -->
45         <!--libpcap parameters -->
46         <Pcap>
47                 <!-- device to sniff on -->
48                 <Device>fxp0</Device>
49
50                 <!-- snapshot length (=tcpdump defalut) -->
51                 <SnapLength>68</SnapLength>
52
53                 <!-- capture timeout in msec --> 
54                 <Timeout>200</Timeout>
55
56                 <!-- promiscuous mode(1=on) -->
57                 <Promiscuous>0</Promiscuous>
58
59                 <!-- pcap filter -->
60                 <!-- %s is replaced with mac address of this pcap device -->
61                 <Filter>(not ether src %s) and (not src net fe80::0/64)</Filter>
62         </Pcap>
63
64         <!-- valid initial ttl values in many systems -->
65         <!-- (http://noahdavids.org/self_published/TTL_values.html) -->
66         <ValidInitialTtl>30 32 60 64 128 200 255</ValidInitialTtl>
67
68         <!-- IPFW rule number range and tag number used by opengate -->
69         <IpfwRule>
70                 <Min>10000</Min>
71                 <Max>50000</Max>
72                 <Interval>1</Interval>
73         </IpfwRule>
74
75         <!-- IPFW Tag number used in rc.firewall -->
76         <IpfwTagNumber>123</IpfwTagNumber>
77
78         <!-- if no packet relating to the address is detected -->
79         <!-- in this time length (second), -->
80         <!--  close the network and remove session -->
81         <UselessTimeout>3600</UselessTimeout>
82
83         <!-- interval (second) to run procedure for above checking -->
84         <UselessCheckInterval>3600</UselessCheckInterval>
85
86         <!-- Address Pair Cache Timeout: packet check skip Interval (second) -->
87         <CacheTimeout>1200</CacheTimeout>
88
89         <!-- Mac Address Cache Timeout: MAC DB Cache Hold Time (second) -->
90         <MacCacheTimeout>1200</MacCacheTimeout>
91
92         <!-- SQLite busy timeout (milli-seconds) -->
93         <SqliteBusyTimeout>100</SqliteBusyTimeout>
94
95         <!-- SQLite database file -->
96         <!-- for opengatemd work -->
97         <SqliteDbMd>/tmp/opengatemd.db</SqliteDbMd>
98
99         <!-- SQLite database file -->
100         <!-- for opengate session management -->
101         <SqliteDb>/tmp/opengate.db</SqliteDb>
102
103         <!-- programs -->
104         <MacCheckDaemon>opengatemd</MacCheckDaemon>
105
106         <!-- Related command path -->
107         <IpfwPath>/sbin/ipfw</IpfwPath>
108
109         <!-- ipfw exclusive exec lock timeout (second) -->
110         <LockTimeout>10</LockTimeout>
111
112         <!-- Lock file to prevent overlapped ipfw rule number -->
113         <!-- exclusive execution to opengate processes -->
114         <LockFile>/tmp/opengate.lock</LockFile>
115
116         <!-- Lock file to prevent overlapped daemon proc -->
117         <DaemonLockFile>/tmp/opengatemd.lock</DaemonLockFile>
118
119         <!-- Ipfw is opened via perl script(1) or direct from C(0) -->
120         <IpfwScript>
121                 <Enable>0</Enable>
122                 <Path>/etc/opengate/ipfwctrlmd.pl</Path>
123         </IpfwScript>
124
125         <!-- Related command path -->
126         <ArpPath>/usr/sbin/arp</ArpPath>
127         <NdpPath>/usr/sbin/ndp</NdpPath>
128
129         <!-- flag to write log at detecting nat/router insertion -->
130         <!-- if ShowNat=1, write at detecting unknown nat/router -->
131         <!-- if ShowRouter=1, write at detecting routers defined below --> 
132         <ShowNat>0</ShowNat>
133         <ShowRouter>0</ShowRouter>
134
135         <!-- subnets under the gateway  -->
136         <!--  use to ignore valid routers in nat detectiion --> 
137         <!--  if not set, nat/router under gateway is suspected as nat -->
138         <!-- [(ipv4 address)/(netmask length) (router hop count)] -->
139         <!--  examples -->
140         <!-- <SubnetHopCount>192.168.0.0/22 1</SubnetHopCount> -->
141         <!-- <SubnetHopCount>192.168.1.0/24 2</SubnetHopCount> -->
142         <!-- <SubnetHopCount>192.168.161.0/22 1</SubnetHopCount> -->
143         <!-- <SubnetHopCount>192.168.240.0/22 1</SubnetHopCount> -->
144         <!-- <SubnetHopCount>192.168.161.0/24 2</SubnetHopCount> -->
145
146         <!-- Caution: ExrtaSet cannot use in opengatemd -->
147         <!-- because one deamon controls all users -->
148
149 </Opengatemd> 
150 <!-- ## End of Configuration ## -->