- Dapatkan link
- X
- Aplikasi Lainnya
Diposting oleh
Stephen Setiawan
pada tanggal
- Dapatkan link
- X
- Aplikasi Lainnya
#Flushing
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat –X
#Routing
iptables -t nat -A POSTROUTING -s 192.168.10.0/27 -d 172.16.10.0/28 -j MASQUERADE
#Block icmp
iptables -A FORWARD -p icmp -j DROP
#Allow state for file sharing
iptables -A FORWARD -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
#Drop policy
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
#Input
iptables -A INPUT -p tcp -m multiport --sports 53,80,20,21,22 -j ACCEPT
iptables -A INPUT -p udp -m multiport --sports 53,80,20,21,22 -j ACCEPT
#Forward
iptables -A FORWARD -p tcp -m multiport --dports 53,80,20,21,22 -j ACCEPT
iptables -A FORWARD -p udp -m multiport --dports 53,80,20,21,22 -j ACCEPT
iptables -A FORWARD -p tcp -m multiport --sports 53,80,20,21,22 -j ACCEPT
iptables -A FORWARD -p udp -m multiport --sports 53,80,20,21,22 -j ACCEPT
#Output
iptables -A OUTPUT -p tcp -m multiport --dports 53,80,20,21,22 -j ACCEPT
iptables -A OUTPUT -p udp -m multiport --dports 53,80,20,21,22 -j ACCEPT
Komentar
Posting Komentar