grimoire

personal wiki
git clone git://git.pyratebeard.net/grimoire.git
Log | Files | Refs

commit afd4650f630d391480a221ef1f633b1c4cada232
parent f515f8dd9f3fc90462b6306270b0ab7edd3a39c7
Author: pyratebeard <root@pyratebeard.net>
Date:   Tue, 27 Nov 2018 17:19:34 +0000

firewall-cmd and iptables pages with links

Diffstat:
MHome.md | 1+
Atechnology/networking/firewall-cmd.md | 10++++++++++
Atechnology/networking/firewalls.md | 1+
Atechnology/networking/iptables.md | 19+++++++++++++++++++
4 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/Home.md b/Home.md @@ -71,6 +71,7 @@ - [tcpdump](technology/monitoring/tcpdump) ### networking +- [firewalls](technology/networking/firewalls) - [subnet_cheatsheet](technology/networking/subnet_cheatsheet) - [wifi_connect](technology/networking/wifi_connect) diff --git a/technology/networking/firewall-cmd.md b/technology/networking/firewall-cmd.md @@ -0,0 +1,10 @@ +# firewall-cmd + +## add / remove port +``` +firewall-cmd --permanent --add-port=<port_num>/<protocol> +firewall-cmd --permanent --remove-port=<port_num>/<protocol> + +firewall-cmd --permanent --add-port=22/tcp +firewall-cmd --permanent --remove-port=22/tcp +``` diff --git a/technology/networking/firewalls.md b/technology/networking/firewalls.md @@ -0,0 +1 @@ +# firewalls diff --git a/technology/networking/iptables.md b/technology/networking/iptables.md @@ -0,0 +1,19 @@ +# iptables + +``` +iptables -L +``` + +``` +iptables -S +``` + +## import / export +see [guide][] + +``` +iptables-save > filename +iptables-restore < filename +``` + +[guide]: https://www.digitalocean.com/community/tutorials/how-to-migrate-iptables-firewall-rules-to-a-new-server