mirror of
https://github.com/cheat/cheat.git
synced 2025-09-02 18:18:30 +02:00
[IPTABLES,TCPDUMP] Add cheats for iptables and tcpdump
This commit is contained in:
18
cheatsheets/iptables
Normal file
18
cheatsheets/iptables
Normal file
@ -0,0 +1,18 @@
|
||||
# Show hit for rules with auto refresh
|
||||
watch --interval 0 'iptables -nvL | grep -v "0 0"'
|
||||
|
||||
# Show hit for rule with auto refresh and highlight any changes since the last refresh
|
||||
watch -d -n 2 iptables -nvL
|
||||
|
||||
# Block the port 902 and we hide this port from nmap.
|
||||
iptables -A INPUT -i eth0 -p tcp --dport 902 -j REJECT --reject-with icmp-port-unreachable
|
||||
|
||||
# Note, --reject-with accept:
|
||||
# icmp-net-unreachable
|
||||
# icmp-host-unreachable
|
||||
# icmp-port-unreachable <- Hide a port to nmap
|
||||
# icmp-proto-unreachable
|
||||
# icmp-net-prohibited
|
||||
# icmp-host-prohibited or
|
||||
# icmp-admin-prohibited
|
||||
# tcp-reset
|
Reference in New Issue
Block a user