iptables 설정후 ftp접속이 안되네요..ㅡ.ㅡ?
작성자 정보
- 홍석범 작성
- 작성일
컨텐츠 정보
- 4,094 조회
- 0 추천
- 목록
본문
안녕하십니까? 오늘과내일의 홍석범입니다.
아래와 같은 룰을 설정하는 것은 설정 자체의 의미가 별로 없을것 같습니다.
방화벽룰을 설정하는 것은 엄격하게 접근통제를 하는 것인데, 대부분의 포트를 모든 ip에 대해 오픈하는 것은 의미가 없어 보입니다. 그리고 상태추적을 적극적으로 이용하시는 것이 좋습니다. 이러한 경우 고급화된 공격도 차단 가능할 뿐만 아니라 ftp의 경우도 모든 포트를 오픈할 필요없이 21/tcp만 오픈하는 것으로 간단히 해결할 수 있습니다.
본 동영상 강의나 교재를 참고하시면 많은 도움이 되실 것입니다.
감사합니다.
더라 님의 글
iptables -F
iptables -I INPUT -i lo -j ACCEPT
IPTAB="iptables -A INPUT -i eth0"
# 기본 룰셋
$IPTAB -p icmp -j ACCEPT
$IPTAB -p tcp --dport 21 -j ACCEPT
$IPTAB -p tcp --dport 22 -j ACCEPT
$IPTAB -p tcp --dport 25 -j ACCEPT
$IPTAB -p tcp --dport 53 -j ACCEPT
$IPTAB -p tcp --sport 53 -j ACCEPT
$IPTAB -p tcp --dport 80 -j ACCEPT
$IPTAB -p tcp --dport 110 -j ACCEPT
$IPTAB -p tcp --dport 3306 -j ACCEPT
$IPTAB -p tcp --dport 1:1024 -j DROP
위 내용이 스크립트 내용입니다.
왜 안될까요? ㅡㅡㅋ
밑에꺼 iptables 리스트 결과구염
Chain INPUT (policy ACCEPT)
target prot opt source destination
DROP all -- 202.96.59.201 anywhere
DROP all -- ANancy-153-1-72-56.w83-203.abo.wanadoo.fr anywhere
DROP all -- 212.14.53.4 anywhere
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp spt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3
ACCEPT tcp -- anywhere anywhere tcp dpt:mysql
DROP tcp -- anywhere anywhere tcp dpts:tcpmux:1024
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
분명 열려있는데 안되는군요 ㅡㅡ;
/etc/hosts.allow , /etc/hosts.deny 와는 상관없구영.....
iptables 정지 시키면 접속되네영......
고수님 부탁드려요~~~~~~~
관련자료
-
이전
-
다음