방화벽(iptables) 설정에 대해서
현재 iptables을 사용해서 단순하게 방화벽을 사용중인데요.
방화벽을 사용하지 않은 경우
nslookup, dig, host 명령어가 정상적으로 동작합니다.
한데 iptables을 실행시킬 경우, 아무것도 정상적으로 동작하질 않고 결과가 아래처럼 나타납니다.
;; connection timed out; no servers could be reached
현재 iptables은 다음처럼 사용중이거든요.
ACCEPT tcp -- anywhere anywhere tcp dpt:pop3
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp-data
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere tcp dpt:time
ACCEPT tcp -- anywhere anywhere tcp dpt:nameserver
ACCEPT udp -- anywhere anywhere udp dpt:nameserver
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT all -- anywhere anywhere
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
특별히 서비스를 해주는 것은 업구요. 다만 도메인을 못얻어와서 nameserver, domain을 허용한거구요.
정확하게는 nslookup, dig, host가 사용하는 포트를 알구 싶습니다.
/etc/service 에 나온것들중에 연관되어 보이는것들을 제법 해봤는데.. 안되네요.
혹시 다른 이유때문이라면.. 초보인 저에게는. 찾기 힘들꺼 같습니다.
도움 주시면 감사하겠습니다~~
정확하게는 nslookup,
정확하게는 nslookup, dig, host가 사용하는 포트를 알구 싶습니다.
------------------------------------------------------------
모두 dns 관련입니다.
밖으로 나가는 ( 정확히는 /etc/resolv.conf 에 있는 ip 들 )
53번 tcp udp 포트를 열어주면 됩니다.
------------------------------------------------------------------------------------------------
Life is in 다즐링
댓글 달기