вопрос о iptables
вопрос о iptables
При установке панели на CentOS 6.5 было предупреждение что iptables будет выключен.
Сервер остается без защиты? И как тогда настраивать iptables?
Сервер остается без защиты? И как тогда настраивать iptables?
-
- Support team
- Posts: 1047
- Joined: Fri Mar 21, 2014 7:49 am
- Contact:
- Os: CentOS 6x
- Web: apache + nginx
Re: вопрос о iptables
А что мешает его включить? Оо
Re: вопрос о iptables
он как-то включается особым образом? как его веста выключает?Alex Connor wrote:А что мешает его включить? Оо
Re: вопрос о iptables
Включить файервол в Centos
Пример простого файервола, файл /etc/sysconfig/iptables
Code: Select all
chkconfig iptables on
chkconfig --list iptables
service iptables start
Code: Select all
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -m comment --comment "FTP" -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -m comment --comment "SSH" -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport http -m comment --comment "HTTP" -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport https -m comment --comment "HTTPS" -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8083 -m comment --comment "Vesta" -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp -m multiport --dports pop3,pop3s,imap,imaps -m comment --comment "Dovecot" -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp -m multiport --dports smtp,smtps,submission -m comment --comment "Exim" -j ACCEPT
-A INPUT -j DROP
-A FORWARD -j DROP
COMMIT