#LinuxTips Tahapan Pasca Installasi Centos Server. Firewall (3 dari 3)

0
1866
Halaman:
Sertakan sumber dengan jelas jika ingin mencopy. Selalu cek tanggal, karena mungkin ada beberapa artikel lama yang belum disesuaikan dengan fakta terbaru

Tahapan Pasca Installasi Centos Server. Setelah melakukan tahapan sebelumnya (Pengaturan jaringan dan  pengaturan aplikasi/service) Tahapan yang terakhir adalah Pengaturan Firewall.

Service dan aplikasi yang kita pasang  akan useless dan tidak bisa diakses oleh jaringan selama firewall belum dikonfigurasi.

Cara paling gampang adalah menon aktifkan firewall. Namun alangkah bijak bila kita bisa mengatur port tertentu yang di loloskan oleh firewall.

Sama halnya dengan linux yang lain, firewall pada centos bisa dikonfigurasi dengan perintah “iptables”




  • Melihat status firewall


[root@localhost ~]# service iptables status

Kita bisa membaca status port pada beberapa baris terakhir

Chain RH-Firewall-1-INPUT (2 references)
num  target     prot opt source               destination
1    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
2    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           icmp type 255
3    ACCEPT     esp  --  0.0.0.0/0            0.0.0.0/0
4    ACCEPT     ah   --  0.0.0.0/0            0.0.0.0/0
5    ACCEPT     udp  --  0.0.0.0/0            224.0.0.251         udp dpt:5353
6    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           udp dpt:631
7    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:631
8    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
9    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp multiport ports 10000
10   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpts:60000:65535
11   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp multiport ports 19999
12   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22
13   REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

  • Mematikan firewall
Artikel Terkait :  #SysAdm Install Wordpress pada Debian dan Permasalahannya


[root@localhost ~]# service iptables stop
Flushing firewall rules:                                   [  OK  ] Setting chains to policy ACCEPT: nat mangle filter         [  OK  ] Unloading iptables modules:                                [  OK  ]

  • Mengaktifkan firewall


[root@localhost ~]# service iptables start
Applying iptables firewall rules:                          [  OK  ] Loading additional iptables modules: ip_conntrack_netbios_n[  OK  ]

  • Merestart Firewall


[root@localhost ~]# service iptables restart
Flushing firewall rules:                                   [  OK  ] Setting chains to policy ACCEPT: nat mangle filter         [  OK  ] Unloading iptables modules:                                [  OK  ] Applying iptables firewall rules:                          [  OK  ] Loading additional iptables modules: ip_conntrack_netbios_n[  OK  ]

Untuk mempermudah pengaturan, sebaiknya matikan terlebih dahulu firewall, install webmin, kemudian firewall diatur di webmin karena lebih mudah.

Tahapan Pasca Installasi Centos Server. Tahapan Pasca Installasi Centos Server. Tahapan Pasca Installasi Centos Server

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.