Prestashop
This commit is contained in:
37
prestashop.md
Normal file
37
prestashop.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# Prestashop
|
||||
|
||||
### Zip
|
||||
|
||||
```
|
||||
apt install --no-install-recommends php-zip
|
||||
phpenmod zip
|
||||
```
|
||||
|
||||
### XML
|
||||
|
||||
```
|
||||
apt install --no-install-recommends php-xml
|
||||
phpenmod xml
|
||||
```
|
||||
|
||||
### cURL
|
||||
|
||||
```
|
||||
apt install --no-install-recommends php-curl
|
||||
phpenmod curl
|
||||
```
|
||||
|
||||
### GD
|
||||
|
||||
```
|
||||
apt install --no-install-recommends php-gd
|
||||
phpenmod gd
|
||||
```
|
||||
|
||||
### Extensions requises
|
||||
|
||||
Intl Mbstring
|
||||
|
||||
```
|
||||
apt install --no-install-recommends php-bcmath php-curl php-gd php-intl php-mbstring php-xml php-zip php-memcached
|
||||
```
|
||||
22
rsync.md
Normal file
22
rsync.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# RSync
|
||||
|
||||
```shell
|
||||
rsync -aHhP --numeric-ids --delete /home/neotech/phpmyadmin/ root@192.168.137.44:/home/neotech/phpmyadmin
|
||||
```
|
||||
|
||||
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
|
||||
-r, --recursive recurse into directories
|
||||
-l, --links copy symlinks as symlinks
|
||||
-p, --perms preserve permissions
|
||||
-t, --times preserve modification times
|
||||
-g, --group preserve group
|
||||
-o, --owner preserve owner (super-user only)
|
||||
|
||||
-H, --hard-links preserve hard links
|
||||
-h, --human-readable output numbers in a human-readable format
|
||||
-P same as --partial --progress
|
||||
--partial keep partially transferred files
|
||||
--progress show progress during transfer
|
||||
|
||||
|
||||
--delete delete extraneous files from dest dirs
|
||||
90
security/reaction.md
Normal file
90
security/reaction.md
Normal file
@@ -0,0 +1,90 @@
|
||||
# Reaction
|
||||
|
||||
Reaction est un service qui scan les sorties des fichiers et effectue des actions dand un usage est détecté.
|
||||
|
||||
|
||||
```shell
|
||||
apt install ./reaction_2.2.1-1_amd64.deb
|
||||
systemctl enable --now reaction@reaction.jsonnet
|
||||
```
|
||||
|
||||
```shell
|
||||
reaction show
|
||||
```
|
||||
|
||||
```
|
||||
local banFor(time) = {
|
||||
ban: {
|
||||
cmd: ['nft', 'add', 'element', 'inet', 'reaction', 'banned_ips', '{ <ip> }'],
|
||||
},
|
||||
unban: {
|
||||
cmd: ['nft', 'delete', 'element', 'inet', 'reaction', 'banned_ips', '{ <ip> }'],
|
||||
after: time,
|
||||
},
|
||||
};
|
||||
|
||||
{
|
||||
patterns: {
|
||||
ip: {
|
||||
type: 'ipv4',
|
||||
},
|
||||
},
|
||||
|
||||
start: [
|
||||
// Table
|
||||
['nft', 'add', 'table', 'inet', 'reaction'],
|
||||
|
||||
// Set pour IP bannies
|
||||
[
|
||||
'nft', 'add', 'set', 'inet', 'reaction', 'banned_ips',
|
||||
'{', 'type', 'ipv4_addr', ';', 'flags', 'interval', ';', '}'
|
||||
],
|
||||
|
||||
// Chaîne INPUT
|
||||
[
|
||||
'nft', 'add', 'chain', 'inet', 'reaction', 'input_filter',
|
||||
'{', 'type', 'filter', 'hook', 'input', 'priority', '0', ';', '}'
|
||||
],
|
||||
|
||||
// Chaîne FORWARD
|
||||
[
|
||||
'nft', 'add', 'chain', 'inet', 'reaction', 'forward_filter',
|
||||
'{', 'type', 'filter', 'hook', 'forward', 'priority', '0', ';', '}'
|
||||
],
|
||||
|
||||
// Règles d'utilisation du set
|
||||
[
|
||||
'nft', 'add', 'rule', 'inet', 'reaction', 'input_filter',
|
||||
'ip', 'saddr', '@banned_ips', 'drop'
|
||||
],
|
||||
[
|
||||
'nft', 'add', 'rule', 'inet', 'reaction', 'forward_filter',
|
||||
'ip', 'saddr', '@banned_ips', 'drop'
|
||||
],
|
||||
],
|
||||
|
||||
stop: [
|
||||
// Une seule commande supprime tout proprement
|
||||
['nft', 'delete', 'table', 'inet', 'reaction'],
|
||||
],
|
||||
|
||||
streams: {
|
||||
ssh: {
|
||||
cmd: ['journalctl', '-fu', 'ssh.service'],
|
||||
filters: {
|
||||
failedlogin: {
|
||||
regex: [
|
||||
@'authentication failure;.*rhost=<ip>',
|
||||
@'Failed password for .* from <ip>',
|
||||
@'banner exchange: Connection from <ip> port [0-9]*: invalid format',
|
||||
@'Invalid user .* from <ip>',
|
||||
],
|
||||
retry: 3,
|
||||
retryperiod: '6h',
|
||||
actions: banFor('96h'),
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user