linux 특정 port 차단, ubuntu(우분투)에서 일정 포트 닫기 by mahler83
예를 들어 pop3가 이용하는 포트인 110/tcp 포트를 막고 싶다면
iptables -A INPUT -p tcp –dport 110 -j DROP
이렇게 하면 된다.
막힌 것을 확인하려면 다음과 같이 한다.
> nmap localhost
Not shown: 1705 closed ports
PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
25/tcp open smtp
53/tcp open domain
80/tcp open http
110/tcp filtered pop3
이렇게 open이 아니라 filtered라고 뜨는 것을 볼 수 있다.
More from my site
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Leave a Comment