All - Linux - Iptables at Master K00lith - All GitHub
All - Linux - Iptables at Master K00lith - All GitHub
master
all / linux / iptables /
k00lith
Update readme.md … on Dec 12, 2021
History
. .
readme.md
DISABLE firewalld:
INSTALL iptables:
cd /root/
vi /root/iptables-rules
ACTIVATE:
Check:
iptables -n -L -v --line-numbers
RULES:
Attention!
do not forget to change the name of the interface in the rules below to the real interface in the
system. In this line:
Rules:
*filter
:undef_fw - [0:0]
:undef_in - [0:0]
:undef_out - [0:0]
-A INPUT -p tcp -m state --state NEW --tcp-flags SYN,ACK SYN,ACK -j REJECT --reject-with tcp-re
-A INPUT -p tcp ! --syn -m state --state NEW -j DROP
#MORE-RULES
-A INPUT -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m state --state NEW -j DROP
-A INPUT -i lo -j ACCEPT
#SSH
#HTTPD
#SYSLOG
#NTP
-A INPUT -j undef_in
#OUTPUT
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m state --state NEW -j DROP
-A OUTPUT -j undef_out
# LAST RULES
-A undef_fw -j DROP
-A undef_in -j DROP
-A undef_out -j DROP
COMMIT