Membiarkan default port ssh yaitu port 22 adalah sesuatu yang tidak dianjurkan dalam hal keamanan sebuah vps atau server. Banyak sekali orang yang tidak peduli atas hal ini dengan membiarkan port SSH tetap default.

Panduan singkat ini akan memberikan bagai mana cara mengubah default port SSH pada Debian, Ubuntu dan CentOS sehingga bisa lebih meningkatkan keamanan VPS atau server anda.

Tahapanan adalah sebagai berikut:

1. Install text editor NANO, supaya lebih memudahkan dala melakukan pengubahan konfigurasi server melalui ssh

Debian/Ubuntu: apt-get install nano
CentOS: yum install nano

2. Buka file konfigurasi SSH dengan menggunakan NANO

nano /etc/ssh/sshd_config

3. Setelah masuk kedalam file konfigurasi SSHD, cari port 22 lalu ubah angka 22 menjadi angka yang anda sukai dan mudah di ingat oleh anda. Misal kita ubah menjadi:

port 1734

4. Simpan konfigurasi SSHD yan baru dengan menekan CTRL + O
5. Keluar dari file konfigurasi SSHD dengan menekan CTRL + X

6. Restart SSH daemon agar konfigurasi SSHD yang baru bisa diterapkan.

Debian/Ubuntu : restart ssh
CentOS : service sshd restart

Setelah itu, maka ketika anda login ke server melalui SSH, anda harus memasukan port yang telah anda seting

contoh: ssh root@119.235.250.193 -p 1734

Enable Firewalld

To enable firewalld, run the following command as root:

systemctl enable firewalld

Start Firewalld

To start firewalld, run the following command as root:

systemctl start firewalld

Check the Status of Firewalld

To check the status of firewalld, run the following command as root:

systemctl status firewalld

Good luck !

buka terminal, login ke server menggunakan user root, kemuadian buka file  /etc/ssh/sshd_config

# nano  /etc/ssh/sshd_config

cari file :

# port

buang tanda pagar dan tambahkan port yang akan dibuka

port 22, 80 # misalkan

buka pada firewall

firewall-cmd –add-port 22/tcp

firewall-cmd –add-port 80/tcp

firewall-cmd –add-port 22/tcp –permanent

firewall-cmd –add-port 80/tcp –permanent

How do I increase upload file limit from 2MB to 10MB under Apache 2 UNIX / Linux web server?

Your php installation putting limits on upload file size. The default will restrict you to a max 2 MB upload file size. You need to set the following two configuration options:

    1. upload_max_filesize – The maximum size of an uploaded file.
    2. memory_limit – This sets the maximum amount of memory in bytes that a script is allowed to allocate. This helps prevent poorly written scripts for eating up all available memory on a server. Note that to have no memory limit, set this directive to -1.
    3. post_max_size – Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. If memory limit is enabled by your configure script, memory_limit also affects file uploading. Generally speaking, memory_limit should be larger than post_max_size.

There are two methods two fix this problem.

Method # 1: Edit php.ini

Edit your php.ini file (usually stored in /etc/php.ini or /etc/php.d/cgi/php.ini or /usr/local/etc/php.ini):
# vi /etc/php.ini
Sample outputs:

 
memory_limit = 32M
upload_max_filesize = 10M
post_max_size = 20M

Save and close the file. Restart apache or lighttpd web server:
# service httpd restart
OR
# service lighttpd restart

Method #2: Edit .htaccess

Edit .htaccess file in your root directory. This is useful when you do not have access to php.ini file. In this example, /home/httpd/html is considered as root directory (you can also create .htaccess file locally and than upload it using ftp / sftp / scp client):
# vi /home/httpd/html/.htaccess
Append / modify setting as follows:

 
php_value upload_max_filesize 10M
php_value post_max_size 20M
php_value memory_limit 32M

Save and close the file.

A Note About Suhosin (Optional)

This is not installed by default on many servers (latest version of Debian, Ubuntu, and FreeBSD does install Suhosin by default). Use phpinfo() to find out if suhosin enabled or not (create test.php):

 
<?php
   phpinfo();
