Add new data
This commit is contained in:
14
docs/linux/cmp-iptables.service
Normal file
14
docs/linux/cmp-iptables.service
Normal file
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=Apply iptables rules
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
# EnvironmentFile=/etc/default/firewall
|
||||
ExecStart=/root/bin/cmp-iptables-start.sh
|
||||
RemainAfterExit=true
|
||||
ExecStop=/root/bin/cmp-iptables-stop.sh
|
||||
StandardOutput=journal
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@@ -8,7 +8,7 @@
|
||||
# Common
|
||||
|
||||
## find
|
||||
```
|
||||
```bash
|
||||
find /var -maxdepth 2 -type d -printf "%TY-%Tm-%Td %TH:%TM:%TS %Tz %p\n"
|
||||
```
|
||||
|
||||
@@ -20,9 +20,15 @@ export EDITOR=mcedit
|
||||
export HISTFILESIZE=10485760
|
||||
export HISTSIZE=500000
|
||||
export HISTCONTROL=ignoreboth:erasedups
|
||||
export HISTIGNORE="history:reboot:poweroff:cd:ls:pwd:mc:ps:m:e:l"
|
||||
export HISTIGNORE="history:reboot:poweroff:cd:ls:pwd:mc:ps:m:e:l:z:zz:zzz"
|
||||
export SSH_ASKPASS=
|
||||
|
||||
# PS1 Green
|
||||
# PS1='[\[\e[32m\]\u@\h\[\e[0m\] \[\e[32m\]\W\[\e[0;31m\]\[\e[0m\]]\$ '
|
||||
|
||||
# PS1 Default
|
||||
# PS1='[\u@\h \W]\$ '
|
||||
|
||||
alias ffi='ffmpeg -hide_banner -i'
|
||||
|
||||
alias m='cd /mnt'
|
||||
@@ -30,7 +36,6 @@ alias e='cd /etc'
|
||||
alias l='cd /var/log'
|
||||
|
||||
tabs -4
|
||||
|
||||
```
|
||||
|
||||
## reboot
|
||||
@@ -44,11 +49,6 @@ echo b > /proc/sysrq-trigger
|
||||
cat /sys/devices/virtual/dmi/id/board_name
|
||||
```
|
||||
|
||||
## grab video from screen
|
||||
```bash
|
||||
ffmpeg -s 1920x1080 -framerate 10 -f x11grab -i :0 -qscale 6 out.mkv
|
||||
```
|
||||
|
||||
```bash
|
||||
ps --ppid 2 -p 2 --deselect
|
||||
```
|
||||
|
@@ -1,3 +1,4 @@
|
||||
|
||||
# Fedora / CentOS / Etc
|
||||
|
||||
## Relabel
|
||||
@@ -6,7 +7,7 @@ touch /.autorelabel
|
||||
```
|
||||
|
||||
## Install PHP 8
|
||||
```
|
||||
```bash
|
||||
dnf install https://rpms.remirepo.net/fedora/remi-release-38.rpm
|
||||
dnf module reset php
|
||||
dnf module install php:remi-8.2
|
||||
|
17
docs/linux/network.md
Normal file
17
docs/linux/network.md
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
# Network
|
||||
|
||||
## ipset
|
||||
```bash
|
||||
# Create ip-list with timeout
|
||||
ipset create ipl-name hash:ip timeout 3600
|
||||
```
|
||||
|
||||
## iptables
|
||||
```bash
|
||||
# Show current rules
|
||||
iptables -L -vn
|
||||
|
||||
# Fix TTL for mobile network
|
||||
iptables -t mangle -A POSTROUTING -j TTL --ttl-set 65
|
||||
```
|
@@ -1,3 +1,8 @@
|
||||
|
||||
# RSysLog
|
||||
|
||||
## Config
|
||||
|
||||
```
|
||||
$ModLoad imudp
|
||||
$UDPServerRun 514
|
||||
|
@@ -1,5 +1,7 @@
|
||||
|
||||
# Nginx
|
||||
# SELinux
|
||||
|
||||
## Nginx
|
||||
```
|
||||
# Allow open local port
|
||||
semanage port -a -t http_port_t -p tcp 28081
|
||||
|
Reference in New Issue
Block a user