root/1.8.3/tags/p6rc1/game/access.README

Revision 457, 6.3 KB (checked in by pennmush, 2 years ago)

PennMUSH 1.7.7p29 Archival

Line 
1      Everything you ever wanted to know about access.cnf and more
2
3
4The file "access.cnf" in the game/ subdirectory controls access to the
5MUSH. It's used to restrict which sites can conect to players or guests,
6create players, or register players by email. It can also flag a site
7as suspect; all players who connect from suspect sites have their
8SUSPECT flag set.
9
10This file replaces the older lockout.cnf and sites.cnf file;
11typing 'make access' will create a new access.cnf file from your
12lockout.cnf and sites.cnf files.
13
14FILE SYNTAX
15
16The syntax of the file is simple. Each line gives information about
17a host or host-pattern:
18
19[user@]host [dbref] [options] [# comment]
20
21host - the only required file, this is a hostname or a wildcard pattern
22       to match. Examples:
23         berkeley.edu   - matches hostname berkeley.edu
24     *.berkeley.edu - matches hostname <anystring>.berkeley.edu
25         *berkeley.edu  - matches either of the above
26         *              - matches all hosts
27user@ - if the host supports ident, and you trust the ident response,
28        and you're sure that the link is fast enough that you'll always
29        get an ident response in time, you can match for specific
30        users. Example: johnq@netcom.com
31dbref   - The dbref of a character to restrict the rule too.
32          (Only makes sense for connect rules). Leave it out
33          or use '-2' to match all characters. Leave out the '#'
34          in the dbref.
35options - A space-separated list of options which apply to connections
36          from the host. Described in detail below.
37comment - an optional comment
38
39Everything in the file is separate by a single space - don't use tabs.
40
41The file is read line-by-line, and the first match is used. This
42means that the order in which hosts are listed is very important.
43
44Also, since both hostnames and IPs are checked, some rules must take
45both into account.
46
47There is one special line in the file, which looks like this:
48
49@sitelock
50
51This line indicates where @sitelock'd sites will be inserted in
52the file. Hosts listed after this line can have their access
53options superseded by using @sitelock on-line. Hosts listed before
54this line can not have their access options overriden by @sitelock.
55If the line doesn't appear in the file, it will be added to the end
56of the file at startup.
57
58
59READING AND WRITING THE FILE
60
61The access.cnf file is read and cached at startup, and whenever the MUSH
62receives a HUP signal.
63
64The access.cnf file is written back to disk whenever @sitelock is used.
65
66
67OPTIONS
68
69The following options are available for each host in the file:
70
71create  - People connecting from this host may 'create' players.
72!create - People connecting from this host may NOT 'create' players.
73connect - People may connect to their existing non-guest players.
74!connect - People may NOT connect to their existing non-guest players.
75guest   - People may connect to guest players from this host.
76!guest  - People may NOT connect to guest players from this host.
77none    - shorthand for: !create !connect !guest
78default - shorthand for: create connect guest
79!god    - God cannot connect from this host.
80!wizard - Wizards cannot connect from this host.
81!admin  - Wizards and Royalty cannot connect from this host.
82register - People may use the 'register' command from this host.
83suspect - All players connected to from this host will be set SUSPECT
84deny_silent - Don't log failed create/connect/guest/register attempts
85regexp - Use regexp match rather than glob matching for the pattern
86
87If no options are given, the host is treated as if option "none"
88were used. If at least one option is listed, it's assumed that
89hosts can do anything (create, connect, guest) that they are
90not prohibited from.
91
92
93EXAMPLE SCENARIOS
94
95Here are some typical ways you might want to set up your file:
96
971. Totally ban specific sites, allow all others
98
99*badsite.com -2 none
100*.twink.edu -2 none
101
102This will totally lock out those sites (like lockout.cnf)
103
104
1052. Allow specific sites and no others. Note that you must list both
106   hostname-matching patterns and ip address-matching patterns, because
107   if either fails to match a rule that allows connection, the connection
108   will be refused. This is true in general when writing positive rules.
109
110*.berkeley.edu -2 default
111128.32.* -2 default
112* -2 none
113
114People may connect from .berkeley.edu (128.32.) sites only.
115
116
1173. Allow connection but not creation from some sites
118
119*.twink.edu -2 !create
120
121This is equivalent to the former function of sites.cnf
122
123
1244. Allow connection but not creation or guest-connection from some sites
125
126*.twink.edu -2 !guest !create
127
128
1295. Require that a given site use the 'register' command to register
130   players by email.
131
132*.twink.edu -2 !create register
133
134Using !create prevents people from using the usual create command.
135Adding register allows them to uset the register command.
136
137
1386. Disable creation from twink.edu sites, and don't let Wizards
139   override this rule with @sitelock
140
141*.twink.edu -2 !create
142@sitelock
143
144Because the rule appears above "@sitelock", and @sitelock rules appear
145below "@sitelock", the rule will always be checked before any
146@sitelock rules.
147
148
1497. Disable creation from twink.edu sites, but allow Wizards to
150   later override this rule with @sitelock
151
152@sitelock
153*.twink.edu -2 !create
154
155Because the rule appears below "@sitelock", new @sitelock rules
156(which will be added immediately following "@sitelock") will precede
157it, and will be checked first.
158
1598. God can only be connected to from one specific account on the
160   server, and nowhere else. Wizards cannot override it. This requires
161   you to connect to 'localhost <port>' from a given account on the
162   same server the mush runs on. If the server doesn't support ident,
163   remove 'username@' so that anyone on the server can connect.
164
165username@localhost 1 connect
166username@127.0.0.1 1 connect
167* -2 !god
168@sitelock
169
1709. A complex example:
171
172  a) Allow anybody from localhost.berkeley.edu complete access
173  b) Force people from *.twink.edu to use registration, and set their
174     players SUSPECT
175  c) Completely ban *badsite.com, and don't log attempts to connect
176  d) Don't allow jerk@netcom.com to connect to Guests
177  e) Allow people from somesite.org to connect to Guests only.
178  f) Allow @sitelock to override c-e above
179
180localhost.berkeley.edu -2 default
181127.0.0.1 -2 default
182*.twink.edu -2 !create register suspect
183@sitelock
184*badsite.com -2 none deny_silent
185jerk@netcom.com -2 !guest
186somesite.org -2 !connect !create guest
187
188
Note: See TracBrowser for help on using the browser.