?>

If you are using Suhosin which was designed to protect your servers against a number of well known problems in PHP applications and on the other hand against potential unknown vulnerabilities within these applications or the PHP core itself. You need to edit/etc/php.d/suhosin.ini to set correct memory and upload limit. As long scripts are not running within safe_mode they are free to change the memory_limit to whatever value they want.
suhosin.memory_limit=32M

Sumber : http://www.cyberciti.biz/faq/linux-unix-apache-increase-php-upload-limit/

on my server, i tried to change host name by modifying the /etc/sysconfig/network; it did not take an effect of the modification. Even after multiple reboot of server, the host name remains localhost.localdomain. The procedure to change the host name in CentOS 7 is now totally different from the previous version, this guide will help you to setup the host name on CentOS 7 / RHEL 7.

CentOS 7 supports three class of Host Names:

Static – The static host name is traditional host which can be chosen by the user and is stored in /etc/hostname file.

Transient – The transient host name is maintained by kernel and can be changed by DHCP and mDNS.

Pretty – It is a free form UTF -8 host name for the presentation to the user.

How to Change:

Before changing the host name, lets check the current host name.

[root@localhost ~]# hostname
localhost.localdomain

1. nmtui tool:

NetworkManaget tool is used to set the static host name in /etc/hostname file.

nmtui -Select Set HostName
nmtui -Select Set HostName

Set the host name.

nmtui - Change HostName 2
nmtui – Change HostName 2

restart the hostnamed to force the hostnamectl to notice the change in static host name.

[root@localhost ~]# systemctl restart systemd-hostnamed

You can verify the change in host name.

[root@server ~]# hostname
server.itzgeek.com
[root@server ~]# cat /etc/hostname
server.itzgeek.com
[root@server ~]# cat /etc/sysconfig/network
# Created by anaconda
HOSTNAME=server.itzgeek.com

2. hostnamectl:

hostnamectl is used to change the host name, with this tool we can change all the three class of host name; here we look only static host name.

Check the current host name.

[root@server ~]# hostnamectl status
Static hostname: server.itzgeek.com
Icon name: computer-vm
Chassis: vm
Machine ID: 565ea8b749544aca9d5563308f9e4bc2
Boot ID: 5c979d9b5f754df8b75a4e3aeabf2bad
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-123.el7.x86_64
Architecture: x86_64

Set the hostname.

[root@server ~]# hostnamectl set-hostname client.itzgeek.com

Check the host name again (Close the session and open new session using putty or console)

[root@client ~]# hostnamectl status
Static hostname: client.itzgeek.com
Icon name: computer-vm
Chassis: vm
Machine ID: 565ea8b749544aca9d5563308f9e4bc2
Boot ID: 5c979d9b5f754df8b75a4e3aeabf2bad
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-123.el7.x86_64
Architecture: x86_64

If you use this command, you do not require to notify the change in host name. Close the current session and re launch the terminal.

3. nmcli tool:

It can be used to query and setup the static host name in /etc/hostname file.

Check the hostname.

[root@client ~]# nmcli general hostname
client.itzgeek.com

Change the host name.

[root@client ~]# nmcli general hostname server.itzgeek.com

restart the hostnamed to force the hostnamectl to notice the change in static host name.

[root@client ~]# systemctl restart systemd-hostnamed

