User Tools

Site Tools


ubuntuserver810:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ubuntuserver810:start [2009/03/22 10:06] svschwartzubuntuserver810:start [2010/06/20 14:56] (current) svschwartz
Line 14: Line 14:
   * осталось еще настроить модули аутентификации((Pluggable Authentication Modules)) и авторизации((Name Service Switch)) самой операционной системы - [[ubuntuserver810:nss_pam_ldap|NSS и PAM]]   * осталось еще настроить модули аутентификации((Pluggable Authentication Modules)) и авторизации((Name Service Switch)) самой операционной системы - [[ubuntuserver810:nss_pam_ldap|NSS и PAM]]
   * и наконец настраиваем [[ubuntuserver810:samba|Samba]] в качестве нашего PDC((Primary Domain Controller))   * и наконец настраиваем [[ubuntuserver810:samba|Samba]] в качестве нашего PDC((Primary Domain Controller))
 +
 +[[http://www.cosmocode.de/en/loesungen/system/ldapab/index.html|Адрессная книга в LDAP]]
  
  
Line 26: Line 28:
   * установим и настроим интеллектуальную систему защиты от спама [[dspam_server|Dspam]] FIXME   * установим и настроим интеллектуальную систему защиты от спама [[dspam_server|Dspam]] FIXME
   * и наконец выполним интеграцию [[postfix_vs_dspam_queue_injection|Postfix vs Dspam]] FIXME   * и наконец выполним интеграцию [[postfix_vs_dspam_queue_injection|Postfix vs Dspam]] FIXME
 +
 +===== Http Proxy - Squid =====
 +
 +Аутентификация учетных записей ldap
 +<code>
 +auth_param basic program /usr/lib/squid/ldap_auth -b "ou=Users,dc=site,dc=ru" -v 3 -h localhost
 +auth_param basic children 5
 +auth_param basic realm Proxy Server Authentication
 +auth_param basic credentialsttl 2 hours
 +auth_param basic casesensitive off
 +</code>
 +
 +Поправим график ротации логов прокси сервера /etc/logrotate.d/squid
 +<code>
 +#
 +#       Logrotate fragment for squid.
 +#
 +/var/log/squid/*.log {
 +        monthly
 +        compress
 +        rotate 20
 +        missingok
 +        nocreate
 +        sharedscripts
 +        postrotate
 +                test ! -e /var/run/squid.pid || /usr/sbin/squid -k rotate
 +        endscript
 +}
 +
 +</code>
 +
 +==== stats ====
 +
 +В качестве генератора статистики используем программу [[http://sourceforge.net/projects/free-sa/|free-sa]].
 +
 +Установим в папку /opt/free-sa/
 +
 +Файл конфигурации /opt/free-sa/etc/free-sa.conf
 +<code>
 +#########
 +# FILES #
 +#########
 +log="/var/log/squid/access.log"
 +#usertab="/opt/free-sa/etc/users"
 +downloads="/opt/free-sa/etc/downloads.map"
 +#local_filter=""
 +#global_filter=""
 +
 +
 +###############
 +# DIRECTORIES #
 +###############
 +targetdir="/opt/free-sa/www"
 +tmpdir="/var/cache/free-sa"
 +
 +
 +#####################
 +# REPORTS SELECTION #
 +#####################
 +ts="true"
 +paf="true"
 +saf="true"
 +pdn="true"
 +sdn="true"
 +cct="true"
 +pst="true"
 +dld="true"
 +fullurl="false"
 +users="true"
 +#email=""
 +
 +##################
 +# REPORTS LIMITS #
 +##################
 +#paf_limit="50"
 +#saf_limit="50"
 +#pdn_limit="50"
 +#sdn_limit="50"
 +#cct_limit="50"
 +#pst_limit="50"
 +#dld_limit="50"
 +#lcf_limit="50"
 +#url_limit="50"
 +#ts_limit="0"
 +#dld_min="0"
 +#rtr_timeout="5000"
 +
 +
 +####################
 +# OTHER PARAMETERS #
 +####################
 +#name="free-sa.conf"
 +#logformat="0"
 +#skip_errors="false"
 +#fulltraffic="false"
 +#inameuser="true"
 +#user_unescape="false"
 +#indicators="true"
 +overwrite="2"
 +#resolveip="false"
 +#showinfo="true"
 +#site=""
 +#logo=""
 +#locale="ru.utf8"
 +#rotate=""
 +#divisor="b"
 +</code>
 +
 +Статистику будем обновлять каждый час
 +<code>
 +cat <<EOF > /etc/cron.hourly/free-sa
 +#!/bin/sh
 +
 +DSTART=\`/bin/date +01.%m.%Y\`
 +DSTOP=\`/bin/date +31.%m.%Y\`
 +
 +/opt/free-sa/bin/free-sa -f /opt/free-sa/etc/free-sa.conf -d \${DSTART}-\${DSTOP}
 +EOF
 +chmod +x /etc/cron.hourly/free-sa
 +</code>
  
 ===== OpenVPN ===== ===== OpenVPN =====
  
 +==== Server ====
 <code> <code>
 apt-get update apt-get update
Line 42: Line 165:
 zcat /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz > /etc/openvpn/server.conf zcat /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz > /etc/openvpn/server.conf
 </code> </code>
 +
 +==== Client Certs ====
 +
 +Сгенерируем сертификат для клиента
 +<code>
 +cd /etc/openvpn/easy-rsa
 +. vars
 +./build-key clientname
 +</code>
 +
 +Необходимо заполнить следующие поля - в квадратных скобках значения по умолчанию!
 +<code>
 +Country Name (2 letter code) [RU]:
 +State or Province Name (full name) [MSK]:
 +Locality Name (eg, city) [Moscow]:
 +Organization Name (eg, company) [DriveSource]:
 +Organizational Unit Name (eg, section) []:office
 +Common Name (eg, your name or your server's hostname) [clientname]:
 +Email Address [admin@example.com]:clientname@example.com
 +</code>
 +
 +Можем задать пароль для сертификата, тогда при каждом подключении его необходимо будет вводить ручками.
 +<code>
 +Please enter the following 'extra' attributes
 +to be sent with your certificate request
 +A challenge password []:
 +An optional company name []:
 +</code>
 +
 +Подтверждаем указанную информацию и сертификат готов к использованию!
 +<code>
 +Using configuration from /etc/openvpn/easy-rsa/openssl.cnf
 +Check that the request matches the signature
 +Signature ok
 +The Subject's Distinguished Name is as follows
 +countryName           :PRINTABLE:'RU'
 +stateOrProvinceName   :PRINTABLE:'MSK'
 +localityName          :PRINTABLE:'Moscow'
 +organizationName      :PRINTABLE:'Drive'
 +organizationalUnitName:PRINTABLE:'office'
 +commonName            :PRINTABLE:'clientname'
 +emailAddress          :IA5STRING:'clientname@example.com'
 +Certificate is to be certified until Mar 21 07:22:27 2019 GMT (3650 days)
 +Sign the certificate? [y/n]:y
 +
 +1 out of 1 certificate requests certified, commit? [y/n]y
 +Write out database with 1 new entries
 +Data Base Updated
 +</code>
 +
 +Все сертификаты лежат в папке **/etc/openvpn/easy-rsa/keys** для подключения потребуются следующие файлы
 +  * ca.crt
 +  * clientname.crt
 +  * clientname.key
  
 ===== DNS ===== ===== DNS =====
ubuntuserver810/start.1237716384.txt.gz · Last modified: (external edit)