Install and configure all desired dependencies. You must change some options in config file. If you install lightwrapper from deb then config file is /etc/lightwrapper/cfg otherwise /usr/local/etc/lightwrapper/cfg. At least you must change:
Next option is disabled by default
show_not_users = false
If you enable this then network statistics will be collected for ip-adresses which not belongs for any user. If you use lw-geniprules then it useless since traffic from this adresses is dropped and you will see outbound requests and inbound "access denied" statistics. If you not use lw-geniprules then it may be useful.
Other default options are commented for explanation.
Start lightwrapper daemon:
/etc/init.d/lw-daemon start
if you use debian-compatible init system. Otherwise read "Linux distribution without debian compatible init system."
All done! Try to use web interface through
http://ip-addr-of-web-server/admin
Language may be choosed by changing $lang variable in lightsquid.cfg file.
Currently supported languages is:
If your language is not supported, you may translate one of the supported language files to your language and use it. Language files resides in dir defined by $langpath variable in lightsquid.cfg file. Send it to me for include in future releases. Lightwrapper language file must be in UTF-8 charset. Next string is mandatory: MSG_CODEPAGE=UTF-8. Also you may simply convert lightsquid *.lng file into UTF-8, add missing values and change MSG_CODEPAGE.
If you have dig utility installed then lightwrapper automatically will try to map ip adresses to names through dig with reverse lookup if squid lookup is failed or not performed. If lookup is succesfull then name adds to end of the address like this: https:23.64.211.172(akamaitechnologies.com)
If you want to disable this lookups you may set next option in config file:
dig = false
If you have squid installed then lightwrapper automatically will try to resolve ip addresses to names through squid access.log for users with 'squid' flag enabled.
For disable squid lookups you may set next option in config file:
squid_request = false
WARNING!
Lightwrapper not count any stats with squid access.log since web proxy and netflow works at various OSI levels. Log file access.log used only for ip-to-name mapping. For technical reasons that mapping is not 100% accurate. Lightwrapper defines 3 types of accuracy:
If you set some accuracy value in config file then all requests with higher accuracy is applied. You may set squid mapping accuracy through option (default is B):
squid_accuracy = B
For see accuracy for every request set next option:
squid_show_accuracy = true
If option is not set in config file then it has default value as described below:
If installer not found debian-compatible init system then it not copy inint scripts lw-daemon and ipset-persistent in /etc/init.d.
You must start /usr/local/sbin/lw-daemon at system startup by any other way than using /etc/inid.d/lw-daemon init script. Option supported_flags = ipblock will not work for you. In case to use iptables next option in config file must be set (installer must do it automatically):
custom_init = true
Iptables rules will be restored from rules.v4 file which resides in iptables_dir option every time when lw-daemon or lw-refresh is started.