This is the simple, but requires a reboot of server to take an effect.
// g?c=a+f+c:(g+=f.length,f=a.indexOf("&",g),c=0<=f?a.substring(0,g)+c+a.substring(f):a.substring(0,g)+c)}return 2E3<c.length?void 0!==d?r(a,b,d,void 0,e):a:c};var ba=function(){var a=/[&\?]exk=([^& ]+)/.exec(t.location.href);return a&&2==a.length?a[1]:null};var ca=function(a){var b=a.toString();a.name&&-1==b.indexOf(a.name)&&(b+=": "+a.name);a.message&&-1==b.indexOf(a.message)&&(b+=": "+a.message);if(a.stack){a=a.stack;var c=b;try{-1==a.indexOf(c)&&(a=c+"\n"+a);for(var d;a!=d;)d=a,a=a.replace(/((https?:\/..*\/)[^\/:]*:\d+(?:.|\n)*)\2/,"$1");b=a.replace(/\n */g,"\n")}catch(e){b=c}}return b},u=function(a,b){a.google_image_requests||(a.google_image_requests=[]);var c=a.document.createElement("img");c.src=b;a.google_image_requests.push(c)};var v=document,t=window;var da=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},ea=function(a,b){return ab?1:0};var w=null,fa=function(a,b){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.call(null,a[c],c,a)};function x(a){return"function"==typeof encodeURIComponent?encodeURIComponent(a):escape(a)}var ga=function(){if(!v.body)return!1;if(!w){var a=v.createElement("iframe");a.style.display="none";a.id="anonIframe";w=a;v.body.appendChild(a)}return!0},ha={};var ia=!0,ja={},ma=function(a,b,c,d){var e=ka,f,g=ia;try{f=b()}catch(k){try{var q=ca(k);b="";k.fileName&&(b=k.fileName);var E=-1;k.lineNumber&&(E=k.lineNumber);g=e(a,q,b,E,c)}catch(l){try{var y=ca(l);a="";l.fileName&&(a=l.fileName);c=-1;l.lineNumber&&(c=l.lineNumber);ka("pAR",y,a,c,void 0,void 0)}catch(ya){la({context:"mRE",msg:ya.toString()+"\n"+(ya.stack||"")},void 0)}}if(!g)throw k;}finally{if(d)try{d()}catch(ub){}}return f},ka=function(a,b,c,d,e,f){var g={};if(e)try{e(g)}catch(k){}g.context=a;g.msg=b.substring(0,512);c&&(g.file=c);0<d&&(g.line=d.toString());g.url=v.URL.substring(0,512);g.ref=v.referrer.substring(0,512);na(g);la(g,f);return ia},la=function(a,b){try{if(Math.random()c?Math.max(0,a.length+c):c;if(n(a))return n(b)&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},qa=A.map?function(a,b,c){return A.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),f=n(a)?a.split(""):a,g=0;g<d;g++)g in f&&(e[g]=b.call(c,f[g],g,a));return e};var ra=function(a,b){for(var c in a)b.call(void 0,a[c],c,a)},sa=function(a){var b=arguments.length;if(1==b&&"array"==m(arguments[0]))return sa.apply(null,arguments[0]);for(var c={},d=0;dparseFloat(a))?String(b):a}(),Ca={},Da=function(a){if(!Ca[a]){for(var b=0,c=da(String(Ba)).split("."),d=da(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||"",k=d[f]||"",q=RegExp("(\\d*)(\\D*)","g"),E=RegExp("(\\d*)(\\D*)","g");do{var l=q.exec(g)||["","",""],y=E.exec(k)||["","",""];if(0==l[0].length&&0==y[0].length)break;b=ea(0==l[1].length?0:parseInt(l[1],10),0==y[1].length?0:parseInt(y[1],10))||ea(0==l[2].length,0==y[2].length)||ea(l[2],y[2])}while(0==b)}Ca[a]=0<=b}},Ea=h.document,Fa=Aa(),Ga=!Ea||!D||!Fa&&C()?void 0:Fa||("CSS1Compat"==Ea.compatMode?parseInt(Ba,10):5);var Ha={i:947190538,j:947190541,l:947190542,g:79463068,h:79463069},Ia={f:"ud=1",o:"ts=1",m:"sc=1",c:"gz=1"};if(v&&v.URL)var F=v.URL,ia=!(F&&(0<F.indexOf("?google_debug")||0<F.indexOf("&google_debug")||0=b)){var d=0,e=function(){a();d++;db;){if(c.google_osd_static_frame)return c;if(c.aswift_0&&(!a||c.aswift_0.google_osd_static_frame))return c.aswift_0;b++;c=c!=c.parent?c.parent:null}}catch(e){}return null},Na=function(a,b,c,d,e){if(10<La)t.clearInterval(L);else if(++La,t.postMessage&&(b.b||b.a)){var f=Ma(!0);if(f){var g={};I(b,g);g[0]="goog_request_monitoring";g[6]=a;g[16]=c;d&&d.length&&(g[17]=d.join(","));e&&(g[19]=e);try{var k=K(g);f.postMessage(k,"*")}catch(q){}}}},Oa=function(a){var b=Ma(!1),c=!b;!b&&t&&(b=t.parent);if(b&&b.postMessage)try{b.postMessage(a,"*"),c&&t.postMessage(a,"*")}catch(d){}};sa("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));var M=function(a,b){this.width=a;this.height=b};var Pa;if(!(Pa=!wa&&!D)){var Qa;if(Qa=D)Qa=D&&(C()||9<=Ga);Pa=Qa}Pa||wa&&Da("1.9.1");D&&Da("9");D&&Da(12);var Sa=function(){var a=t.parent&&t.parent!=t,b=a&&0<="//tpc.googlesyndication.com".indexOf(t.location.host);if(a&&t.name&&0==t.name.indexOf("google_ads_iframe")||b){var c;a=t||t;try{var d;if(a.document&&!a.document.body)d=new M(-1,-1);else{var e=(a||window).document,f="CSS1Compat"==e.compatMode?e.documentElement:e.body;d=new M(f.clientWidth,f.clientHeight)}c=d}catch(g){c=new M(-12245933,-12245933)}return Ra(c)}c=t.document.getElementsByTagName("SCRIPT");return 0<c.length&&(c=c[c.length-1],c.parentElement&&c.parentElement.id&&0<c.parentElement.id.indexOf("_ad_container"))?Ra(void 0,c.parentElement):null},Ra=function(a,b){var c=Ta("IMG",a,b);return c||(c=Ta("IFRAME",a,b))?c:(c=Ta("OBJECT",a,b))?c:null},Ta=function(a,b,c){var d=document;c=c||d;d=a&&"*"!=a?a.toUpperCase():"";c=c.querySelectorAll&&c.querySelector&&d?c.querySelectorAll(d+""):c.getElementsByTagName(d||"*");for(d=0;d<c.length;d++){var e=c[d];if("OBJECT"==a)a:{var f=e.getAttribute("height");if(null!=f&&0<f&&0==e.clientHeight)for(var f=e.children,g=0;g<f.length;g++){var k=f[g];if("OBJECT"==k.nodeName||"EMBED"==k.nodeName){e=k;break a}}}f=e.clientHeight;g=e.clientWidth;if(k=b)k=new M(g,f),k=Math.abs(b.width-k.width)<.1*b.width&&Math.abs(b.height-k.height)<.1*b.height;if(k||!b&&10<f&&10<g)return e}return null};var Ua,N=0,O="",P=!1,Q=!1,R=!1,Va=!0,Wa=!1,S=!1,T=0,Xa=[],J=null,Ya="",Za=[],$a=null,ab=[],bb=!1,U="",V="",cb=(new Date).getTime(),db=!1,eb="",fb=!1,gb=["1","0","3"],W=0,X=0,hb=0,ib="",jb=function(a,b,c){P&&(Va||3!=(c||3)||S)&&Y(a,b,!0);(R||Q&&Wa)&&Y(a,b)},kb=function(){var a=$a;return a?2!=a():!0},Y=function(a,b,c){if((b=b||Ya)&&!bb&&(2==X||c)&&kb()){var d;d=c?"osdim":R?"osd2":"osdtos";var e=["//pagead2.googlesyndication.com/activeview","?id=",d];"osd2"==d&&Q&&Wa&&e.push("&ts=1");O&&e.push("&avi=",O);Ua&&e.push("&cid=",Ua);e.push("&ti=1");e.push("&",b);e.push("&uc="+hb);db?e.push("&tgt="+eb):e.push("&tgt=nf");e.push("&cl="+(fb?1:0));b=e.join("");for(d=0;d<Za.length;d++){try{var f=Za[d]()}catch(g){}e="max_length";2<=f.length&&(3==f.length&&(e=f[2]),b=r(b,x(f[0]),x(f[1]),e))}2E3<b.length&&(b=b.substring(0,2E3));u(a,b);c?P=!1:bb=!0}},Z=function(a,b){if(U){try{var c=r(U,"vi",a);ga()&&u(w.contentWindow,c)}catch(d){}0<=pa(gb,a)&&(U="");var c=b||Ya,e;e=r("//pagead2.googlesyndication.com/pagead/gen_204?id=sldb","avi",O);e=r(e,"vi",a);c&&(e+="&"+c);try{u(t,e)}catch(f){}}},lb=function(){Z("-1")},nb=function(a){if(a&&a.data&&n(a.data)){var b;var c=a.data;if(n(c)){b={};for(var c=c.split("\n"),d=0;d=e)){var f=Number(c[d].substr(0,e)),e=c[d].substr(e+1);switch(f){case 5:case 8:case 11:case 15:case 16:case 18:e="true"==e;break;case 4:case 7:case 6:case 14:e=Number(e);break;case 3:case 19:if("function"==m(decodeURIComponent))try{e=decodeURIComponent(e)}catch(g){throw Error("Error: URI malformed: "+e);}break;case 17:e=qa(decodeURIComponent(e).split(","),Number)}b[f]=e}}b=b[0]?b:null}else b=null;if(b&&(c=new H(b[4],b[12]),J&&J.match(c))){for(c=0;cW&&!Q&&2==X&&ob(t,"osd2","hs="+W)},qb=function(){var a={};I(J,a);a[0]="goog_dom_content_loaded";var b="";try{b=K(a)}catch(c){}""!=b&&Ja(function(){Oa(b)},10,"osd_listener::ldcl_int")},rb=function(){var a={};I(J,a);a[0]="goog_creative_loaded";var b=K(a);Ja(function(){Oa(b)},10,"osd_listener::lcel_int");fb=!0},sb=function(a){if(n(a)){a=a.split("&");for(var b=a.length-1;0<=b;b–){var c=a[b],d=Ia;c==d.f?(Va=!1,a.splice(b,1)):c==d.c&&(T=1,a.splice(b,1))}ib=a.join("&")}},tb=function(){if(!db){var a=Sa();a&&(db=!0,eb=a.tagName,a.complete||a.naturalWidth?rb():G(a,"load",rb,"osd_listener::creative_load"))}};p("osdlfm",z("osd_listener::init",function(a,b,c,d,e,f,g,k,q,E){N=a;U=b;V=d;P=f;Ua=E;k&&sb(k);Q=g&&f;1!=q&&2!=q&&3!=q||Xa.push(Ha["MRC_TEST_"+q]);J=new H(e,ba());G(t,"load",lb,"osd_listener::load");G(t,"message",nb,"osd_listener::message");O=c||"";G(t,"unload",pb,"osd_listener::unload");var l=t.document;!l.readyState||"complete"!=l.readyState&&"loaded"!=l.readyState?("msie"in ha?ha.msie:ha.msie=-1!=navigator.userAgent.toLowerCase().indexOf("msie"))&&!window.opera?G(l,"readystatechange",function(){"complete"!=l.readyState&&"loaded"!=l.readyState||qb()},"osd_listener::rsc"):G(l,"DOMContentLoaded",qb,"osd_listener::dcl"):qb();-1==N?X=f?3:1:-2==N?X=3:0

