iptables rule 에 대해 질문 드립니다.
글쓴이: lovejc / 작성시간: 수, 2009/09/02 - 4:26오후
환경은 debian 5.0, iptables 1.4.2 입니다.
Chain INPUT (policy ACCEPT) target prot opt source destination DROP all -- anywhere anywhere state INVALID ACCEPT all -- anywhere anywhere ACCEPT all -- ybio.net anywhere tcp -- anywhere anywhere tcp dpt:ssh state NEW recent: SET name: OFIRE_22 side: source DROP tcp -- anywhere anywhere tcp dpt:ssh state NEW recent: UPDATE seconds: 60 hit_count: 10 TTL-Match name: OFIRE_22 side: source ACCEPT tcp -- anywhere anywhere tcp spt:ftp-data state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpts:1024:65535 state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:ftp state ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:ssh state ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:telnet state ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:smtp state ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:time state ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:whois state ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:domain state ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:whois state ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:www state ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:pop3 state ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:ntp state ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:imap2 state ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:snmp state ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:https state ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:rsync state ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:imaps state ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spt:pop3s state ESTABLISHED ACCEPT udp -- anywhere anywhere udp spt:snmp ACCEPT udp -- anywhere anywhere udp spt:domain ACCEPT tcp -- anywhere anywhere tcp dpt:ftp-data state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpts:1024:65535 state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:ftp state NEW,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:ssh state NEW,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:telnet state NEW,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:smtp state NEW,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:domain state NEW,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:www state NEW,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:pop3 state NEW,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp dpt:https state NEW,ESTABLISHED ACCEPT udp -- anywhere anywhere udp dpt:domain ACCEPT udp -- anywhere anywhere udp dpt:domain REJECT tcp -- anywhere anywhere state NEW reject-with icmp-port-unreachable DROP tcp -- anywhere anywhere tcp dpts:tcpmux:65535 DROP udp -- anywhere anywhere udp dpts:1:65535 REJECT icmp -- anywhere anywhere icmp echo-request reject-with icmp-port-unreachable
위와 같은 rule을 정해서 동작시켰더니 외부에서 내부로 오픈한 port로 접속이 안됩니다. 가령 ftp, ssh등이요.
설정에 문제가 있는건가요?
rule 확인 좀 부탁드립니다.
그리고 혹시 단서에 도움이 될까 해서 덧붙이면, 내부에서 외부로 접속도 안됩니다. 가령 서버에서 다른 타 서버로 접근이 안됩니다.
Chain OUTPUT (policy ACCEPT) target prot opt source destination DROP all -- anywhere anywhere state INVALID ACCEPT all -- anywhere anywhere ACCEPT all -- anywhere ybio.net ACCEPT all -- anywhere 211.192.164.154 ACCEPT all -- anywhere 112.144.53.0/24 ACCEPT tcp -- anywhere anywhere tcp dpt:ftp-data state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpts:1024:65535 state NEW ACCEPT tcp -- anywhere anywhere tcp dpt:ftp state NEW ACCEPT tcp -- anywhere anywhere tcp dpt:ssh state NEW ACCEPT tcp -- anywhere anywhere tcp dpt:telnet state NEW ACCEPT tcp -- anywhere anywhere tcp dpt:smtp state NEW ACCEPT tcp -- anywhere anywhere tcp dpt:time state NEW ACCEPT tcp -- anywhere anywhere tcp dpt:whois state NEW ACCEPT tcp -- anywhere anywhere tcp dpt:domain state NEW ACCEPT tcp -- anywhere anywhere tcp dpt:whois state NEW ACCEPT tcp -- anywhere anywhere tcp dpt:www state NEW ACCEPT tcp -- anywhere anywhere tcp dpt:pop3 state NEW ACCEPT tcp -- anywhere anywhere tcp dpt:ntp state NEW ACCEPT tcp -- anywhere anywhere tcp dpt:imap2 state NEW ACCEPT tcp -- anywhere anywhere tcp dpt:snmp state NEW ACCEPT tcp -- anywhere anywhere tcp dpt:https state NEW ACCEPT tcp -- anywhere anywhere tcp dpt:rsync state NEW ACCEPT tcp -- anywhere anywhere tcp dpt:imaps state NEW ACCEPT tcp -- anywhere anywhere tcp dpt:pop3s state NEW ACCEPT tcp -- anywhere anywhere tcp spt:ftp-data state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere tcp spts:1024:65535 dpts:1024:65535 state NEW ACCEPT icmp -- anywhere anywhere icmp time-exceeded ACCEPT udp -- anywhere anywhere udp dpts:33434:33525 REJECT tcp -- anywhere anywhere state NEW reject-with icmp-port-unreachable REJECT icmp -- anywhere anywhere icmp time-exceeded reject-with icmp-port-unreachable
Forums:
댓글 달기