1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493
|
# config-file for LineControl Server 2.1-2
# the order of the keywords doesn't matter (except filter_*)
# keyword and value must be separated by _one white-space (32)_
# don't use any keyword twice (except 'line' and keywords that
# apply to lines instead to the whole server process (global keywords)
#
# This file suits the Debian compilation options.
#
# first we have a look at the global keywords:
#-----------------------
# Server Port
#
# the IP the server is listening on (currently only one ip).
# if you would like to listen on many devices you have
# to say 0.0.0.0 (or try something like 192.168.0.0,
# maybe it works...)
bind_to 127.0.0.1
# TCP port 16007 is default
port 16007
#-----------------------
# User Accounting
#
# if you set 'user_accounting' to yes, only LCP3 (LineControl Protocol 3.x)
# clients will have access (other clients don't support the neccessary
# protocol)
# If you compiled linesrv with neither PAM nor crypt you have
# to say 'no' here... (or don't tell me you can't login! ;)
# Debian version it is compiled with in Linux-PAM support,
# so you have to set 'user_accounting yes'.
user_accounting yes
#---------------------------
# online costs
#
# define 'tarif' if you want the online costs to be calculated
# the keywords tarif and currency are not parsed by linesrv.
# only lclog starting at linesrv 2.1.11 can calculate costs.
# see /etc/linesrv/ for details.
tarif /etc/linesrv/tarif.conf
currency EUR
#---------------------------
# logging
#
# with 'logfile' you can log the ip, "from" time, "to" time and the seconds
# a client used the connection. Furthermore the server logs the same
# without IP when the connection gets closed (either by 'server' or
# 'manually')
# remember that multiple clients can use the connection at the
# same time. So the sum of the secs of the clients is not the
# one of the 'line ...' entries! (evidentially... :)
# You can parse the logfile with lclog.
# If you're using mysql for logging and would like to disable logging
# to the file (because you don't want to log everything twice) just
# comment out the logfile keyword.
logfile /var/log/linesrv/dialsrv.log
# linesrv can log its process id to a file. This file won't be removed
# by linesrv on shutdown. It will be overwritten on startup.
# (maybe a bug. But there are more important things right now!)
# you can use 'kill -QUIT `cat /var/run/linesrv.pid`' to terminate
# linesrv correctly. Afterwards do a 'rm /var/run/linesrv.pid'...
pidfile /var/run/linesrv.pid
#-----------------------
# MySQL logging
#
# This feature logs everything that has been logged to the logfile
# to a mysql database. Read ./mysqldb.linesrv.dump to get an idea
# how the mysql database has to be prepared.
# Use lclog-mysql (php scripts) to generate statistics. Get it from
# http://linecontrol.sourceforge.net/ --> "Download"
#db_hostname localhost
#db_port 3306
#db_user linesrv
#db_pass yourpwd
#db_name linesrv
#-----------------------
# HTML server status report
# This lets you to see connection status by pointing
# your browser at http://<servername>/cgi-bin/htmlstatus
html_status /var/lib/linesrv/htmlstatus
#---------------------------------
# ISDN-Watcher
#
# If you don't have ISDN or don't want the clients to display incoming
# ISDN calls just set caller_nr_pos to 0 and start linesrv as you would
# start any normal program :) ( '/<path>/linesrv'<enter> )
# If you want the clients to display incoming ISDN calls, start
# isdnlog and linesrv so that isdnlog pipes its logging output
# to stdin of linesrv: '/<path>/isdnlog <options> | /<path>/linesrv'
#
# in this section you have to configure the exact positions of a few strings
# which appear in the isdnlog message if you have an incoming call.
#
# If these positions are wrong we cannot inform you when someone is
# trying to call you.
#
# The file, where those positions are defined is /etc/isdn/isdn.conf.
# The two interesting lines are "ILABEL" and "OLABEL"-line in the
# [ISDNLOG] subsection.
#
# We recomend to put those two example lines there and remove the already
# existing lines (if you do this, you do _not_ have to proceed setting
# the variables in this file, they already match):
# ILABEL = Incoming: %b %e %T %I Call to tei %t from %N0 on %n4
# OLABEL = Outgoing: %b %e %T %I tei %t calling %N2 with %n2
#
# We need to know the first word after the '=' sign (so don't put a % there)
# on the ILABEL line
caller_delimiter Incoming:
# We need to know the first word after the '=' sign (so don't put a % there)
# of the OLABEL line
receiver_delimiter Outgoing:
# At which position do we find the '%b' in the ILABEL line ?
# (start counting with 1, beginning after the 'caller_delimiter')
month_pos 1
#
# At which position do we find the '%e' in the ILABEL line ?
# (start counting with 1, beginning after the 'caller_delimiter')
day_pos 2
#
# At which position do we find the '%T' in the ILABEL line ?
# (start counting with 1, beginning after the 'caller_delimiter')
time_pos 3
#
# At which position do we find the '%N0' in the ILABEL line ?
# (start counting with 1, beginning after the 'caller_delimiter')
caller_nr_pos 10
#
# At which position do we find the '%n4' in the ILABEL line ?
# (start counting with 1, beginning after the 'caller_delimiter')
receiver_nr_pos 12
# You may configure your own addressbook. Your defined aliases will be
# displayed instead of the caller number.
# An example addressbook is part of this package (it's called "addr_book")
addressbook_location /etc/linesrv/addr_book
#-----------------------
# IP Filters
#
# with filters you may decide whether a certain client may use dialsrv or not.
# if filter_type is allow, all clients in the list have access to the server,
# others don't. If it's deny, all but those in the list have access.
# Remember that UDP/IP is extremely easy to spoof. Use Clients without
# user accounting only on a trusted subnet and block the 'port' at
# your firewall.
# you have to use this filter. Even if you switched on user_accounting.
# this is still old code from a previous version...
# Most people wouldn't need ip filters. So leave the filter_* lines as
# they are as long as you don't know what you're doing.
# filter_type (allow|deny)
# Defines what to do with ip addresses that match the filters you
# will define below.
filter_type allow
# Descriptions of a useful filter config see below. Most people blocking
# the port of linesrv at the firewall and using user_accounting won't need
# ip lists. So we just allow any ip (comment out the next line and read
# further description of filter_mask/_ip keywords below to make real use
# of the filter):
filter_mask 0.0.0.0 0.0.0.0
# if filter_type has been used (you must use it), the following keywords
# may be used more than once:
# filter_mask <ip> <bit-mask>
# filter_ip <from> <to>
# a range:
#filter_ip 192.168.1.1 192.168.1.4
# a mask (subnet):
#filter_mask 127.0.0.0 255.255.255.0
#filter_mask 192.168.1.0 255.255.255.0
# each keyword filter_* appends a new item to the list.
# Continue as needed.
# ex.
#filter_ip 192.168.1.1 192.168.1.126
#filter_mask 192.168.2.0 255.255.255.0
#filter_mask 192.168.3.0 255.255.255.0
#filter_mask 192.168.4.0 255.255.255.0
#-----------------------
# Shutdown features
#
script_shutdown /var/lib/linesrv/halt-wrapper
# you have to specify a filter list of IPs that are allowed to
# execute the 'script_shutdown'. Remember that UDP is very easy
# to spoof (just use IP-spoofing to get around the filter...).
# Block the LineControl UDP+TCP ports at your firewall and use
# LineControl only on a trusted subnet.
# LineControl does also support TCP connections. They're much
# harder to spoof... but some bad boy can just take your own IP...
# You don't have to use filter_type or so again. The type of the
# shutdown-filter is always 'allow'. Only listed IPs are allowed
# to execute the script. The host has to pass the by filter_*
# specified list. So this list is additional and doesn't replace
# the other one.
# a range ( from ... to ... inclusive): (uncomment/change following line)
#limit_shutdown_ip 192.168.0.1 192.168.0.4
# a mask: (uncomment/change following line)
#limit_shutdown_mask 127.0.0.0 255.255.255.0
# each limit_shutdown_* entry appends an item to the list of
# for shutdown accepted hosts. Continue as needed.
# ex.
#limit_shutdown_ip 192.168.1.1 192.168.1.12
#----------------------------------
# LPT status
#
# with the LPT-status feature and a few transistors and LEDs you can
# monitor your linestatus using hardware.
# There are 2 possibilities:
# lines: the LPT ports databits (0-7) represent the lines 1-8
# HI ==> line established, LOW ==> line closed
# clients: data bits 0-7 represent the number of clients that
# are online on the default line (0). If the value is
# decimal 255, that means 255 or more clients are online.
# One day this should change to a BCD encoded number of clients.
# If you're a bit confused about such special things: just don't use the
# lpt* keywords...
#lptstatus off
#lptaddr 0x3bc
#lptline some_linename_that_you_will_define_below
#lptaddr 0x378
#lptaddr 0x278
#---------------------------------------
# until know, the keywords applied for the whole server process.
# All coming keywords apply to the line defined by the previous
# 'line <linename>' statement. If you use line dependent keywords
# before you use the line keyword, those lines will be used as
# default values for all lines. Default line values can be overwritten
# in the appropriate line section.
# You have to define at least one line.
# You can also use global keywords in a line section... they won't
# apply to the line but to the whole server process as they were
# in the global section.
#---------------------------------------
#line T-Online
#-----------------------
# Line Configuration
#
# these may be used only once:
# the script_up and script_dn scripts must be used to establish and
# close the desired line / internet-connection. 'interface' specifies
# the networkinterface where all the traffic of the line goes through.
# We parse /proc/net/dev for this interface and generate the troughput
# messages from the collected data.
# LineControl doesn't query any modem or other hardware directly
# to get information about the line. See the description of the
# keyword 'con_type' below on how linesrv gets the line status.
#script_up /etc/ippp/isdn.dial
#script_dn /etc/ippp/isdn.hangup
#interface ippp0
# How can we determine the status of the connection (only up / down)?
# The 3 possibilities:
# 'con_type netdev': for analog modems, you probably need this if you're
# working with pppd. The network device (ex. ppp0) tells
# us about the connection status. If it's up, the connection
# is considered as up. If not, we believe that the con
# is closed.
# 'con_type isdn' : the only good choice for systems with isdn4linux. linesrv
# scans /dev/isdninfo for the connection status. You have
# to supply some more information about your isdn configuration,
# see below...
# 'con_type file' : you have to supply 'con_status_file <filename>'. If this
# file exists the connection is considered as established.
# Let your script delete it after it closed the connection.
# This should be useful for people with a quite special
# internet connection.
#
# ADSL / Cable modem users: take 'con_type netdev' and don't let linesrv manage
# the connection (set script_up/_dn to '/bin/true' or so...). Like that your
# line will show up as manually established or down. As long as it show up as
# manually established people won't be able to shut it down or dial. Of course
# people can go online/offline so times get logged and you're able to modify
# the firewall using client_online / client_offline scripts. The problem is
# that until know (2002-03-09) none of my clients (wlc, wlc2, lcc, xlc)
# supports this (buttons disabled when linestatus is "manually established").
# linesrv 3 will have better support for lines where we only
# want to do monitoring than this linesrv version.
#con_type isdn
# logging: with 'mklog no' you can disable logging for certain
# lines (user log entries regarding the same line will be
# affected too).
# Default is enabled. But the stuff get's only logged if logging
# (either mysql or to a file) is configured correctly above and
# works (filepermissions, database setup).
#mklog yes
# inform the server about the line capabilities so it can report
# this to the clients (baud == bits per second):
# analog modem users: your connection speed can vary from time to
# time. Enter here the values you usually expect (not the one you
# would like ;).
#line_baud_up 64000
#line_baud_down 64000
# allow_manually defines whether linesrv should close a connection that
# got established without that linesrv called the script_up. So if you
# have for example a cron job which checks for a running linesrv, you
# can say "allow_manually no". This way linesrv will close a line that
# it left open before a crash. So the line gets closed when linesrv
# gets restarted.
# attention: if you have two lines with the same con_type and the
# same thing that tells us whether a line is up or down linesrv will
# consider one line as established by the server and the other one
# established manually. In this case you HAVE TO SET "allow_manually yes".
# If not, linesrv won't work well (I know, it's a bug.).
#allow_manually no
# 'script_esc' get's called if 'script_up' failed to establish a connection
# after 'con_timeout' seconds
# This script should establish the basic constellation so we can call
# script_up again. Don't use this keyword, if you don't like it :)
script_esc /etc/isdncontrol/isdn.offline
# for 'con_type file' you need something like the following line:
#con_status_file /etc/ppp/.con-is-up
# your up/dn scripts will have to create/remove this file. Change
# the filename to suit your needs. It doesn disturb as long as you're
# not using 'con_type file'.
# set con_timeout to something like 15 if you're using isdn
# after # secs, the connection-establishment gets abortet
# if the connection didn't get established.
# (ADSL / Cable) monitoring only: if you have set script_up / _dn
# to /bin/true, then set "con_timeout 1" and "script_esc /bin/false"
# If you don't do that the chance the following to happen is higher:
# 1. the line is down (e.g. bad provider ;)
# 2. user X clicks 'online' (tries to dial)
# 3. linesrv executes script_up
# 4. the connection gets up before con_timeout is over, so linesrv
# treats the lines as it had status 'established by server'
# (it thinks that script_up has succeeded, but as we know it
# didn't establish any connection).
# --> Problem: wrong logfiles (not logged as 'manually estab.').
#con_timeout 15
# how long do we wait between calling script_dn and the closed state of
# the device usually? If this times out, errors get logged & sent
#con_down_timeout 10
# DON'T set the following to 'no'! (Your clients won't run well...)
# probably this keyword will disapear in a coming version.
# It's a relict from DialControl 1.0
#send_throughput yes
# Linelocking: see WLC or an other client that supports it...
# With line locking a client can set/remove a locked flag on an
# established line.
# If a line has set that flag it won't get closed even when there
# aren't any connected clients at all.
#line_locking no
#-----------------------
# Pinger utility
#
# send pings to avoid a hangup (use it if you've got ISDN and your
# dialmode is AUTO or if you get kicked by your ISP)
# pinger yes/no: to switch the whole thing on/off
pinger no
# pinger_ip: who should we ping? --> probably your ISP, so change this! :)
#pinger_ip 172.0.0.1
# I think you probably don't like IPs:
# please change the hostname to the one of your provider.
#pinger_hostname localhost
# pinger_interval: all how many seconds? default is 120
pinger_interval 120
# pinger_datasize: how many bytes of random-garbage to append
# default is 10 as far as I remember...
pinger_datasize 60
#-----------------------
# ISDN configuration
#
# It is important to set the correct isdn_id here, or else dialsrv won't be able
# to get the infos about the connection and will always try to hangup after
# con_timeout seconds. To get your isdn_id start imon and check what your LineID
# is, this is your isdn_id!
isdn_id HiSax
# isdn_channel is not the number of channels you want to use. It is the ID
# of your base channel (the one when you're using only one).
isdn_channel 0
# isdn_channel_op will be called with 'add' (no quotes...) or 'remove' as
# parameter $1. It should add or remove a secondary isdn-channel. Use
# isdnctrl to do that. You [don't need|can't use] it for analog lines
isdn_channel_op /usr/lib/linesrv/isdn_chan
#-----------------------
# Client specific Masquerading
#
# If you would like to run a script whenever a client goes online/offline,
# try it with the following keywords. The scripts get called with the IP
# of the client as first parameter. Remember that there can be more than
# one client per IP. So 'client_has_gone_online 192.168.0.12' can be called
# more than once without calling 'client_has_gone_offline 192.168.0.12'
# in between.
#client_online /etc/linesrv/client_on
#client_offline /etc/linesrv/client_off
# end of config-file
|