This repository has been archived on 2020-06-04. You can view files and clone it, but cannot push or open issues or pull requests.
ansible-common/files/iptables-rules/rules.v4

29 lines
845 B
Plaintext

*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [10:1692]
-A INPUT -m conntrack --ctstate INVALID -j DROP
-A INPUT -i lo -j ACCEPT
-A INPUT -i ens10 -j ACCEPT
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m state --state NEW -j DROP
-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j DROP
-A INPUT -p icmp -m icmp --icmp-type 8 -m conntrack --ctstate NEW -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
COMMIT
*nat
:PREROUTING ACCEPT [2:162]
:INPUT ACCEPT [1:110]
:OUTPUT ACCEPT [1:110]
:POSTROUTING ACCEPT [1:110]
COMMIT
*mangle
:PREROUTING ACCEPT [8:1024]
:INPUT ACCEPT [8:1024]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [11:1802]
:POSTROUTING ACCEPT [11:1802]
-A OUTPUT -j TOS --set-tos 0x10/0xff
-A OUTPUT -j DSCP --set-dscp 0x22
COMMIT