• Share this text:
Report Abuse
Mail - posted by guest on 5th February 2020 05:47:31 PM

Fullname: admin

Username: nine

Password: 1234

------------------------------------------------------

sudo apt-get update -y

sudo apt-get upgrade -y

------------------------------------------------------

sudo apt-get install postfix

// เลือก Internet Site

// กำหนดโดเมน : npru.ct

sudo service postfix restart

sudo service postfix status

// ตรวจสอบสถานะว่า active ยัง

------------------------------------------------------

sudo apt-get install dovecot-imapd dovecot-pop3d

sudo service dovecot restart

------------------------------------------------------

sudo apt-get install apache2 php

------------------------------------------------------

wget https://sourceforge.net/projects/squirrelmail/files/stable/1.4.22/squirrelmail-webmail-1.4.22.zip

sudo apt-get install unzip

unzip squirrelmail-webmail-1.4.22.zip

sudo mv squirrelmail-webmail-1.4.22 /var/www/html/

sudo chown -R www-data:www-data /var/www/html/squirrelmail-webmail-1.4.22/

sudo chmod 755 -R /var/www/html/squirrelmail-webmail-1.4.22/

sudo mv /var/www/html/squirrelmail-webmail-1.4.22/ /var/www/html/squirrelmail

------------------------------------------------------

sudo perl /var/www/html/squirrelmail/config/conf.pl

// กด 2

// กด 1

// ใส่โดเมนที่ตั้งไว้ : npru.ct

// กด R

// กด 4

// กด 11

// กด S

// กด Q

------------------------------------------------------

sudo nano /etc/apache2/sites-available/000-default.conf

// แก้ DocumentRoot เป็น /var/www/html/squirrelmail

sudo systemctl restart apache2

------------------------------------------------------

sudo nano /var/www/html/squirrelmail/config/config.php

// แก้บรรทัด

$data_dir = "...." เป็น '/var/www/html/squirrelmail/data/';

$attachment_dir เป็น '/var/www/html/squirrelmail/attach/';

------------------------------------------------------

sudo ufw default deny incoming

sudo ufw default allow outgoing

sudo ufw allow 22,25,80,110,143,443,993,995/tcp

sudo ufw enable

// ติดตั้ง Firewall

------------------------------------------------------

##### Antivirus เลือกตัวใดตัวหนึ่ง GGEZ #####

sudo apt-get install rkhunter

// ติดตั้ง Antivirus ตัว Rkhunter

sudo rkhunter --propupd

// ติดตั้งแล้วให้ใช้คำสั่งนี้อัพเดทก่อน Scan

sudo rkhunter --checkall

// แสกนทั้งหมด

sudo cat /var/log/rkhunter.log | grep -i warning

// แสกนแบบย่อ ( ใช้หลัง sudo rkhunter --checkall น่ะครัช )

======================================================

sudo apt-get install chkrootkit

// ติดตั้ง Antivirus ตัว Chkrootkit

sudo chkrootkit

// แสกน

sudo chkrootkit | sudo tee /var/log/chkrootkit/chkrootkit.log

sudo cat /var/log/chkrootkit/chkrootkit.log | grep -i warning

------------------------------------------------------

sudo apt-get install spamassassin

// ติดตั้งตัว Filter

sudo pico /etc/mail/spamassassin/local.cf

// แก้บรรทัด #report_safe 1 เป็น report_safe 0 พร้อมเปิดใช้งาน (ลบ # ออก)

// แก้บรรทัด #required_score 5.0 ลบ # ออก (เปิดใช้งาน)

// แก้บรรทัด #rewrite_header Subject *****SPAM***** ลบ # ออก (เปิดใช้งาน)

sudo systemctl enable spamassassin

sudo systemctl start spamassassin

// สั่งให้เริ่มทำงาน

sudo sa-update

sudo useradd spamd -s /bin/false -d /var/log/spamassassin

sudo pico /etc/postfix/master.cf

// เลื่อนไปล่างสุดแล้วเพิ่ม spamassassin unix - n n - - pipe flags=R user=spamd argv=/usr/bin/spamc -e /usr/sbin/sendmail -oi -f ${sender$sender} ${recipient}

// แก้บรรทัด smtp เติมด้านหลัง smtpd -o content_filter=spamassassin

sudo systemctl restart postfix

***** ไม่ทำต่อแมร่งละ ***** ( ใช้คำสั่งแรกพอ กูติดตั้งอย่างเดียว )

------------------------------------------------------

ลองเข้าเว็บที่ IP เครื่อง Server (เช็ค IP ด้วยคำสั่ง ip a)

------------------------------------------------------

sudo useradd nine4485

// เพิ่ม user (หลัง useradd ให้ใส่ชื่ออะไรก้ได้ )

sudo passwd nine4485

// ตั้งรหัส : 4485

------------------------------------------------------

sudo mkdir -p /var/www/html/nine4485

sudo usermod -m -d /var/www/html/nine4485 nine4485

sudo chown -R nine4485:nine4485 /var/www/html/nine4485

------------------------------------------------------

Report Abuse

Login or Register to edit or copy and save this text. It's free.