Firewall Vesta

1
vi /etc/sysconfig/iptables
vi /etc/sysconfig/iptables
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Generated by iptables-save v1.4.7 on Fri Jun 7 14:37:21 2013
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
#ftp
-A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
#ssh
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
#smtp
-A INPUT -p tcp -m state --state NEW -m tcp --dport 25 -j ACCEPT
#pop
-A INPUT -p tcp -m state --state NEW -m tcp --dport 110 -j ACCEPT
#dns
-A INPUT -p tcp -m state --state NEW -m tcp --dport 53 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 53 -j ACCEPT
#http
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
#
-A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
#vesta
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8083 -j ACCEPT
#ftp passive ports
-A INPUT -p tcp -m state --state NEW -m tcp --dport 12000:12100 -j ACCEPT
#webmin
-A INPUT -p tcp -m state --state NEW -m tcp --dport 10000 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Fri Jun 7 14:37:21 2013
# Generated by iptables-save v1.4.7 on Fri Jun 7 14:37:21 2013
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
#ftp
-A INPUT -p tcp -m state --state NEW -m tcp --dport 21 -j ACCEPT
#ssh
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
#smtp
-A INPUT -p tcp -m state --state NEW -m tcp --dport 25 -j ACCEPT
#pop
-A INPUT -p tcp -m state --state NEW -m tcp --dport 110 -j ACCEPT
#dns
-A INPUT -p tcp -m state --state NEW -m tcp --dport 53 -j ACCEPT
-A INPUT -p udp -m state --state NEW -m udp --dport 53 -j ACCEPT
#http
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
#
-A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT
#vesta
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8083 -j ACCEPT
#ftp passive ports
-A INPUT -p tcp -m state --state NEW -m tcp --dport 12000:12100 -j ACCEPT
#webmin
-A INPUT -p tcp -m state --state NEW -m tcp --dport 10000 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Fri Jun 7 14:37:21 2013

загрузка при старте

1
chkconfig iptables on
chkconfig iptables on

запуск

1
service iptables start
service iptables start

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *