Tuesday, January 20, 2015

usb boot able by unetbootin

Create boot from USB from ubuntu
* Install by apt-get
sudo add-apt-repository ppa:gezakovacs/ppa
sudo apt-get update
sudo apt-get install unetbootin

Ref:
unetbootin

1.#Install unetbootin by download from website http://unetbootin.sourceforge.net/#install
2. how to use
chmod +x unetbootin-linux-608
3. execute program
./unetbootin-linux-608







Wednesday, January 14, 2015

encrypt file การเข้ารหัสไฟล์เอกสาร

1. Install programe

sudo aptitude install ccrypt

2. Zip file
tar cjvf file.tar.bz2 file  for creat file .bz2

3. Encrypt file

sudo ccrypt file.tar.bz2

4. Decrypt file

sudo ccrypt -d .file.tar.bz2.cpt


Wednesday, January 7, 2015

เซทให้ส่งเมลได้เฉพาะภายในโดเมนหรือบางโดเมน

1. แก้ไขไฟล์ /etc/postfix/main.cf

myhostname = mailgw.domain.com
mydomain = domain.com
myorigin = $myhostname
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain $mydomain
#mynetworks = hash:/etc/postfix/network_table
mynetworks = 192.168.0.0/24, 10.10.10.0/24
relay_domains = domain.com
transport_maps = hash:/etc/postfix/transport
append_at_myorigin = no
broken_sasl_auth_clients = yes
smtpd_banner = My companee
relayhost = 192.xx.xx.xx
disable_dns_lookups = yes
smtpd_restriction_classes = local_only, local_plus
local_only = reject_unauth_destination
local_plus = check_recipient_access hash:/etc/postfix/local_plus reject_unauth_destination
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/restricted_users
header_checks = regexp:/etc/postfix/header_checks

2. สร้างไฟล์ที่ยอมให้ส่งเมลไปยังที่ไดได้บ้าง /etc/postfix/local_plus

# /etc/postfix/local_plus
# this file contains allowed destinations for users restricted to local_plus
# postmap this file after changes
domain.com OK
domain.org OK
domain.in.th OK

#postmap /etc/postfix/local_plus

3. สร้างไฟล์ที่ไม่ให้ user คนนั้น ๆ ส่งเมลออกภายนอกได้ /etc/postfix/restricted_users

email@domain.com local_plus
email@domain.in.th local_plus

#postmap /etc/postfix/restricted_users

4. แก้ไขไฟล์ /etc/postfix/transport

domain.com                      smtp:mail.mailserver.com:25

#postmap /etc/postfix/transport