better readme

This commit is contained in:
2026-09-22 04:37:10 +03:00
parent ba82ddc165
commit 0be1602bd5
7 changed files with 398 additions and 98 deletions
+29
View File
@@ -0,0 +1,29 @@
# Firewall
### Show rules
```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
```
+57
View File
@@ -0,0 +1,57 @@
## Networking
### Set IP Address on interface `em0`
`vim /etc/hostname.em0`
Dynamic
```
dhcp
```
Static
```sh
media 100baseTX
mediaopt full-duplex
inet 192.168.2.1 0xffffff00
```
### Routing
Show table
```sh
route show
netstat -r
netstat -r -n
netstat -r -f inet -n
```
Set default Gateway
`vi /etc/mygate`
```sh
192.168.1.1
```
### Set hostname
`vi /etc/myname`
```sh
echo 'OpenBSD' > /etc/myname
hostname OpenBSD
```
### Set DNS
`vi /etc/resolv.conf`
```sh
nameserver 9.9.9.9
nameserver 1.1.1.1
```
+14
View File
@@ -0,0 +1,14 @@
#!/bin/ksh
daemon="/usr/local/bin/node"
daemon_user="_stevault"
daemon_execdir="/usr/obj/stevault/backend"
daemon_flags="/usr/obj/stevault/backend/dist/index.js"
daemon_logger="daemon.info"
. /etc/rc.d/rc.subr
rc_reload=NO
rc_bg=YES
rc_cmd $1