Mam problem z iptables, wydaje mi się iż nie blokuje dostępu do serwera.
Plik z zaporą wygląda tak:
Kod: Zaznacz cały
iptables -X
iptables -F
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -i eth0 -p all -s 176.9.162.161 -j DROP
iptables -A INPUT -i eth0 -p all -s 192.168.125.30 -j DROP
iptables -A INPUT -i eth0 -p all -s 46.20.14.106 -j DROP
iptables -A INPUT -i eth0 -p all -s 81.248.0.166 -j DROP
iptables -A INPUT -i eth0 -p all -s 94.254.129.247 -j DROP
iptables -A INPUT -i eth0 -p all -s 94.254.210.224 -j DROP
iptables -A INPUT -m state --state ESTABLISHED -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 25 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 143 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 995 -j ACCEPT
iptables -A INPUT -i eth0 -p tcp --dport 110 -j ACCEPT
Kod: Zaznacz cały
root@debian:~# iptables -L -v
Chain INPUT (policy DROP 10 packets, 1409 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- lo any anywhere anywhere
0 0 DROP all -- eth0 any mx1.bshellz.pl anywhere
1 231 DROP all -- eth0 any 192.168.125.30 anywhere
0 0 DROP all -- eth0 any ns1.datafem.net anywhere
0 0 DROP all -- eth0 any LLamentin-151-1-166.w81-248.abo.wanadoo.fr anywhere
0 0 DROP all -- eth0 any user-94-254-129-247.play-internet.pl anywhere
0 0 DROP all -- eth0 any user-94-254-210-224.play-internet.pl anywhere
95 7340 ACCEPT all -- any any anywhere anywhere state ESTABLISHED
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:www
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:ssh
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:smtp
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:imap2
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt :p op3s
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt :p op3
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 61 packets, 9696 bytes)
pkts bytes target prot opt in out source destination
root@debian:~#
Jeśli powyższe skrypty są poprawne to czemu w logach serwera pocztowego widzę próby połączenia z 81.248.0.166
Kod: Zaznacz cały
Apr 6 11:38:42 debian postfix/smtpd[4095]: warning: Connection rate limit exceeded: 6 from LLamentin-151-1-166.w81-248.abo.wanadoo.fr[81.248.0.166] for service smtp
Apr 6 11:38:42 debian postfix/smtpd[4095]: disconnect from LLamentin-151-1-166.w81-248.abo.wanadoo.fr[81.248.0.166]
Apr 6 11:39:32 debian postfix/smtpd[3874]: timeout after AUTH from LLamentin-151-1-166.w81-248.abo.wanadoo.fr[81.248.0.166]
Apr 6 11:39:32 debian postfix/smtpd[3874]: disconnect from LLamentin-151-1-166.w81-248.abo.wanadoo.fr[81.248.0.166]
Apr 6 11:39:36 debian postfix/smtpd[3870]: timeout after AUTH from LLamentin-151-1-166.w81-248.abo.wanadoo.fr[81.248.0.166]
Apr 6 11:39:36 debian postfix/smtpd[3870]: disconnect from LLamentin-151-1-166.w81-248.abo.wanadoo.fr[81.248.0.166]