Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Nomor 4 (di semua webserver)
- iptables -A INPUT -p tcp -m multiport --dport 80,443 -m time --timestart 07:00 --timestop 19:00 --weekdays Mon,Tue,Wed,Thu,Fri -j ACCEPT
- iptables -A INPUT -p tcp -m multiport --dport 80,443 -j DROP
- # Nomor 4 testing ganti tanggal, terus akses WS pake curl atau lynx.
- date -s "2024-12-09 09:00:00"
- date -s "2024-12-09 21:00:00"
- # Nomor 5
- iptables -I INPUT 1 -p tcp -s 192.168.0.2/29 -m multiport --dport 80,443 -m time --weekdays Sat,Sun -j ACCEPT
- # Nomor 5 testing di haibara, ganti tanggal terus curl lagi
- date -s "2024-12-08 11:00:00" # haibara
- # Nomor 6
- iptables -I INPUT 2 -p tcp -m multiport --dport 80,443 -m time --timestart 11:00 --timestop 13:00 --weekdays Fri -j DROP
- # Nomor 6 testing ganti ke hari jumat
- date -s "2024-12-13 12:00:00"
- # Nomor 7
- iptables -N LOGGING
- iptables -A INPUT -p tcp -m multiport --dport 80,443 -j LOG --log-prefix " DROPPED PACKET " --log-level=warning
- iptables -A LOGGING -j DROP
- # Urutan rule no 4-7
- iptables -N LOGGING
- iptables -A INPUT -p tcp -m multiport --dport 80,443 -j LOG --log-prefix " DROPPED PACKET " --log-level=warning
- iptables -A INPUT -p tcp -m multiport --dport 80,443 -m time --timestart 11:00 --timestop 13:00 --weekdays Fri -j DROP
- iptables -A INPUT -p tcp -s 192.168.0.0/29 -m multiport --dport 80,443 -m time --weekdays Sat,Sun -j ACCEPT
- iptables -A INPUT -p tcp -m multiport --dport 80,443 -m time --timestart 07:00 --timestop 19:00 --weekdays Mon,Tue,Wed,Thu,Fri -j ACCEPT
- iptables -A INPUT -p tcp -m multiport --dport 80,443 -j DROP
- iptables -A LOGGING -j DROP
- Chain INPUT (policy ACCEPT)
- num target prot opt source destination
- 1 LOG tcp -- anywhere anywhere multiport dports http,https LOG level warning prefix " DROPPED PACKET "
- 2 DROP tcp -- anywhere anywhere multiport dports http,https TIME from 11:00:00 to 13:00:00 on Fri UTC
- 3 ACCEPT tcp -- 192.168.0.0/29 anywhere multiport dports http,https TIME on Sat,Sun UTC
- 4 ACCEPT tcp -- anywhere anywhere multiport dports http,https TIME from 07:00:00 to 19:00:00 on Mon,Tue,Wed,Thu,Fri UTC
- 5 DROP tcp -- anywhere anywhere multiport dports http,https
- Chain FORWARD (policy ACCEPT)
- num target prot opt source destination
- Chain OUTPUT (policy ACCEPT)
- num target prot opt source destination
- Chain LOGGING (0 references)
- num target prot opt source destination
- 1 DROP all -- anywhere anywhere
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement