head 1.2; access; symbols; locks; strict; comment @# @; 1.2 date 95.10.17.12.27.08; author alexis; state Exp; branches; next 1.1; 1.1 date 95.10.10.16.15.48; author root; state Exp; branches; next ; desc @DOCUMENTATION FILE FOR INCP @ 1.2 log @Removed stuff about configuring certain variables which the user doesn't need to fiddle with. Detailed the move of site specific config info from incp to incp.cfg. @ text @I N C P : I N S T A L L I N G , C O N F I G U R A T I O N & U S E PART0: Manifesto Verify you have the following files: README first stop ip-up script to call incp in secret mode when the internet connection goes up ip-down script to call incp in secret mode when the internet connection goes down options empty PPP options file incp internetr connection program doc this file PART1: Installing incp 1) Put incp.cfg, incp.doc, incp and incpsh in /usr/local/lib/ppp. Set their modes with "chmod 700 /usr/local/ppp/incp*" and "chmod 600 /usr/local/ppp/incp.*" 2) Put ip-up, ip-down, and options in /etc/ppp Set the modes with "chmod 700 /etc/ppp/ip-*" and then "chmod 600 /etc/ppp/options" PART2: Configuring the "incp" script itself In the incp.cfg script are several things that need to be configured. These are all preceeded by the text string "CHANGE THIS" to enable you to quickly locate all the things you need to change. The are covered individually here and in the program itself. 1) CONFIGURED=false Change CONFIGURED to be "true" or incp will not run 2) PHONE_NUMBER="01813389666" What's your provider's phone number 3) LOGIN="danae" What's your PC's login name at your provider's POP ? It's probably the same as the name of your machine 4) PASSWORD="changethis" What's your PC's password at your provider's POP ? 5) PORT=/dev/cua0 What port is the modem on ? COM1 is /dev/cua0 COM2 is /dev/cua1 6) NETMASK=255.255.0.0 What's your provider's netmask ? If your provider is demon then use 255.255.0.0 If not and you don't know then use 255.255.255.0 7) NNTP_SERVER="news.demon.co.uk" What machine serves you with NNTP news ? 8) TESTHOSTS="gate.demon.co.uk ftp.demon.co.uk ftp.doc.ic.ac.uk" A list of hosts to contact to ascertain the line quality. These should start with your nearest neighbour and work away. Do *NOT* put any host in the list that you suspect might not be up all the time - otherwise the phone line will be dropped repeatedly. You don't have to use 3 hosts, you could use 5 or 1 or even none. 9) TESTLOSSES="10 10 10" This is the corresponding list of maximum data loss percentages. If *ANY* of them are exceeded then the phone will be dropped. The number of numbers here must be the same as the number of hosts in the previous section. PART3: Other things to configure 1) Add the following line to /etc/syslog.conf, which must have tabs separating it and not spaces: local0.info /var/adm/incplog 2) If you wish ordinary users to be able to initiate the internet connection then add the following line to /etc/passwd incp::0:0:Connection Activator,London,,:/tmp:/usr/local/lib/ppp/incpsh and set a passwd for the incp account, and inform your users of the existence of the account, its password and its purpose - to allow them to connect to internet without root being present. PART4: Use of incp Incp can only be run as root, well - more precisely on as user 0. The following outlines the various methods of using incp. 1) To connect to internet: /usr/local/lib/ppp/incp demon connect & 2) To disconnect from internet while connections are still in progress: /usr/local/lib/ppp/incp demon disconnect There are various options available to modify slightly how incp behaves: 3) To connect to internet with no idle timeout: /usr/local/lib/ppp/incp -ni demon connect & 4) To connect to internet with no line quality check /usr/local/lib/ppp/incp -nq demon connect & 5) To connect to internet with no news retrieval: /usr/local/lib/ppp/incp -nn demon connect & 6) To connect to internet with no idle timeout, no line quality check and no news retrieval: /usr/local/lib/ppp/incp -ni -nq -nn demon connect & 7) Examine /var/adm/incplog from time to time. The command "si" (which you may or may not have) will show the most interesting things about this log file. 8) Ordinary users may activate the internet connection by logging in as "incp" if this has been configured as specified above. PART5: Miscellaneous 1) incp is intended to be reasonably easy to modify to use with other providers. The principal areas of concern are: i) functions provider_connect, provider_disconnect, provider_upprocess and provider down_process must be written, to establish the connection, terminate the connection, do post-connection processing such as dispatching mail and receiving news, and do pre-disconnection processing respectively. The section dealing with the login chat will also need tailoring. ii) the section that checks to seem that a valid provider name is entered will need updating. enter the command: incp nosuchprovider connect to get an idea of what you're looking for. @ 1.1 log @Initial revision @ text @d18 3 a20 2 1) Put incp and incpsh in /usr/local/lib/ppp. Set their modes with "chmod 700 /usr/local/ppp/incp*" d28 1 a28 1 In the incp script are several things that need to be configured. These d37 1 a37 60 2) DFLT_DEBUG_LEVEL=2 This determines the amount of messages displayed if no option Command line values overrule the value specified here. 0 means absolutely no messages other than internal errors 1 means only fatal errors 2 means the same as 1 but also with warnings 3 means the same as 2 but also with informational messages 4+ means the same as 3 but also with debugging information - the higher the number the more debugging information is shown 3) DFLT_IDLE_TIME_OUT=180 This determines the amount of time for which the connection will be held open with no traffic on it before the connection is broken. Command line values overrule the value specified here. 4) DFLT_CHECK_QUALITY=true This determines whether line quality will be crudely ascertained before announcing to users that the connection is up. If the quality is not sufficient then the phone will be replaced and redialled. Command line values overrule the value specified here. 5) DFLT_GET_NEWS=true The default action is to retrieve news. This seems sensible. Command line values overrule the value specified here. 6) PPP_DAEMON=/usr/local/lib/ppp/pppd-experimental Where is a working copy of pppd located ? 7) SLIP_IDLE=/usr/local/lib/ppp/slip_idle Where is slip_idle located ? 8) XMITNEWS=/usr/local/lib/nntp/xmitnews Where is xmitnews located ? 9) NEWSRUNNING=/usr/lib/newsbin/input/newsrunning Where is newsrunning located ? 10) NNMASTER=/usr/lib/nn/nnmaster Where is nnmaster located ? 11) NNTP_DIR=/usr/local/lib/nntp Where are the config files for xmitnews and slurp located ? 12) SLURP=/usr/local/lib/nntp/slurp Where is slurp located ? 13) PHONE_NUMBER="01813389666" d41 1 a41 1 14) LOGIN="danae" d46 1 a46 1 15) PASSWORD="changethis" d50 1 a50 1 16) PORT=/dev/cua0 d56 1 a56 1 17) NETMASK=255.255.0.0 d62 1 a62 1 18) NNTP_SERVER="news.demon.co.uk" d66 1 a66 1 19) TESTHOSTS="gate.demon.co.uk ftp.demon.co.uk ftp.doc.ic.ac.uk" d74 1 a74 1 20) TESTLOSSES="10 10 10" d130 3 a132 1 7) Examine /var/adm/incplog from time to time. @