Skip to content

Instantly share code, notes, and snippets.

View demofly's full-sized avatar

Stanislav O. demofly

View GitHub Profile
@demofly
demofly / ossec-install.sh
Created December 26, 2014 02:16
OSSEC Debian wheezy setup
wget -O - http://ossec.alienvault.com/repos/apt/conf/ossec-key.gpg.key | apt-key add -
echo "deb http://ossec.alienvault.com/repos/apt/debian wheezy main" > /etc/apt/sources.list.d/ossec.list
apt-get update
apt-get install ossec-hids-agent ossec-hids
@demofly
demofly / Manual.txt
Last active August 29, 2015 14:13
Как настроить автоустановку Windows 7 драйверов по клику на сетевой принтер для HP LJ CP1215 на Qnap TS559 (samba+cups)
Для нормальной работы на моем Qnap нужно временно поставить сторонний софт
ipkg install samba34
ipkg install cups
После достижения конечной цели - следует снести!
1. Берем ноут с виндой и воткнутым настроенным расшаренным принтером.
Заходим в свойства и в разделе "Доступ" -> "Дополнительные драйверы", проставляем галочки на x86 и x64. Кормим диск с дровами.
@demofly
demofly / install-centos-psql91.sh
Created January 27, 2015 18:52
CentOS 6 PostgreSQL-9.1 server installation cheatsheet
yum localinstall http://yum.postgresql.org/9.1/redhat/rhel-6-x86_64/pgdg-centos91-9.1-4.noarch.rpm
yum install postgresql91 postgresql91-server
service postgresql-9.1 initdb
chkconfig postgresql-9.1 on
service postgresql-9.1 start
su - postgres
/usr/pgsql-9.1/bin/psql
mcedit /var/lib/pgsql/9.1/data/pg_hba.conf
@demofly
demofly / create-ct.sh
Last active August 29, 2015 14:15
PVESH свиной скрипт
#!/bin/bash
set -e # fail on any error
template="Debian-wheezy_7.6_amd64.tar.gz"
hostname="fox.dts.com"; id="102"; ip="155.75.11.23"; swap="0"; disk="20"; cpus="4"; mem="2048"
pvesh create /nodes/oss-hn01/openvz -vmid $id \
-hostname $hostname \
-storage local -ostemplate local:vztmpl/$template \
-memory $mem \
-swap $swap \
https://doc-0s-1k-docs.googleusercontent.com/docs/securesc/jgt1n40rh1a5v0jkb1ak9ljihv97glhm/3jhj5omch3bgmnlab0952tptudbq874m/1424556000000/08786061292528027406/06273899509421333520/0B-EthI79WXHNZnh3cDBRd1IwUmM?e=download&h=09874388012917686259&nonce=dauiqj7p4vefs&user=06273899509421333520&hash=g6p8ha7fpg8kttn9cj10r3rdhecepb9k
Site-to-Site OpenVPN routing
1. Server
89…. White public
192.168.1.1(/24)
[psychov@home openvpn]$ cat openvpn.conf
dev tun
ifconfig 10.1.0.1 10.1.0.2
script-security 2
#!/bin/bash
#(c) 2015 hackru
AGENT="AudioAddict-di/1.4.7 iOS/8.1"
COOKIES="./cookies.txt"
AUTH="ephemeron:dayeiph0ne@pp"
DOMAIN=discard.email
function rndsleep()
{
sleep .$[ ( $RANDOM % 4 ) + 1 ]s
@demofly
demofly / imp01-SAS-glusterfs.vol
Created March 25, 2015 06:52
imp01 /etc/glusterfs/SAS-glusterfs.vol
### Add client feature and attach to remote subvolume
volume mp-sas1-imp01
type protocol/client
option transport-type tcp
option remote-host 213.133.111.249
option remote-port 49994
option remote-subvolume mp-sas1
option username MP
option password sPOUwe74w38sdkl
end-volume
@demofly
demofly / imp01-glusterfsd.vol
Created March 25, 2015 06:53
imp01 /etc/glusterfs/glusterfsd.vol
### Export volume
volume mp-sas
type storage/posix
option directory /mnt/glusterfsd/SAS-DFS
end-volume
volume mp-sata
type storage/posix
option directory /mnt/glusterfsd/SATA-DFS
end-volume
@demofly
demofly / imp02-SAS-glusterfs.vol
Created March 25, 2015 06:55
imp02 /etc/glusterfs/SAS-glusterfs.vol
### Add client feature and attach to remote subvolume
volume mp-sas1-imp01
type protocol/client
option transport-type tcp
option remote-host 213.133.111.249
option remote-port 49994
option remote-subvolume mp-sas1
option username MP
option password sPOUwe74w38sdkl
end-volume