Available in

(5) (5)/cf

Contents

NAME

tcpquota.cf − The configuration file for the TCPQuota programs.

SYNOPSIS

/etc/tcpquota/tcpquota.cf

DESCRIPTION

tcpquota.cf contains various pieces of information used by the TCPQuota programs. It is used by the daemon,
tcpquotad(8) to find out to which mSQL database to store it’s values in, and which users/hosts that is grouped together. It is used by most of the program suite, to find out where to find the mSQL server.

Variables
PROTOCOL

What kind of network protocol are we using? Availible choises are PPP or ISDN. When using PPP, it checks for a link by checking if there is a route on ppp0. and if we are using ISDN, it checks the file /dev/isdninfo which contains the status of the ISDN channels.

Example: PROTOCOL=ISDN

LOC_ADDR

Only used if we are using ISDN as network protocol, ignored if we are using PPP since when using PPP, one usually have a dynamic IP address...
This is the address on the local side of the link (our address).

Example: LOC_ADDR=195.100.20.3

REM_ADDR

Only used if we are using ISDN as network protocol, ignored if we are using PPP since when using PPP, one usually have a dynamic IP address...
This is the address on the remote side of the link (the ISP’s address).

Example: REM_ADDR=195.100.170.187

SERVER

This is the machine/host which is running the mSQL server, could be IP address or FQDN address.

Example: SERVER=42.42.40.42

Example: SERVER=stalin.ccw.se

CHECK_REMOTE

Should we check if we have remote connects (if someone is connecting to us, via telnet/ssh/rlogin etc)? This is a boolean value, true/false, 1/0 or yes/no

Example: CHECK_REMOTE=yes

CHECK_FTP

Should we check if we have remote connects (if someone is connecting to us, via FTP)? This is a boolean value, true/false, 1/0 or yes/no

Example: CHECK_FTP=yes

CHECK_MASQ

Should we check any computers which is masqueraded? This is a boolean value, true/false, 1/0 or yes/no.

Example: CHECK_MASQ=yes

GROUPS

With this variable, one can group computers (masqueraded) together, and open each group separate. For example, we have three rooms, with eight computers in each room and one teacher in each. If the teacher have a class in ’Using the Internet safely’, and ’net time is included in the class fee, he/she wants to be able to open only that room for free ’net access. We then write (in the config file) the folloing:

GROUPS=GROUP1 GROUP2 GROUP3
GROUP1=machiavelli kaddaffi karadicz semin khomeini muboto chauchesko baptista
GROUP2=idiamin saddam mao lenin adolf kim pinochet castro
GROUP3=cleon indbur loris wienis asper stettin gilmer stannell

This would mean that if the teacher is sitting on khomeini, and runs the program openfw(8), He or she will open the following computers for free ’net access: machiavelli,kaddaffi,karadicz,semin,khomeini,muboto,chauchesko and baptista.

USERS

This is the same as the GROUPS variable, only for user group allowed free ’net access

Example: USERS=free turbo

LANGUAGE

What language we should use for the output. So far the programs have only been translated to Swedish and English (with a lot of spelling errors in the English version, I reckon :)

Example: LANGUAGE=svenska

MONEY_VALUE

What type of money we are using.

Example: MONEY_VALUE=SEk

LOGFILE

Where should we write our log file?

Example: LOGFILE=/var/log/tcpquotad.log

PIDFILE

Where should we write our pid?

Example: PIDFILE=/var/run/tcpquota.pid

NOQUOTAFILE

What file should we output to a user if he/she have gone below the minimum amount of allowed quota?

Example: NOQUOTAFILE=/etc/msgs/no-tcp-allowed

MIN_QUOTA

What is the minimum amount of quota, before we ’cut the link’ for the user? If the value is 0, then the user can not owe you anything, but if the value is, say, 200, then the user can owe you a maximum of 200 <MONEY_VALUE>.

Example: MIN_QUOTA=150

RATE_QUOTA

How much does the one minute cost under the cheap tarrif. In Sweden we have two different tarrifs, high and low.

Example: RATE_QUOTA=0.1

MIN_UID

Above what UID should we care about connects? If we set zero (0) here, even root have to pay... This may not a good option, since the mailer daemon, and the news daemon etc might do outside connects. We are working on a way to make each user pay for it’s own mail connect, but we have yet to find out a way...

Example: MIN_UID=1000

TICS

Number of tcpquotad passes an ’out’ session can be unconnected to the database before tcpquotad gets tired of waiting and throws it out. It is modified in relation to ’tcpquotad.PERIOD’...

Example: TICS=10

HIGH_START
HIGH_STOP

When does the low rate resp high rate begins and ends? (Hour of the day, in Sweden that is between 08.00 and 18.00 weekdays, and low rate on weekends)

Example: HIGH_START=08

Example: HIGH_TOP=18

HIGH_RATE
LOW_RATE

Weight for each second under resp period. What is the difference between high and low rate? (In Sweden the high rate is twice as expensive as the low rate)

Example: HIGH_RATE=2

Example: LOW_RATE=1

tcpquotad.PERIOD

How often should the main daemon check for connections? We have discovered, that on a 386 one might need to have a number higher than 30 (seconds), so that the machine is not to heavily loaded, and on a Pentium, one can check every five seconds without any problems...

Example: tcpquotad.PERIOD=5

Example: tcpquotad.PERIOD=30

tcp_masq_openhost.PERIOD

How often should the ’log daemon’ tcpquotatop (1) check for connections?

Example: tcp_masq_openhost.PERIOD=10

Example: tcp_masq_openhost.PERIOD=30

FILES

/etc/tcpquota/tcpquota.cf

SEE ALSO

tcpquotad (8), tcpquotatop (1)

AUTHOR

Turbo Fredriksson, <turbo [AT] tripnet.se>
Martin Budsjoe, <marbud [AT] tripnet.se>

COMMENTS

blog comments powered by Disqus