Update README.md
This commit is contained in:
parent
e6f793e447
commit
10e8038756
29
README.md
29
README.md
@ -70,7 +70,30 @@ nameserver 1.1.1.1
|
|||||||
|
|
||||||
# Firewall
|
# Firewall
|
||||||
|
|
||||||
```ssh
|
Control
|
||||||
|
|
||||||
|
```sh
|
||||||
|
pfctl -sr # view rules
|
||||||
|
pfctl -ss # view state
|
||||||
|
pfctl -si # view stats
|
||||||
|
pfctl -sa # view all
|
||||||
|
```
|
||||||
|
|
||||||
|
Write Rules
|
||||||
|
|
||||||
|
:floppy_disk: `/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
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -94,6 +117,10 @@ rcctl status httpd
|
|||||||
|
|
||||||
# Check
|
# Check
|
||||||
fstat | grep ':80'
|
fstat | grep ':80'
|
||||||
|
httpd -n
|
||||||
|
|
||||||
|
# Test
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
PHP
|
PHP
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user