iptable 세팅이여...
커널은 2.4.18-14smp 이구여...
메일 서버로 쓸려고... 22 , 25 , 110 빼구 다 막았습니다.
iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 25 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 25 -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 110 -j ACCEPT
iptables -A INPUT -p udp -m udp --dport 110 -j ACCEPT
iptables -A INPUT -p tcp -m tcp -j REJECT
iptables -A INPUT -p udp -m udp -j REJECT
iptables 저장하고.... restart...
iptables -L 결과는....
[root@sanok mail]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
ACCEPT udp -- anywhere anywhere udp dpt:smtp
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3
ACCEPT udp -- anywhere anywhere udp dpt:pop3
REJECT tcp -- anywhere anywhere tcp reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp reject-with icmp-port-unreachable
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
이렇게 세팅을 했는데... 메일 주고 받는게 안되네요....
로그파일을 확인하니...
May 13 15:14:08 xxxx sendmail[11534]: AUTH=server, relay=[211.97.131.197], authid=eager10, mech=LOGIN, bits=0
May 13 15:14:48 xxxxk sendmail[11534]: j4D6E8uu011534: from=<eager10@smtp.co.kr>, size=1264, class=0, nrcpts=2, msgid=<004a01c55783$119fe130$087ba8c0@hunhoon71>, proto=ESMTP, daemon=MTA, relay=[211.97.131.197]
May 13 15:14:48 xxxx sendmail[11534]: j4D6E8uu011534: to=<eager10@smtp.co.kr>, delay=00:00:20, mailer=local, pri=60477, dsn=4.4.3, stat=queued
May 13 15:14:48 xxxx sendmail[11534]: j4D6E8uu011534: to=<eager10@lycos.co.kr>, delay=00:00:20, mailer=esmtp, pri=60477, dsn=4.4.3, stat=queued
고수 분들...지도 부탁합니다...^^
RELATED, ESTABLISHED를 허용해줘야 합니다. 들어오는 패킷
RELATED, ESTABLISHED를 허용해줘야 합니다. 들어오는 패킷을 막아버리면, 나가는 패킷의 응답도 못받게 되지요..
언제나 삽질 - http://tisphie.net/typo/
프로그래밍 언어 개발 - http://langdev.net
mithrandir 님...부연 설명을...ㅎㅎㅎ
제가 초보가 적용을 못하겠네여...
구체적은 예로 설명 좀...ㅜㅜ
나가는 요청에 의해 생성된 연결을 통해 들어오는 패킷을 허용하는 경우..
나가는 요청에 의해 생성된 연결을 통해 들어오는 패킷을 허용하는 경우..
iptables -A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
북한산(X) 삼각산(O) 백운대(X) 백운봉(O)
댓글 달기