better readme
This commit is contained in:
@@ -1,116 +1,28 @@
|
||||
# OpenBSD-Notes
|
||||
|
||||
Time saver scripts installing and configuring basic stuff on secure OpenBSD installations
|
||||
|
||||
## Enviroment
|
||||
- Better prompt: Colors, Git, Exit Code,
|
||||
- Color ls
|
||||
- prompt : color prompt, git branch, latest exit Code
|
||||
- navigation: color ls
|
||||
- working : color grep, git aliases (ga, gs, gd, gc, gp)
|
||||
|
||||
## Packages
|
||||
- vim
|
||||
- git
|
||||
- iftop, tcodump
|
||||
|
||||
- vim (no plugins, monokai theme, extra keymaps, intro screen for keymaps)
|
||||
- git, ggrep
|
||||
- iftop, tcpdump
|
||||
|
||||
## Vim
|
||||
- Keymaps
|
||||
- Theme
|
||||
|
||||
|
||||
## Networking
|
||||
- netstat-tulp.ksh (from linux)
|
||||
|
||||
|
||||
|
||||
set -o vi
|
||||
|
||||
## Networking
|
||||
|
||||
Dynamic IP Address
|
||||
|
||||
`vi /etc/hostname.em0`
|
||||
|
||||
```sh
|
||||
dhcp
|
||||
```
|
||||
|
||||
Static IP Address
|
||||
|
||||
`vi /etc/hostname.stge0`
|
||||
|
||||
```sh
|
||||
media 100baseTX
|
||||
mediaopt full-duplex
|
||||
inet 192.168.2.1 0xffffff00
|
||||
```
|
||||
Routing
|
||||
|
||||
```sh
|
||||
route show
|
||||
netstat -r
|
||||
netstat -r -n
|
||||
netstat -r -f inet -n
|
||||
```
|
||||
|
||||
Default Gateway
|
||||
|
||||
`vi /etc/mygate`
|
||||
|
||||
```sh
|
||||
192.168.1.1
|
||||
```
|
||||
|
||||
Hostname
|
||||
|
||||
`vi /etc/myname`
|
||||
|
||||
```sh
|
||||
echo 'OpenBSD' > /etc/myname
|
||||
hostname OpenBSD
|
||||
```
|
||||
|
||||
Reload
|
||||
```sh
|
||||
|
||||
```
|
||||
|
||||
DNS
|
||||
|
||||
`vi /etc/resolv.conf`
|
||||
|
||||
```sh
|
||||
nameserver 9.9.9.9
|
||||
nameserver 1.1.1.1
|
||||
```
|
||||
|
||||
# Firewall
|
||||
|
||||
Control
|
||||
|
||||
```sh
|
||||
pfctl -sr # view rules
|
||||
pfctl -ss # view state
|
||||
pfctl -si # view stats
|
||||
pfctl -sa # view all
|
||||
```
|
||||
|
||||
Write Rules
|
||||
|
||||
`/etc/pf.conf`
|
||||
|
||||
```sh
|
||||
lan = stge0
|
||||
block out tcp from $lan to any port {80,443}
|
||||
```
|
||||
|
||||
Apply rules
|
||||
|
||||
```sh
|
||||
pfctl -d
|
||||
pfctl -f /etc/pf.conf
|
||||
pfctl -e
|
||||
```
|
||||
|
||||
|
||||
# Gitea
|
||||
|
||||
|
||||
|
||||
# WEB SERVER
|
||||
|
||||
|
||||
Reference in New Issue
Block a user