This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frontend ssl | |
mode tcp | |
bind 0.0.0.0:443 name frontend-ssl | |
option tcplog | |
log global | |
tcp-request inspect-delay 3s | |
tcp-request content accept if { req.ssl_hello_type 1 } | |
use_backend main-ssl if { req.ssl_hello_type 1 } | |
use_backend ssh if !{ req.ssl_hello_type 1 } { payload(0,7) -m bin 5353482d322e30 } | |
use_backend openvpn if !{ req.ssl_hello_type 1 } !{ req.len 0 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#########SERVER TCP | |
port 1194 | |
proto tcp6 | |
dev tun | |
ca ca.crt | |
cert ${path_to_crt} | |
key ${path_to_key} | |
dh dh.pem | |
server 10.6.0.0 255.255.255.0 | |
ifconfig-pool-persist ipp-tcp.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine on | |
RewriteRule ^/.well-known/.* - [L,NC] | |
RewriteCond %{HTTPS} !=on | |
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=permanent,L] | |
#certbot certonly --webroot -w /var/www/html -d domain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Directory /var/www/html/secure> | |
AuthBasicProvider ldap | |
AuthLDAPURL "ldap://server1 server2/dc=example,dc=com?sAMAccountName?sub" NONE | |
#AuthLDAPInitialBindAsUser On | |
#AuthLDAPInitialBindPattern (.+) $1@example.com | |
AuthLDAPBindDN user@example.com | |
AuthLdapBindPassword password | |
AuthLDAPGroupAttribute member | |
AuthLDAPGroupAttributeIsDN on | |
AuthType Basic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#USER FOR DATAPUMP | |
create pumpuser identified by password; | |
grant EXP_FULL_DATABASE to pumpuser; | |
grant DATAPUMP_EXP_FULL_DATABASE to pumpuser; | |
grant DATAPUMP_IMP_FULL_DATABASE to pumpuser; | |
alter user pumpuser quota unlimited on system; | |
create directory DPDIR as 'dirpath'; | |
grant all on directory DPDIR to pumpuser; | |
#EXPDP | |
expdp pumpuser/password FULL=y DIRECTORY=DPDIR COMPRESSION=ALL FLASHBACK_TIME=systimestamp DUMPFILE="filename-$(date -I).dmp" LOGFILE="filename-$(date -I).dmp.log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--from https://www.databasejournal.com/features/oracle/monitoring-tablespace-usage-in-oracle.html | |
set linesize 132 tab off trimspool on | |
set pagesize 105 | |
set pause off | |
set echo off | |
set feedb on | |
column "TOTAL ALLOC (MB)" format 9,999,990.00 | |
column "TOTAL PHYS ALLOC (MB)" format 9,999,990.00 | |
column "USED (MB)" format 9,999,990.00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION jsoninsert(relname text, reljson json) | |
RETURNS record AS | |
$BODY$DECLARE | |
ret RECORD; | |
inputstring text; | |
BEGIN | |
SELECT string_agg(quote_ident(key),',') INTO inputstring | |
FROM json_object_keys(reljson) AS X (key); | |
EXECUTE 'INSERT INTO '|| quote_ident(relname) | |
|| '(' || inputstring || ') SELECT ' || inputstring |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
Q="select now() - pg_last_xact_replay_timestamp() < interval '10 seconds',extract (epoch from now() - pg_last_xact_replay_timestamp()) ;" | |
RES=($(echo ${Q} | /usr/bin/psql -tA -Upostgres | tr '|' " ")) | |
STATUS=2 | |
if [ ${RES[0]} == 't' ];then | |
STATUS=0 | |
STATUSTEXT="OK" | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/etc/systemd/system/[yourService].service.d/[any_name].conf | |
[Unit] | |
Wants=sys-devices-virtual-net-tun0.device | |
After=sys-devices-virtual-net-tun0.device |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## for openvpn | |
lxc.mount.entry = /dev/net dev/net none bind,create=dir | |
lxc.cgroup.devices.allow = c 10:200 rwm |
NewerOlder