afd4650f630d391480a221ef1f633b1c4cada232
Home.md
| ... | ... | @@ -71,6 +71,7 @@ |
| 71 | 71 | - [tcpdump](technology/monitoring/tcpdump) |
| 72 | 72 | |
| 73 | 73 | ### networking |
| 74 | +- [firewalls](technology/networking/firewalls) |
|
| 74 | 75 | - [subnet_cheatsheet](technology/networking/subnet_cheatsheet) |
| 75 | 76 | - [wifi_connect](technology/networking/wifi_connect) |
| 76 | 77 |
technology/networking/firewall-cmd.md
| ... | ... | @@ -0,0 +1,10 @@ |
| 1 | +# firewall-cmd |
|
| 2 | + |
|
| 3 | +## add / remove port |
|
| 4 | +``` |
|
| 5 | +firewall-cmd --permanent --add-port=<port_num>/<protocol> |
|
| 6 | +firewall-cmd --permanent --remove-port=<port_num>/<protocol> |
|
| 7 | + |
|
| 8 | +firewall-cmd --permanent --add-port=22/tcp |
|
| 9 | +firewall-cmd --permanent --remove-port=22/tcp |
|
| 10 | +``` |
technology/networking/firewalls.md
| ... | ... | @@ -0,0 +1 @@ |
| 1 | +# firewalls |
technology/networking/iptables.md
| ... | ... | @@ -0,0 +1,19 @@ |
| 1 | +# iptables |
|
| 2 | + |
|
| 3 | +``` |
|
| 4 | +iptables -L |
|
| 5 | +``` |
|
| 6 | + |
|
| 7 | +``` |
|
| 8 | +iptables -S |
|
| 9 | +``` |
|
| 10 | + |
|
| 11 | +## import / export |
|
| 12 | +see [guide][] |
|
| 13 | + |
|
| 14 | +``` |
|
| 15 | +iptables-save > filename |
|
| 16 | +iptables-restore < filename |
|
| 17 | +``` |
|
| 18 | + |
|
| 19 | +[guide]: https://www.digitalocean.com/community/tutorials/how-to-migrate-iptables-firewall-rules-to-a-new-server |