Merge branch 'main' of github.com:m-ghaoui/stuff
This commit is contained in:
commit
8c08d9c970
1 changed files with 20 additions and 12 deletions
|
|
@ -21,15 +21,30 @@ pkg update
|
|||
Install my favorite packages
|
||||
|
||||
```sh
|
||||
pkg install -y bash sudo tmux htop neovim git ncdu bastille tailscale aria2
|
||||
pkg install -y bash doas tmux htop neovim git ncdu tailscale aria2
|
||||
```
|
||||
|
||||
Add "wheel" to the suoers file. You need to run `visudo` and uncomment the line that starts with `%wheel`:
|
||||
For doas you need to copy the config file:
|
||||
|
||||
```sh
|
||||
visudo
|
||||
cp /usr/local/etc/doas.conf.sample /usr/local/etc/doas.conf
|
||||
nvim /usr/local/etc/doas.conf
|
||||
```
|
||||
|
||||
Remove all the stuff about alice, bob, cindy and david. Keep the wheel. Use this vim command:
|
||||
|
||||
```
|
||||
g/\<bob\>\|\<alice\>\|\<cindy\>\|\<david\>/d
|
||||
```
|
||||
|
||||
To switch to root you can do:
|
||||
|
||||
```sh
|
||||
doas -s
|
||||
```
|
||||
|
||||
... which means switch to a shell the default is root's.
|
||||
|
||||
Change shell
|
||||
|
||||
```sh
|
||||
|
|
@ -66,22 +81,15 @@ KbdInteractiveAuthentication no
|
|||
#UsePAM yes
|
||||
```
|
||||
|
||||
Test the setting
|
||||
Test the setting and reload
|
||||
|
||||
```sh
|
||||
sshd -t
|
||||
```
|
||||
|
||||
Reload:
|
||||
|
||||
```sh
|
||||
service sshd reload
|
||||
```
|
||||
|
||||
# PF
|
||||
|
||||
Note, if you're using Bastille, the `/etc/pf.conf` file is going to look different. See [Bastille](../FreeBSD/Bastille/Bastille.md).
|
||||
|
||||
Now we need to get the filewall going.
|
||||
|
||||
```sh
|
||||
|
|
@ -105,7 +113,7 @@ pass out all keep state
|
|||
```
|
||||
|
||||
```sh
|
||||
sysrc pf_enable=yes
|
||||
service pf enable
|
||||
service pf start
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue