Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
2.4 kB
0
Indexable
Never
#a
iptables -A FORWARD -j DROP
iptables -A INPUT -j DROP
iptables -A OUTPUT -j DROP
#------------------------

#b
iptables -A INPUT -p icmp --icmp-type 8 -j ACCEPT
iptables -A INPUT -p icmp --icmp-type 0 -j ACCEPT
iptables -A OUTPUT -p icmp --icmp-type 0 -j ACCEPT

iptables -A OUTPUT -p icmp --icmp-type 8 -j ACCEPT

iptables -A FORWARD -p icmp --icmp-type 8 -j ACCEPT

iptables -A FORWARD -p icmp --icmp-type 0 -j ACCEPT

iptables -A INPUT -p icmp --icmp-type 11 -j ACCEPT
iptables -A OUTPUT -p icmp --icmp-type 11 -j ACCEPT

iptables -A FORWARD -p icmp --icmp-type 11 -j ACCEPT

iptables -A INPUT -p icmp --icmp-type 5 -j ACCEPT
iptables -A OUTPUT -p icmp --icmp-type 5 -j ACCEPT

iptables -A FORWARD -p icmp --icmp-type 5 -j ACCEPT

iptables -A INPUT -p icmp --icmp-type 3 -j ACCEPT
iptables -A OUTPUT -p icmp --icmp-type 3 -j ACCEPT

iptables -A FORWARD -p icmp --icmp-type 3 -j ACCEPT

iptables -A INPUT -p udp --dport 33434:33464 -j ACCEPT

iptables -A INPUT -p udp --sport 33434:33464 -j ACCEPT

iptables -A OUTPUT -p udp --dport 33434:33464 -j ACCEPT

iptables -A OUTPUT -p udp --sport 33434:33464 -j ACCEPT

iptables -A FORWARD -p udp --dport 33434:33464 -j ACCEPT

iptables -A FORWARD -p udp --sport 33434:33464 -j ACCEPT
#--------------------------------------------------

#c
iptables -A FORWARD -p tcp -d 6.2.3.1 --dport 80 -j ACCEPT
iptables -A FORWARD -p tcp -s 6.2.3.1 --sport 80 -j ACCEPT
iptables -A OUTPUT -p tcp -d 6.2.3.1 --dport 80 -j ACCEPT
iptables -A INPUT -p tcp -s 6.2.3.1 --sport 80 -j ACCEPT
iptables -A FORWARD -p tcp -d 6.2.3.1 --dport 22 -j ACCEPT
iptables -A FORWARD -p tcp -s 6.2.3.1 --sport 22 -j ACCEPT
iptables -A OUTPUT -p tcp -d 6.2.3.1 --dport 22 -j ACCEPT
iptables -A INPUT -p tcp -s 6.2.3.1 --sport 22 -j ACCEPT
#--------------------------------------------------

#f
iptables -A FORWARD -p tcp -sport 80 - j ACCEPT
iptables -A FORWARD -p tcp -dport 80 - j ACCEPT
iptables -A INPUT -p tcp -sport 80 - j ACCEPT
iptables -A OUTPUT -p tcp -dport 80 - j ACCEPT
#-------------------------------------------------

#g (só aqui)
iptables -A OUTPUT -p tcp -d 6.2.4.55 --dport 10006 -j ACCEPT
iptables -A INPUT -p tcp -s 6.2.4.55 --sport 10006 -j ACCEPT
iptables -A FORWARD -p tcp -s 6.4.3.0/24 --dport 10006 -d 6.2.4.55 -j ACCEPT
iptables -A FORWARD -p tcp -s 6.2.4.0/24 --dport 10006 -d 6.4.3.0/24 -j ACCEPT
#-------------------------------------------------