simple-iptables-firwall
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| simple-iptables-firwall [2017/09/23 12:56] – baumi | simple-iptables-firwall [2017/10/21 18:33] (current) – baumi | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Simple iptables Firewall ====== | ====== Simple iptables Firewall ====== | ||
| - | < | + | <code bash> |
| #!/bin/bash | #!/bin/bash | ||
| Line 19: | Line 19: | ||
| # Allow related traffic | # Allow related traffic | ||
| - | iptables -A INPUT -m state --state ESTABLISHED, | + | iptables -A INPUT -m conntrack --state ESTABLISHED -j ACCEPT |
| + | iptables -A OUTPUT -m conntrack | ||
| + | |||
| + | # Allow icmp traffic | ||
| + | iptables -A INPUT -p icmp -j ACCEPT | ||
| + | iptables -A OUTPUT -p icmp -j ACCEPT | ||
| # Allow outgoing traffic | # Allow outgoing traffic | ||
simple-iptables-firwall.1506164184.txt.gz · Last modified: by baumi
