From 7665ac03840cbeed511a5821d80995d4fd63907c Mon Sep 17 00:00:00 2001 From: TheK4n Date: Sun, 17 Oct 2021 01:26:15 +0300 Subject: [PATCH] ref: README.md add: hosts.allow, hosts.deny --- README.md | 44 +++----------------------------------------- etc/hosts.allow | 1 + etc/hosts.deny | 1 + 3 files changed, 5 insertions(+), 41 deletions(-) create mode 100644 etc/hosts.allow create mode 100644 etc/hosts.deny diff --git a/README.md b/README.md index d1bc0bc..4e050db 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,8 @@ Bash config files ## Installation ```bash -rm -rf BashConfig -git clone https://github.com/thek4n/BashConfig && -chmod u+x BashConfig/setup.sh && +git clone https://github.com/thek4n/BashConfig +chmod u+x BashConfig/setup.sh BashConfig/setup.sh rm -rf BashConfig ``` @@ -48,50 +47,13 @@ Create ssh key on local device 3. Enter passphrase 4. Copy content of `~/.ssh/id_rsa.pub` key to remote `~/.ssh/authorized_keys` -\ -Add aliases for ssh to `~/.ssh/config`: -``` -Host host_name - HostName ip - Port 22 - User root - IdentityFile ~/.ssh/id_rsa - ``` - -\ -Using aliases: -```bash -ssh host_name -sftp host_name -``` - - -### White and black lists - -add white list to ```/etc/hosts.allow```: -```text -sshd: 10.83.33.77/32, 10.63.152.9/32, 10.12.100.11/28, 10.82.192.0/28 -``` - -add black list to ```/etc/hosts.deny```: -```text -sshd: ALL -``` ## Tips -### Bash -| Command | Description | -|:------------------: | :------------------ | -|```Alt + . ``` ```Esc + .``` | Last object | -|```Ctrl + r``` | Search by bash_history | -|```Ctrl + l``` | Clear, like command clear | - ```$RANDOM``` - Return random 0-32767\ -```/command``` - Without using alias\ -```df -h /``` - Size +```\command``` - Without using alias ### Vim diff --git a/etc/hosts.allow b/etc/hosts.allow new file mode 100644 index 0000000..0f4a731 --- /dev/null +++ b/etc/hosts.allow @@ -0,0 +1 @@ +sshd: 10.83.33.77/32, 10.63.152.9/32, 10.12.100.11/28, 10.82.192.0/28 \ No newline at end of file diff --git a/etc/hosts.deny b/etc/hosts.deny new file mode 100644 index 0000000..73528af --- /dev/null +++ b/etc/hosts.deny @@ -0,0 +1 @@ +sshd: ALL \ No newline at end of file