Архив за месяц: Январь 2014

Webmin Centos 6 install

Устанавливаем ключ

1
rpm --import http://www.webmin.com/jcameron-key.asc
rpm --import http://www.webmin.com/jcameron-key.asc

Репо файл

1
vi /etc/yum.repos.d/webmin.repo
vi /etc/yum.repos.d/webmin.repo
1
2
3
4
[Webmin]
name=Webmin Distribution Neutral
baseurl=http://download.webmin.com/download/yum
enabled=1
[Webmin]
name=Webmin Distribution Neutral
baseurl=http://download.webmin.com/download/yum
enabled=1

Установка

1
yum install webmin
yum install webmin

Добавляем в автозагрузку

1
chkconfig webmin on
chkconfig webmin on

Настройки

1
/etc/webmin/miniserv.conf
/etc/webmin/miniserv.conf

Ограничение количества писем в exim

1
vi /etc/exim/exim.conf
vi /etc/exim/exim.conf

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
acl_not_smtp = acl_not_smtp
 
######
begin acl
######
 
acl_not_smtp:
deny message = Sender rate overlimit - $sender_rate / $sender_rate_period
ratelimit = 50 / 1h / leaky
accept
 
acl_check_rcpt:
deny message = Sender rate SMTP overlimit - $sender_rate / $sender_rate_period
ratelimit = 100 / 1h / leaky
 
accept hosts = net-lsearch;/etc/exim/whitelist
acl_not_smtp = acl_not_smtp

######
begin acl
######

acl_not_smtp:
deny message = Sender rate overlimit - $sender_rate / $sender_rate_period
ratelimit = 50 / 1h / leaky
accept

acl_check_rcpt:
deny message = Sender rate SMTP overlimit - $sender_rate / $sender_rate_period
ratelimit = 100 / 1h / leaky

accept hosts = net-lsearch;/etc/exim/whitelist

50 писем в час для почты отправленной по phpmail и в 100 писем для отправки через SMTP

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