: 12 grudnia 2010, 17:48
shyte, masz sklejone cztery tematy dotyczące serwera bo zbytnio się zacząłeś rozdrabniać.
Polski portal użytkowników dystrybucji Debian GNU/Linux, dyskusje, artykuły, nowości, blog, porady, pomoc.
https://593930.wb34atkl.asia/
Kod: Zaznacz cały
#!/bin/bash
# czyszczenie
iptables -F INPUT
iptables -P INPUT ACCEPT
iptables -F OUTPUT
iptables -P INPUT ACCEPT
iptables -F FORWARD
iptables -P INPUT ACCEPT
iptables -X -t filter
# domyślna polityka
iptables -P INPUT DROP
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT
# www
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
Kod: Zaznacz cały
/etc/firewal.sh
Kod: Zaznacz cały
chmod 700 /etc/firewal.sh
Kod: Zaznacz cały
/etc/rc.local
Kod: Zaznacz cały
/etc/firewal.sh
Kod: Zaznacz cały
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/etc/firewal.sh
exit 0
Kod: Zaznacz cały
iptables -A INPUT -i eth0 -p tcp -j ACCEPT -m state --state NEW -d ipmojegoserwera --destination-port 21
Kod: Zaznacz cały
/etc/firewal.sh
Kod: Zaznacz cały
#!/bin/bash
# czyszczenie
iptables -F INPUT
iptables -P INPUT ACCEPT
iptables -F OUTPUT
iptables -P INPUT ACCEPT
iptables -F FORWARD
iptables -P INPUT ACCEPT
iptables -X -t filter
# domyślna polityka
iptables -P INPUT DROP
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT
# www
iptables -A INPUT -p TCP --dport 53 -j DROP
iptables -A INPUT -p TCP --dport 106 -j DROP
iptables -A INPUT -p TCP --dport 139 -j DROP
iptables -A INPUT -p TCP --dport 143 -j DROP
iptables -A INPUT -p TCP --dport 445 -j DROP
iptables -A INPUT -p TCP --dport 993 -j DROP
iptables -A INPUT -p TCP --dport 465 -j DROP
Kod: Zaznacz cały
/etc/rc.local
Kod: Zaznacz cały
#!/bin/bash
# czyszczenie
iptables -F
iptables -X
# domyślna polityka
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
# www
iptables -A INPUT -p TCP --dport 53 -j DROP
iptables -A INPUT -p TCP --dport 106 -j DROP
iptables -A INPUT -p TCP --dport 139 -j DROP
iptables -A INPUT -p TCP --dport 143 -j DROP
iptables -A INPUT -p TCP --dport 445 -j DROP
iptables -A INPUT -p TCP --dport 993 -j DROP
iptables -A INPUT -p TCP --dport 465 -j DROP
Kod: Zaznacz cały
/var/log/auth.log
Kod: Zaznacz cały
Dec 12 20:40:39 h1765292 proftpd[5932]: h1765292 (218.57.179.186[218.57.179.186]) - FTP session closed.
Dec 12 20:40:40 h1765292 proftpd[5947]: h1765292 (218.57.179.186[218.57.179.186]) - USER filmypsppl: no such user found from 218.57.179.186 [218.57.17$
Dec 12 20:40:41 h1765292 proftpd[5947]: h1765292 (218.57.179.186[218.57.179.186]) - FTP session closed.
Dec 12 20:40:42 h1765292 proftpd: pam_unix(proftpd:auth): authentication failure; logname= uid=0 euid=0 tty=/dev/ftpd5948 ruser=filmypsp rhost=218.57.179.186 user=fil$
Dec 12 20:40:44 h1765292 proftpd[5948]: h1765292 (218.57.179.186[218.57.179.186]) - USER filmypsp (Login failed): Incorrect password.
Dec 12 20:40:44 h1765292 proftpd[5948]: h1765292 (218.57.179.186[218.57.179.186]) - FTP session closed.
Dec 12 20:40:46 h1765292 proftpd[5964]: h1765292 (218.57.179.186[218.57.179.186]) - USER filmypsppl: no such user found from 218.57.179.186 [218.57.17$
Dec 12 20:40:46 h1765292 proftpd[5964]: h1765292 (218.57.179.186[218.57.179.186]) - FTP session closed.
Dec 12 20:40:47 h1765292 proftpd: pam_unix(proftpd:auth): authentication failure; logname= uid=0 euid=0 tty=/dev/ftpd5981 ruser=filmypsp rhost=218.57.179.186 user=fil$
Dec 12 20:40:49 h1765292 proftpd[5981]: h1765292 (218.57.179.186[218.57.179.186]) - USER filmypsp (Login failed): Incorrect password
Dec 12 20:40:49 h1765292 proftpd[5981]: h1765292 (218.57.179.186[218.57.179.186]) - FTP session closed.
Dec 12 20:40:51 h1765292 proftpd[5982]: h1765292 (218.57.179.186[218.57.179.186]) - USER filmypsppl: no such user found from 218.57.179.186 [218.57.17$
Dec 12 20:40:51 h1765292 proftpd[5982]: h1765292 (218.57.179.186[218.57.179.186]) - FTP session closed.
Dec 12 20:40:52 h1765292 proftpd: pam_unix(proftpd:auth): authentication failure; logname= uid=0 euid=0 tty=/dev/ftpd5983 ruser=filmypsp rhost=218.57.179.186 user=fil$
Dec 12 20:40:54 h1765292 proftpd[5983]: h1765292 (218.57.179.186[218.57.179.186]) - USER filmypsp (Login failed): Incorrect password.
Dec 12 20:40:54 h1765292 proftpd[5983]: h1765292 (218.57.179.186[218.57.179.186]) - FTP session closed.
Dec 12 20:40:56 h1765292 proftpd[5991]: h1765292 (218.57.179.186[218.57.179.186]) - USER filmypsppl: no such user found from 218.57.179.186 [218.57.17$
Dec 12 20:40:56 h1765292 proftpd[5991]: h1765292 (218.57.179.186[218.57.179.186]) - FTP session closed.
Dec 12 20:40:57 h1765292 proftpd: pam_unix(proftpd:auth): authentication failure; logname= uid=0 euid=0 tty=/dev/ftpd6000 ruser=filmypsp rhost=218.57.179.186 user=fil$
Dec 12 20:40:59 h1765292 proftpd[6000]: h1765292 (218.57.179.186[218.57.179.186]) - USER filmypsp (Login failed): Incorrect password.
Dec 12 20:40:59 h1765292 proftpd[6000]: h1765292 (218.57.179.186[218.57.179.186]) - FTP session closed.
Dec 12 20:41:01 h1765292 proftpd[6001]: h1765292 (218.57.179.186[218.57.179.186]) - USER filmypsppl: no such user found from 218.57.179.186 [218.57.17$
Dec 12 20:41:01 h1765292 proftpd[6001]: h1765292 (218.57.179.186[218.57.179.186]) - FTP session closed.