cent os 6.5 [/etc/sysconfig/iptables]
-A INPUT -m state --state NEW -m tcp -p tcp -m multiport --dports 80,443 -j ACCEPT
* 8080 port 를 연다고 가정하면,
1. root 로 switch user
[user@test ~]$ su -
암호:
[root@test ~]#
2. /etc/sysconfig/iptables 파일 열기 & 수정
[root@test ~]# vi /etc/sysconfig/iptables
열고자 하는 포트를 아래 라인과 같이 추가. (8080 포트 열기)
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
3. iptables restart - 아래 명령 사용.
[root@test ~]# service iptables restart
또는
[root@test ~]# /etc/init.d/iptables restart
'etc > linux' 카테고리의 다른 글
apache start 시 오류 > AH00558: httpd: Could not reliably determine the server's fully qualified domain (0) | 2016.08.24 |
---|---|
apache 설치 시 오류 > checking whether to enable mod_ssl... (0) | 2016.08.24 |
apache 설치 시 오류 > checking for zlib location... not found (0) | 2016.08.24 |
리눅스 파일 라인수 외 기타 (0) | 2014.08.25 |
서버 사용률확인 (0) | 2013.05.29 |