iptables rule 에 대해 질문 드립니다.

lovejc의 이미지

환경은 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

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.