[이석]님이 남기신 글:
>-----------------------------------------
>답변자가 기본적으로 참고할 내용입니다.
>- 배포판(옵션) :
>- 커널버전(옵션)
:
>- 데몬버전(예: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
>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
========================================
|