service mysqld stop;
service proftpd stop;
service httpd stop;
yum -y remove httpd;
yum -y remove php;
yum -y remove php-pear;
yum -y remove php-mysql;
yum -y remove php-cli;
yum -y remove php-common;
yum -y remove mysql*;
yum -y remove phpMyAdmin;
yum -y remove postfix;
yum -y remove dovecot;
yum -y remove sendmail;
yum -y remove proftp* vsftpd;
yum -y remove bind;
yum -y remove bind-libs;
yum -y remove pdns;
yum -y remove pdns-backend-mysql;
yum -y remove pdns-server;
yum -y remove pdns-server-backend-mysql;
yum clean all;
rm -rf /usr/bin/zppy;
rm -rf /usr/bin/setso;
rm -rf /usr/bin/setzadmin;
rm -rf /var/zpanel;
rm -rf /etc/zpanel;
rm -rf /var/lib/mysql;
rm -rf ~/.my.cnf;
rm -rf /var/spool/vacation/vacation.pl;
rm -rf /var/lib/dovecot/sieve;

 

sumber : http://mixhi.com/vps-tips/838/how-to-remove-zpanel-control-panel-from-centos-vps/

Login as a root user and type the following yum command:
$ sudo yum erase httpd httpd-tools apr apr-util
OR
# yum erase httpd httpd-tools apr apr-util
Sample outputs:

