Internet Gateway Control Panel
http://home.nakhon.net/joke/igcp/
(c) 2542-2543 (1999-2000) by Joke
Version 0.1.7 Released 20/09/2543 (2000)

Overview

Internet Gateway Control Panel (IGCP) control SOME diald, squid and, in future, sendmail functions. It aims for used in a system which changed configuration frequently. For example, site with 2 ISPs. It contains some neat feature such as support 10 configurations, support 10 phone numbers per configuration, configure and control via web interface.

License

IGCP is free for non-commercial personal usage. IGCP is provided as-it-as. No warranty of all kind. For commercial, organizational, government, or educational usage, please contact me for more detail about license fee (which could be free in some cases.)

Download

Current version is 0.1.7. The version number uses the same notaion as Linux's.

Feature

Feature in version 0.1.7. (* = New feature in version 0.1.7)

Requirement

I don't know exactly what the requirement is, but these are my configurations which IGCP works.

Installation

Distribution of IGCP assumes that you've decompressed diald source code in /usr/src/diald and installed it in default directory (/usr/lib/diald) and use original Slackware's Apache installation (/var/lib/apache). If your configuration differs from above, you have to edit some IGCP files manually.

  1. Backup files in diald's library (/usr/lib/diald) and pppd configuration (/etc/ppp) because some of them will be overwritten. Decompress igcp-x.x.x.tar.gz in temporary directory (for example, /tmp), you will get 5 files: igcp-etc.tar.gz, igcp-lib.tar.gz, igcp-etc.tar.gz, pppderror.patch and igcp.html (this file).
    # cd /tmp
    # tar zxvf /path/to/igcp-x.x.x.tar.gz
  2. Apply pppderror.patch to diald, recompile and install it.
    # cd /usr/src
    # patch < /tmp/pppderror.patch
    # cd diald
    # make
    # make install
  3. Add this line to /etc/syslogd.conf. This will log pppd messages to proper file.
    daemon.=debug   /usr/lib/diald/pppd.log
  4. Decompress igcp-etc.tar.gz into /etc
    # cd /etc
    # tar zxvf /tmp/igcp-etc.tar.gz
  5. Decompress igcp-lib.tar.gz into /usr/lib/diald
    # cd /usr/lib/diald
    # tar zxvf /tmp/igcp-lib.tar.gz
  6. You may need to recompile squid_reconfigure.c and shutdown.c. Check the source code. They're simple one line C code. Be sure to turn on suid bit on executable file.
    # cd /usr/lib/diald/prog
    # gcc -o squid_reconfigure squid_reconfigure.c
    # gcc -o shutdown shutdown.c
    # chmod u+s squid_reconfigure shutdown
  7. Decompress igcp-www.tar.gz into web's directory. It assumes that there are htdocs and cgi-bin directories.
    # cd /var/lib/apache
    # tar zxvf /tmp/igcp-www.tar.gz
  8. Remove any parent proxy configuration from squid.conf. Rename it to squid.conf.in. Make sure squid.conf is writable by nobody. This file will be dynamically generated by IGCP.
    # cd /usr/local/squid/etc
    # grep -v "^cache_peer" squid.conf > squid.conf.in
    # chmod 644 squid.conf
    # chown nobody squid.conf
  9. Restart diald. The easiest way is to kill and rerun it.
    # killall diald
    # diald
  10. Enable override AuthConfig in /var/lib/apache/cgi-bin directory. This can be done by changing the word None to AuthConfig in file httpd.conf. Ie., change these lines:
    <Directory "/var/lib/apache/cgi-bin">
       AllowOverride None
       Options None
    To these lines.
    <Directory "/var/lib/apache/cgi-bin">
       AllowOverride AuthConfig
       Options None
    Then, restart Apache by:
    # apachectrl restart
  11. Create password file in /var/lib/apache by:
    # cd /var/lib/apache
    # bin/htpassword -c gateway.pwd gateway
    The username must be gateway.
  12. If the system complain (in /var/log/syslog or /var/log/debug) about unknown tcp.https, add these lines to /etc/services.
    https 443/tcp ssl
    https 443/udp ssl
  13. To change language, edit or create language.conf file in /var/lib/apache/cgi-bin/gateway. And change files in /var/lib/apache/htdocs/gateway.
  14. That's all. I think.

Usage

Point browser to http://your.host.name/gateway/ and follow instructions. This is brief step:

  1. Enter all ISP informations in Config menu. (1st menu)
  2. Select desired ISP in Select menu. (2nd menu)
  3. Control line by using Control menu. (3rd menu)

Bug

To Do

Feed Back

Please send your comment, suggestion or opinion to joke@nakhon.net.


20/09/2543 (2000) by Joke