linuxtips
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linuxtips [2015/01/17 03:13] – created donghee | linuxtips [2018/07/18 14:10] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 40: | Line 40: | ||
reboot | reboot | ||
+ | ==== iptables ==== | ||
+ | 입력 DROP 리스트 보기 | ||
+ | |||
+ | < | ||
+ | iptables -L INPUT -v -n | ||
+ | </ | ||
+ | |||
+ | ==== 해당 아이피 DROP하기 ==== | ||
+ | |||
+ | < | ||
+ | #!/bin/sh | ||
+ | |||
+ | deny_ips=$(netstat -anp | grep 80 | awk ' | ||
+ | |||
+ | for deny_ip in $deny_ips | ||
+ | do | ||
+ | sudo iptables -A INPUT -s $deny_ip -j DROP | ||
+ | echo 'sudo iptables -A INPUT -s ' | ||
+ | done | ||
+ | |||
+ | exit 0 | ||
+ | </ | ||
+ | ==== 현재 접속하는 ip보기 ==== | ||
+ | |||
+ | < | ||
+ | tcptrack -i eth0 | ||
+ | </ | ||
---- | ---- | ||
UnixTip | UnixTip | ||
linuxtips.1421464431.txt.gz · Last modified: 2018/07/18 14:09 (external edit)