Posts

FTP Server

apt-get install vsftpd /etc# vim vsftpd.conf ​​ listen=YES anonymous_enable=NO local_enable=YES write_enable=YES anon_upload_enable=NO anon_mkdir_write_enable=NO dirmessage_enable=YES use_localtime=YES xferlog_enable=YES connect_from_port_20=YES secure_chroot_dir=/var/run/ vsftpd/empty pam_service_name=vsftpd rsa_cert_file=/etc/ssl/ private/vsftpd.pem

Log analyzers: Squint Configuration and Tuning

Question: 1. how to install squint? 2. how to restart squint? 3. how to set schedule timer for update at squint? 4. how can we create user for squint? Solution: 1. Squint Installation: root@proxy:~# wget www.ledge.co.za/software/squint/squint-0.3.8.tar.gz [root@mail ~]# tar -zxvf squint-0.3.8.tar.gz squint-0.3.8/ squint-0.3.8/Makefile squint-0.3.8/COPYING squint-0.3.8/Changelog squint-0.3.8/TODO squint-0.3.8/fakenames squint-0.3.8/INSTALL squint-0.3.8/userlist squint-0.3.8/squint.cron.sh squint-0.3.8/squint.pl root@proxy:~# cd /root/squint-0.3.8 root@proxy:~# cp squint.pl squint.cron.sh /usr/local/bin root@proxy:~# squint.cron.sh init root@proxy:~# squint.cron.sh all 2. Restart Squint: root@proxy:~# squint.cron.sh all 3. Set the update schedule everyday at 1:30 PM from corn.d file like this way, root@proxy:~# vim /etc/crontab # m h dom mon dow user  command # squint squid reports # Weekly, on Mondays 00 01 * * *  roo...

Webmin Configure

1 .apt-get update     apt-get upgrade 2. wget http://prdownloads.sourceforge.net/webadmin/webmin_1.590_all.deb 3. dpkg --install webmin_1.590_all.deb ############# http://webmin.com/deb.html ################# webmin password change: /usr/share/webmin/ changepass. pl /etc/webmin username password

DHCP Server Configure:

1: apt-get install isc-dhcp-server 2. vim /etc/dhcp/dhcpd.conf Edit these two lines: option domain-name "bol-online.com"; option domain-name-servers 202.84.32.22, 202.84.32.23;            [ DNS ] And also these three lines: subnet 192.168.4.0 netmask 255.255.255.0 { range 192.168.4.1 192.168.4.20 ; option routers 192.168.4.254 ;                        [ Local Gateway ] } 3. /etc/init.d/isc-dhcp-server restart

Squint Configure

1.       Download actual version of squint and extract it: http://www.ledge.co.za/software/squint/ wget www.ledge.co.za/software/squint/squint-0.3.18.tar.gz 2.       tar – zxvf squint-0.3.18.tar.gz         3.        cd squint-0.3.18            ##To see installation steps --- more INSTALL   ### 4.       cp squint.pl squint.cron.sh /usr/local/bin/ 5.         cd /usr/local/bin# restart squint.pl squint.cron.sh squint.cron.sh init 6.       squint.cron.sh all 7.       squint.cron.sh regen 8.       Now Edit BASEDIR=”/var/www/localhost/htdocs/squint”          ### unhash this Line and Changed to >     ...

Setting up Mandatory Authentication for Internet Access

To setup authentication, first we need to download the package apache2 (Debian). First, we need to create a file that would contain the username and passwords of users who are allowed access. Step 1: #apt-get install apache2 Step 2 : #vim /etc/squid/password_file Now, the file ownership must be changed as owner: root and group: proxy #chown root:proxy /etc/squid/password_file #chmod 640 /etc/squid/password_file   Step 3 : Create the users: #htpasswd /etc/squid/passwd username   Step 4:  #/etc/squid/squid.conf   acl localhost src 127.0.0.1/32 acl to_localhost dst 127.0.0.0/8 acl bol_network src 192.168.200.0/24 acl login proxy_auth REQUIRED    ### Edit This line   http_access allow bol_network login       ### Edit This line http_access deny all   edit:   auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd   The following lines should be...

Setting Specific Time & Day for Browsing

The following lines have been taken from the file squid.conf. Each day can be represented by an alphabet. Moreover,browsing time can be limited using h1:m1 – h2:m2 parameters, where h1:m1 > h2:m2. #acl aclname time [day-abbrevs] [h1:m1-h2:m2] # day-abbrevs: # S - Sunday # M - Monday # T - Tuesday # W - Wednesday # H - Thursday # F - Friday # A - Saturday # h1:m1 must be less than h2:m2 # /etc/squid/squid.conf acl localhost src 127.0.0.1/32 acl to_localhost dst 127.0.0.0/8 acl time_limit time SMTWH 10:00 – 14:00 acl our_network src 192.168.200.0/24 http_access deny our_network time_limit http_access deny all Example: allow browsing during office hours only # /etc/squid/squid.conf acl localhost src 127.0.0.1/32 acl to_localhost dst 127.0.0.0/8 acl office_hours time SMTWH 08:00-18:00 acl non_office_hours time SMTWHFA 17:01-00:00 acl non_office_hours time SMTWHFA 00:00-08:59 acl our_network src 192.168.200.0/24 http_access deny our_network non_office_hou...