특정 PC에서 해당 서버로의 ICMP Protocol로 접속이 안될 때..

heaven2의 이미지

특정 PC에서만 ICMP Protocol로 서버의 특정 포트로 접속할 때 접속이 되지 않습니다.
다른 PC에서는 정상적으로 잘 되구요.
혹시 리눅스 서버의 방화벽 때문인가 싶어 살펴보고 있는데,
iptables 설정에 까막눈이라 설정 상태를 보고도 상황을 모르겠네요.
아래의 설정 상황에서 특정 PC에서만 ICMP로 접속 시 접속 거부가 될 수 있을까요?
특이한 것은, 해당 특정 PC도 한 1주일 정도는 잘 되다가 갑자기 안되기 시작했다는 것입니다.
원인을 몰라 해메고 있습니다. 도와주세요..

[ iptables 현재 상태 ]

[root@FILE01 etc]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
RH-Firewall-1-INPUT  all  --  anywhere             anywhere            
 
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
RH-Firewall-1-INPUT  all  --  anywhere             anywhere            
 
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere            tcp spts:1024:65535 dpt:ftp 
ACCEPT     tcp  --  anywhere             anywhere            tcp spts:1024:65535 dpt:ftp 
ACCEPT     tcp  --  anywhere             anywhere            tcp spts:1024:65535 dpts:1024:65535 
 
Chain RH-Firewall-1-INPUT (2 references)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     icmp --  anywhere             anywhere            icmp any 
ACCEPT     esp  --  anywhere             anywhere            
ACCEPT     ah   --  anywhere             anywhere            
ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:mdns 
ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ipp 
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ftp 
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:http 
ACCEPT     tcp  --  anywhere             anywhere            tcp spt:ftp dpts:1024:65535 
ACCEPT     tcp  --  anywhere             anywhere            tcp spt:ftp dpts:1024:65535 
ACCEPT     tcp  --  anywhere             anywhere            tcp spt:http dpts:1024:65535 
ACCEPT     tcp  --  anywhere             anywhere            tcp spts:1024:65535 dpts:1024:65535 
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited 
[root@FILE01 etc]# 

익명 사용자의 이미지

interface 장치 이름이 빠져 있어 확답이 어렵습니다.
iptables -S 의 결과를 분석해보세요.

red10won의 이미지

PC->서버로 tracert 때려보세요...

어디서 걸리는지 ,,백본에서 설정이 변경되어서 그럴 경우도 있구요.
PC에서 서버로 nmap돌려보고 telnet 포트로도 접속해보고

ICMP 안된다니 ping도 안되겠지만
어떤 포인트에서 장애가 발생한지 확인하고 대처해야될듯 합니다.

pchero의 이미지

방화벽 제일 마지막 라인이 문제로 보입니다.

REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

해당 구문은 모든 icmp 메시지를 차단한다는 설정이며, 이때문에 icmp ping 조차 되지 않는 현상으로 보여집니다.

iptables -D 명령으로 해당 구문을 삭제하시거나, 최초 iptables 입력 스크립트에서 해당 라인을 삭제하시면 될것 같습니다.

출처: https://kldp.org/node/97390

---------------------------------
제일 왼쪽이 저입니다 :)

익명 사용자의 이미지

그 구문은 그 위에 열거된 모든 rule chain 에 해당되지 않는 상황이 발생했을 때,
모든 프로토콜(all) 에 대해 접속 거부(REJECT) 를 하기 위한 구문이고,
접속 거부 이유(host-prohibited)를 ICMP 를 통해 peer에게 알려주는 부가 기능을 추가한 구문입니다.

애초에
ACCEPT all -- anywhere anywhere
가 rule 의 맨 처음에 있으니, 여기에 만약 인터페이스 지정이 없었다면 방화벽은 없는 것이나 다름 없습니다.

iptables -S 로 보면 각 rule 의 규칙을 좀 더 명확하게 분석할 수 있습니다.

pchero의 이미지

아..... 제가 잘못 분석했네요;;;
정확히 말씀하신 그대로네요.

ㅎㅎㅎㅎ 한수 배우고 갑니다. :)

---------------------------------
제일 왼쪽이 저입니다 :)

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.