TENTANG IPTABLES di Centos


Status
Not open for further replies.

Multyhost

Poster 2.0
Apakah Ada Yang Tau Cara Aktifkan IPTABLES dan Setting IPTABLES di Centos ?

maaf jika repost,:17: karena saya masih newby pol hehehee
 

perdhanahost

Hosting Guru
Kalau mungkin karena satu atau lain sebab, ternyata iptables belum terinstall secara default, tinggal install via network (asumsi, servernya sudah konek ke internet):

# yum -y install iptables
 

ngaco

Apprentice 1.0
# system-config-securitylevel-tui
 

Multyhost

Poster 2.0
mungkin abang2 bos ada yang mau nambahin lagi untuk settingan iptables, karena saya masih bingung cara settingnya
soalnya saya dah setting seperti yang dibawah ini :

Code:
# yum -y install httpd
# yum -y install php
# yum -y install mysql
# yum -y install mysql-server
# yum -y install php-mysql

# /sbin/chkconfig httpd on
# /sbin/chkconfig --add mysqld
# /sbin/chkconfig mysqld on
# /sbin/service httpd start
# /sbin/service mysqld start

# mysqladmin -u root password 'new-password'

# iptables -F
# iptables -A INPUT -p udp -m udp --dport domain -j ACCEPT
# iptables -A INPUT -p tcp --dport 22 -j ACCEPT
# iptables -A INPUT -p tcp --dport 10000 -j ACCEPT
# iptables -A INPUT -p tcp --dport 25 -j ACCEPT
# iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
# iptables -A INPUT -p tcp --dport 80 -j ACCEPT
# iptables -A INPUT -p tcp -m tcp --dport domain -j ACCEPT
# iptables -A FORWARD -o eth0 -j LOG  --log-level 7 --log-prefix BANDWIDTH_OUT:
# iptables -A FORWARD -i eth0 -j LOG  --log-level 7 --log-prefix BANDWIDTH_IN:
# iptables -A OUTPUT -o eth0 -j LOG  --log-level 7 --log-prefix BANDWIDTH_OUT:
# iptables -A INPUT -i eth0 -j LOG  --log-level 7 --log-prefix BANDWIDTH_IN:

# /sbin/service iptables save

now just restart your firewall

# /etc/init.d/iptables restart

# reboot

Akan tetapi ip flooder masih aja bisa masuk dan bikin rto server saya, Server saya pergunakan sebagai Server Camfrog Video Chat.
Mungkin abang2 boss master/suhu ada yang bisa kasih pencerahan untuk settingan iptables untuk Camfrog Video chat :63:

sebelumnya saya ucapkan terimakasih
 

arieonline

Expert 1.0
Code:
# iptables -F
# iptables -A INPUT -p udp -m udp --dport domain -j ACCEPT
# iptables -A INPUT -p tcp --dport 22 -j ACCEPT
# iptables -A INPUT -p tcp --dport 10000 -j ACCEPT
# iptables -A INPUT -p tcp --dport 25 -j ACCEPT
# iptables -A INPUT -p tcp --dport 8080 -j ACCEPT
# iptables -A INPUT -p tcp --dport 80 -j ACCEPT
# iptables -A INPUT -p tcp -m tcp --dport domain -j ACCEPT
# iptables -A FORWARD -o eth0 -j LOG  --log-level 7 --log-prefix BANDWIDTH_OUT:
# iptables -A FORWARD -i eth0 -j LOG  --log-level 7 --log-prefix BANDWIDTH_IN:
# iptables -A OUTPUT -o eth0 -j LOG  --log-level 7 --log-prefix BANDWIDTH_OUT:
# iptables -A INPUT -i eth0 -j LOG  --log-level 7 --log-prefix BANDWIDTH_IN:
menurut saya dijalankan ato tidak firewall di atas tidak ngaruh, karena sepengetahuan saya itu accept semua, tidak ada yg di-DROP
 

ngaco

Apprentice 1.0
root@xxxxxxxx [~]# system-config-securitylevel-tui
-bash: system-config-securitylevel-tui: command not found

kok kluarnya gitu ya :confused:

Itu namanya paket/appsnya ga ada, harus install dulu...

yum install system-config-securitylevel-tui

Untuk block itu pake -j REJECT atau -j DROP. Tapi hati-hati ya nge-DROP, jangan sampe port remote (22/ssh) yang di DROP :D
 

Multyhost

Poster 2.0
Itu namanya paket/appsnya ga ada, harus install dulu...

yum install system-config-securitylevel-tui

Untuk block itu pake -j REJECT atau -j DROP. Tapi hati-hati ya nge-DROP, jangan sampe port remote (22/ssh) yang di DROP :D

Tanks boss saya coba dulu, moga aja berhasil :111:
 
Status
Not open for further replies.

Top