Added the ipconfig

This commit is contained in:
Marcin Woźniak 2021-08-09 22:27:09 +02:00
parent df112737a3
commit b6cd05b56e
Signed by: y0rune
GPG Key ID: F204C385F57EB348

View File

@ -1,22 +1,19 @@
# CONFIGURATION: # CONFIGURATION:
# Default configuration to DROP
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
# Accept on localhost # Accept on localhost
iptables -A INPUT -i lo -j ACCEPT # iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT # iptables -A OUTPUT -o lo -j ACCEPT
# Accept outgoing network # Accept outgoing network
iptables -A OUTPUT -o eth0 -j ACCEPT iptables -A OUTPUT -o eth0 -j ACCEPT
# Allow established sessions to receive traffic # Enable SSH (to that machine)
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --sport 22 -j ACCEPT
iptables -A INPUT -m state --state NEW,ESTABLISHED -j ACCEPT iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 22 -j ACCEPT
# Enable SSH (to internet)
#iptables -A OUTPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
#iptables -A OUTPUT -p tcp -m state --state NEW -m tcp --dport 10571 -j ACCEPT
# Disable SSH (to that machine)
iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --sport 22 -j DROP
iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 22 -j DROP
# Enable INZ # Enable INZ
#iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 1285 -j ACCEPT #iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 1285 -j ACCEPT
@ -26,8 +23,12 @@ iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 2
#Enable CSGO #Enable CSGO
iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 27015 -j ACCEPT iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 27015 -j ACCEPT
iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 27020 -j ACCEPT iptables -A INPUT -p tcp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 27020 -j ACCEPT
iptables -A INPUT -p udp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 27015 -j ACCEPT #iptables -A INPUT -p udp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 27015 -j ACCEPT
iptables -A INPUT -p udp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 27020 -j ACCEPT #iptables -A INPUT -p udp -m state --state NEW -m tcp -s 192.168.0.0/24 --dport 27020 -j ACCEPT
# Allow established sessions to receive traffic
iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
# iptables -A INPUT -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -i eth0 -m state --state NEW,INVALID -j DROP iptables -A INPUT -i eth0 -m state --state NEW,INVALID -j DROP
iptables -A FORWARD -i eth0 -m state --state NEW,INVALID -j DROP iptables -A FORWARD -i eth0 -m state --state NEW,INVALID -j DROP