메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.


리눅스(Linux) 포트(port)  열기, 방화벽(firewall)  설정/해제 등 안내 
--------------------------------------
리눅스 port를 열기 위해서는  iptables를 통해서, 포트를 열고 막고를  할 수 있습니다.

아래의 예제 부분만 따라 하시면 해당 port에 대해 모두 열 수 있습니다.
Inbound (외부에서 서버로 들어오는) , Outbound( 서버에서 외부로 나가는 )  모두 port를 열기 위해서는 아래의 iptables로 INPUT, OUPUT 을 해주면 모두 열립니다.
권한은 root에서 해주시기 바랍니다.

iptables -I INPUT 1 -p tcp --dport 5900 -j ACCEPT 
iptables -I OUTPUT 1 -p tcp --dport 5900 -j ACCEPT 


예를 들면 ) FTP port 21번을 열고 싶다.
#iptables -I INPUT 1 -p tcp --dport 21 -j ACCEPT 
#iptables -I OUTPUT 1 -p tcp --dport 21 -j ACCEPT 

#service iptables save로 저장한 후에 
#/etc/init.d/iptables restart 명령을 실행해준다.


혹은 /etc/sysconfig/iptables을 열어 직접수정도 가능하다.
-A INPUT -p tcp -m state --state NEW -m tcp --dport 33590 -j ACCEPT 를 추가한 후 "/etc/init.d/iptables restart"를 실행해주면
된다.
-> iptables파일을 직접 수정하는 경우 "service iptables reload" -> "service iptables restart"를 실행해줘야 반영된다.

*방화벽 적용되는 포트 확인 : iptables -nL        
번호 제목 날짜 조회 수
741 bananapi 5대(ubuntu계열 리눅스)에 yarn(hadoop 2.6.0)설치하기-ResourceManager HA/HDFS HA포함, JobHistory포함 2015.04.24 19290
740 mapreduce appliction을 실행시 "is running beyond virtual memory limits" 오류 발생시 조치사항 2017.05.04 17060
739 org.apache.hadoop.hdfs.server.common.InconsistentFSStateException: Directory /tmp/hadoop-root/dfs/name is in an inconsistent state: storage directory does not exist or is not accessible. 2013.03.11 14837
738 Hive Query Examples from test code (2 of 2) 2014.03.26 11465
737 drop table로 삭제했으나 tablet server에는 여전히 존재하는 테이블 삭제방법 2021.07.09 7941
736 Resource temporarily unavailable(자원이 일시적으로 사용 불가능함) 오류조치 2015.11.19 7706
735 insert hbase by hive ... error occured after 5 hours..HMaster가 뜨지 않는 장애에 대한 복구 방법 2014.04.29 7244
734 [DataNode]org.apache.hadoop.security.KerberosAuthException: failure to login: for principal: hdfs/datanode03@GOOPER.COM from keytab hdfs.keytab오류 2023.04.18 6132
733 [Decommission]시 시간이 많이 걸리면서(수일) Decommission이 완료되지 않는 경우 조치 2018.01.03 6059
732 cumulusRDF 1.0.1설치및 "KeyspaceCumulus" keyspace확인하기 file 2016.04.15 5945
731 HBase shell로 작업하기 2013.03.15 5924
730 dr.who로 공격들어오는 경우 조치방법 file 2018.06.09 5712
729 하둡 분산 파일 시스템을 기반으로 색인하고 검색하기 2013.03.15 5688
728 Ubuntu 16.04LTS 설치후 초기에 주어야 하는 작업(php, apache, mariadb설치및 OS보안설정등) file 2017.05.23 5631
727 hive 2.0.1 설치및 mariadb로 metastore 설정 2016.06.03 5294
726 Spark에서 Serializable관련 오류및 조치사항 2017.04.21 5029
725 [gson]mongodb의 api를 이용하여 데이타를 가져올때 "com.google.gson.stream.MalformedJsonException: Unterminated object at line..." 오류발생시 조치사항 2017.12.11 4807
724 .git폴더를 삭제하고 다시 git에 추가하고 서버에 반영하는 방법 2017.06.19 4531
723 import 혹은 export할때 hive파일의 default 구분자는 --input-fields-terminated-by "x01"와 같이 지정해야함 2014.05.20 4345
722 sqoop작업시 hdfs의 개수보다 더많은 값이 중복되어 oracle에 입력되는 경우가 있음 2014.09.02 4213
위로