iklan

Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

How to Set or Change the Time Zone in Linux

 Checking the current Time Zone

#timedatectl

the ouput will show that the system's zone is set 

Changing the Time Zone in Linux

#timedatectl list-timezones

output list timezones


One you identify which time zone is accurate to your location, run the following command as root or sudo user :

#timedatectl set-timezone <your_time_zone>


Thanks

Samh

How to send linux logs to SIEM

 #nano /etc/rsyslog.com

add ip:port at the bottom

example :

*.*@192.168.10.8:514 --> this is IP Siem, send all log to Siem

kernel.*@192.168.10.514 --> only send logs kernel to Siem

restart services rsyslog

#systemctl restart rsyslog


Thx

Samh

Merubah manual Date/Time pada Linux

Cara merubah manual date/time pada Linux

ketikan command dibawah :

#date --set="2 OCT 2016 18:00:00"




Salam,
Hamzah Sam

Kirim Email Via CLI atau Command Prompt

Cara manual kirim email via telnet port 25

langkahnya bisa ikuti step berikut

1. Buka Command prompt (start>run>cmd pada produk windows)
2. ketik "telnet [ip mail server atau mailgw] 25 jangan lupa port


3. ketik "helo domainanda.com


4. ketik "mail from :"


5. ketik "rcpt to "

6. ketik "data"

7. ketik "subject:subject email"

8. ketik "isi email body"








Cara Remote Linux dari Windows dengan Remote Desktop

Install xrdp

[root@user~]# yum install xrdp

aktifkan atau jalan service aplikasi xrdp ini

[root@user~]#/etc/init.d/xrdp start

setelah berhasil install dan servicenya jalan
sudah bisa remote linux yang di install xrdp ini dari windows

caranya

- buka remote desktop dari windows (mstsc)
- masuk ip linux login menggunkan root atau user

salam
Hamzah Sam

Cara Menutup Close Relay pada Postfix

Tambahkan scrips berikut pada main.cf

smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination
smtpd_delay_reject = yes
smtpd_sasl_auth_enabled = yes


Salam
Hamzah Sam

Mengaktifkan Module Apache di Ubuntu

#sudo a2enmod ssl
#sudo a2enmod expires
#sudo a2enmod dir
#sudo a2enmod inlcude

restart apache
module ini salah satu requirements untuk install KLMS (Kaspersky Linux Mail Security)


Salam
Hamzah Sam

Cara merubah hostname linux CentOS 6

* Cara Merubah Hostname

vim /etc/hosts

127.0.0.1  localhost.localdomain localhost
: :1            localhost6.localdomain6 localhost6
172.32.2.241 sam-pc  (tambahkan ip dan hostname yang di inginkan)


vim /etc/sysconfig/network

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=sam-pc (samakan dengan hostname /etc/hosts)






Salam
Hamzah Sam

Command agar service linux berjalan otomatis setelah restart

jika reboot PC Linux maka service tertentu akan stop, contoh service sshd

nah bagaimana jika service tersebut berjalan secara otomatis jika reboot atau restart PC
bisa menggunakan command berikut :

chkconfig sshd on
chkconfig httpd on







Salam
Hamzah Sam

Mail Relay Multi-Domain

Configuration Main.cf bisa bisa dilihat dari posting Mail Relay Dengan CentOS 6

* Multi-Domain

Tambahkan command berikut di Main.cf

relay_domains = syem.com, syem1.com
transport_maps = hash:/etc/postfix/transport


* Transport /etc/postfix/transport
syem.com smtp:[172.32.2.15] (Ip/Domain)
syem1.com smtp:[172.32.2.20]


*Postmap

postmap /etc/postfix/transport
service postfix restart




Salam
Hamzah Sam




Mail Relay Dengan CentOS 6

* Install CentOS 6.2
* Update System
yum update

* Disable Services yang tidak dibutuhkan
service iptables stop
service ip6tables stop
service netfs stop
chkconfig iptables off
chkconfig ip6tables off
chkconfig netfs off

* Install Postfix
yum install postfix

* Configure Postfix
myhostname = klms.syem.com
mydomain = localhost
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, $mydomain
mynetwork_style = class

* Configure Postfix to Forward email
relay_domains = syem.com

relay_domains ini sebagai forward dari topologi jaringan saya (Internet--Firewall--Mail Relay--Mail Server)
jika lebih dari satu domain bisa menambahkan dengan koma atau space

tambahkan command berikut di akhir main.cf

transport_maps = hash:/etc/postfix/transport
mailbox_size_limit = 20480000
mailbox_size_limit = 20480000

tambahkan command berikut didalam akhir "/etc/postfix/transport"

syem.com smtp:[172.32.2.241]

command ini khusus untuk semua email akan diteruskan ke IP 172.32.2.241

jalankan command ini :
postmap /etc/postfix/transport

command ini untuk membuatkan tabel hash jika tidak mail relay tidak bekerja

dan terakhir tambahkan command ini di akhir main.cf

append_at_myorigin =  no

command ini untuk memastikan tidak memberikan info domain atau menambahkan header sendiri ke dalam
email

*Tes Mail Relay
stop dan restart postfix

service postfix stop
service postfix start


Salam
Hamzah Sam

Disable SElinux

#vim /etc/sysconfig/selinux


# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted

SELINUX=enforcing (ganti menjadi disable)



Salam 
Hamzah Sam

syntax error on line 43 of /etc/httpd/conf.d/klmsui.conf invalid command 'SSLEngine'

Error ini karena ssl belum di install

install ssl
#yum install mod_ssl

restart httpd
# /etc/init.d/httpd restart


Install Webmin on Linux


What is Webmin ?
Webmin is a web-based application tools for the system administrator on unix/linux, to use your webmin you can easily add user accounts, setting web server, DNS, File Sharing and other only throuhgt a web server, using webmin is not required again change konfiguration file /etc/passwd file manually, and we can do this from both local and remote

Install Webmin
I am here a manual installation on linux fedora 7 packages webmin means that i have download, please click here to download.

#rpm -i webmin-1.570-1.noarch.rpm


How to access Webmin

https://localhost:10000/