오늘은 대한입니다.
sun's longitude:299 47 31.19 
· 자유게시판 · 묻고답하기 · 알파문서 · RPMS list
· 사용자문서 · 팁/FAQ모음 · 리눅스Links · 자료실
· 서버정보 · 운영자 · Books/FAQ · FreeBSD
/board/read.php:소스보기  

질문과 답변 게시판입니다.

현재 실시간으로 이곳 서버의 설정파일(몇개)를 보여주고 있습니다.
서버의 설정내용에 관한 질문은 먼저 이곳 서버의 설정내용을 참고하시길 바랍니다.

[*** 쓰기 금지단어 패턴 ***]
글 본문 중간에 업로드할 이미지를 추가하는 방법 : @@이미지이름@@
ex) @@foo.gif@@
2506 번 글의 답장글: Re: Re: Re: iptables에서 질문드립니다.
글쓴이: 산이 [홈페이지] 글쓴날: 2006년 07월 09일 16:57:36 일(오후) 조회: 1797

[이석]님이 남기신 글:

>답변 감사합니다. 말씀하신대로 수정했구요, 8686포트는 연결이
되는것 같습니다. 그런데 이 어플리케이션(8686을
 사용하는)에서 mysql(3306포트)쪽으로
 연결이 되지않는것 같습니다. 둘다 같은 서버에
설치되어있구요,
 mysql은 아파치등에서는
 접속이 가능합니다. 다만 8686포트를 사용하는 이 프로그램에서
연결이 않되네요. 물론 맨아래 drop설정을 해제하면 잘 되니까
분명 iptables 룰 때문인것 같은데요..
>
>
>
>[산이]님이 남기신 글:
>
>>
>>[이석]님이 남기신 글:
>>
>>>-----------------------------------------
>>>답변자가 기본적으로 참고할 내용입니다.
>>>- 배포판(옵션)    : 
>>>- 커널버전(옵션)
  : 
>>>- 데몬버전(예:apache
 1.3.27) : 
>>>- 데몬설치유형(RPM/컴파일/기타)
 : 
>>>-----------------------------------------
>>>안녕하세요? 오랜만에 질문드립니다.
>>>어떤 프로그램때문에
 8686포트를 사용하려고 합니다. 현재 iptables의 rule이 아래처럼
되어있구요 8686포트관련 부분은 직접 설정했습니다만
 포트가 사용가능하지가
 않습니다. 물론 맨아래 drop부분을 삭제하면 연결이 잘
됩니다만.. drop부분보다 앞쪽에 8686에대한 accept설정을 해줬는데
왜 포트연결이 안되는지 모르겠습니다. 
>>>
>>># iptables -L 
>>>Chain INPUT (policy ACCEPT) 
>>>target    prot opt source              destination 
>>>DROP      all  --  anywhere            anywhere          state
INVALID


## loopback allow
##
iptables -A INPUT  -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT

## system allow inbound(if established) TCP/UDP 0:65535
##
iptables -A INPUT  -m state --state ESTABLISHED                           -j ACCEPT
iptables -A INPUT  -m state --state ESTABLISHED,RELATED                   -j ACCEPT

## system allow OUTPUT and outbound packets(if state related)
##
iptables -A OUTPUT -m state --state NEW,ESTABLISHED,RELATED               -j ACCEPT

위의 5개의 rule 을 이 위치에 추가해 보세요. 아무래도 outbound
패킷
문제 인것 같네요.
 
>>>ACCEPT    tcp  --  anywhere            anywhere          tcp spt:ftp-data state
RELATED,ESTABLISHED 
>>>ACCEPT    tcp  --  anywhere            anywhere          tcp dpts:ftp-data:ssh
state NEW,ESTABLISHED 
>>
>>>ACCEPT    tcp  --  anywhere            anywhere          tcp spt:8686 dpt:8686
state NEW,ESTABLISHED 
>>
>>이 설정에서 소스 포트를 지정하지 않고 수정해
보세요.
>>
>>ex)
>>iptables -A INPUT -p tcp --dport 8686 -m state NEW,ESTABLISHED  -j
ACCEPT
>>
>>이런식으로
>>
>>>ACCEPT    tcp  --  anywhere            anywhere          tcp spts:1024:65535
dpts:1024:65535 state RELATED,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:http state
NEW,ESTABLISHED 
>>>ACCEPT    tcp  --  anywhere            anywhere          tcp dpt:pop3 state
NEW,ESTABLISHED 
>>>ACCEPT    tcp  --  anywhere            anywhere          tcp dpt:imap state
NEW,ESTABLISHED 
>>>ACCEPT    tcp  --  anywhere            anywhere          tcp dpt:https state
NEW,ESTABLISHED 
>>>ACCEPT    tcp  --  anywhere            anywhere          tcp dpt:rndc state
NEW,ESTABLISHED 
>>>ACCEPT    tcp  --  anywhere            anywhere          tcp dpt:mysql state
NEW,ESTABLISHED 
>>>ACCEPT    tcp  --  anywhere            anywhere          tcp spt:ftp state
NEW,ESTABLISHED 
>>>ACCEPT    tcp  --  anywhere            anywhere          tcp spt:ssh state
NEW,ESTABLISHED 
>>>ACCEPT    tcp  --  anywhere            anywhere          tcp spt:smtp state
NEW,ESTABLISHED 
>>>ACCEPT    tcp  --  anywhere            anywhere          tcp spt:time state
NEW,ESTABLISHED 
>>>ACCEPT    tcp  --  anywhere            anywhere          tcp spt:nicname state
NEW,ESTABLISHED 
>>>ACCEPT    tcp  --  anywhere            anywhere          tcp spt:http state
NEW,ESTABLISHED 
>>>DROP      tcp  --  anywhere            anywhere 
>>>
>>>Chain FORWARD (policy ACCEPT) 
>>>target    prot opt source              destination 
>>>
>>>Chain OUTPUT (policy ACCEPT) 
>>>target    prot opt source              destination 
>>>DROP      all  --  anywhere            anywhere          state INVALID

>>
>>======================================== 
>
>======================================== 

========================================

 
이전글 : Re: Re: iptables에서 질문드립니다.
다음글 : Re: Re: Re: Re: iptables에서 질문드립니다.  
 from 222.234.153.39
JS(Redhands)Board 0.4 +@

Re: Re: iptables에서 질문드립니다. Re: Re: Re: Re: iptables에서 질문드립니다.
인쇄용 


apache lighttpd linuxchannel.net 
Copyright 1997-2026. linuxchannel.net. All rights reserved.

Page loading: 0.02(server) + (network) + (browser) seconds