Loaded plugins: downloadonly, fastestmirror, security
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package apr.x86_64 0:1.3.9-5.el6_2 will be erased
---> Package apr-util.x86_64 0:1.3.9-3.el6_0.1 will be erased
--> Processing Dependency: apr-util = 1.3.9-3.el6_0.1 for package: apr-util-ldap-1.3.9-3.el6_0.1.x86_64
---> Package httpd.x86_64 0:2.2.15-29.el6.centos will be erased
---> Package httpd-tools.x86_64 0:2.2.15-29.el6.centos will be erased
--> Running transaction check
---> Package apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 will be erased
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package             Arch         Version                     Repository   Size
================================================================================
Removing:
 apr                 x86_64       1.3.9-5.el6_2               @base       296 k
 apr-util            x86_64       1.3.9-3.el6_0.1             @base       198 k
 httpd               x86_64       2.2.15-29.el6.centos        @base       2.9 M
 httpd-tools         x86_64       2.2.15-29.el6.centos        @base       137 k
Removing for dependencies:
 apr-util-ldap       x86_64       1.3.9-3.el6_0.1             @base       9.3 k
 
Transaction Summary
================================================================================
Remove        5 Package(s)
 
Installed size: 3.6 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : httpd-2.2.15-29.el6.centos.x86_64                            1/5
  Erasing    : httpd-tools-2.2.15-29.el6.centos.x86_64                      2/5
  Erasing    : apr-util-ldap-1.3.9-3.el6_0.1.x86_64                         3/5
  Erasing    : apr-util-1.3.9-3.el6_0.1.x86_64                              4/5
  Erasing    : apr-1.3.9-5.el6_2.x86_64                                     5/5
  Verifying  : httpd-2.2.15-29.el6.centos.x86_64                            1/5
  Verifying  : apr-util-ldap-1.3.9-3.el6_0.1.x86_64                         2/5
  Verifying  : httpd-tools-2.2.15-29.el6.centos.x86_64                      3/5
  Verifying  : apr-util-1.3.9-3.el6_0.1.x86_64                              4/5
  Verifying  : apr-1.3.9-5.el6_2.x86_64                                     5/5
 
Removed:
  apr.x86_64 0:1.3.9-5.el6_2          apr-util.x86_64 0:1.3.9-3.el6_0.1
  httpd.x86_64 0:2.2.15-29.el6.centos httpd-tools.x86_64 0:2.2.15-29.el6.centos
 
Dependency Removed:
  apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1
 
Complete!

Update you firewall config

You need to edit /etc/sysconfig/iptables and remove line that allows TCP port 80/443 for Apache:
# vi /etc/sysconfig/iptables
Find and remove line as follows:

## open port 80 /443 ##
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT

Save and close the file. Restart iptables:
# service iptables restart
You need to repeat the same steps for ip6tables – IPv6 packet filter by editing/etc/sysconfig/ip6tables
# vi /etc/sysconfig/ip6tables
Find and remove line as follows:

## open port 80 /443 for IPv6 ##
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT

Save and close the file. Restart the ip6tables service:
# service ip6tables restart

Related media

Sumber : http://www.cyberciti.biz/faq/uninstall-apache-redhat-centos-rhel-fedora-linux-command/