Posts

Showing posts from December, 2016

How to Setup Chroot SFTP in Linux

Image
How to Setup Chroot SFTP in Linux, it's allow only SFTP, not SSH. I'm running commands as root account. Step 1: To create group groupadd sftpusers Step 2: To create user useradd -g sftpusers -d /home/huupv -s /sbin/nologin huupv passwd huupv Step 3: Setup sftp-server Subsystem in sshd_config  vim /etc/ssh/sshd_config The output as bellow #Subsystem       sftp    /usr/libexec/openssh/sftp-server Subsystem       sftp    internal-sftp Step 4: Specify Chroot Directory for a Group vim /etc/ssh/sshd_config Adding line as following Match Group sftpusers         ChrootDirectory /sftp/%u         ForceCommand internal-sftp Step 5: To create sftp Home Directory mkdir -p /sftp/huupv/home/huupv Step 6: To setup Appropriate Permission chown huupv:sftpusers /sftp/huupv/home/huupv service sshd restart Test chroot sftp To connect from client ssh to server. ssh [email protected] The output as bellow [email protected]'s password: This service all

How to Restrict Sending to Distribution list in zimbra mail

Image
How to Restrict Sending to Distribution list in zimbra mail. in my post, i'm use to zimbra 8.6 open source edit. Links to below you maybe likes: zimbra custom spamassassin rules How to create auto Bcc for Recipient mails for Zimbra 8.6 How to add spam filters on zimbra 8.6 How to create auto Bcc for sender mails for Zimbra 8.6 list accounts that has not logged in for the last x days in zimbra Step 1:  if you have not distribution list, you can create distribution list as bellow. $zmprov cdl [email protected] Add a member to a distribution list. Tip: You can add multiple members to a list from the administration console: $zmprov adlm [email protected] [email protected] $zmprov adlm [email protected] [email protected] Step 2: To enable milter services, two way From administration console to enable milter services To use command line to enable milter services. $zmprov ms `zmhostname` zimbraMilterServerEnabled TRUE $zmmailboxdctl restart

How to Install and Configure Zimbra 8.6 Multi master ldap

Image
How to Install and Configure Zimbra 8.6 Multi master ldap, my post install multi master ldap, the script for zimbra 8.6 multi-master ldap. Zimbra ldap01 Hostname: ldap01.huuphan.local ip address: 192.168.131.15 Zimbra ldap02 Hostname: ldap02.huuphan.local ip address: 192.168.131.16 you can how to install and configure zimbra multi server Enabling Multi-Master Replication on zimbra ldap01 #su zimbra $ cd /opt/zimbra/ $./libexec/zmldapenable-mmr -s 1 -m ldap://ldap02.huuphan.local:389/ $zmlocalconfig -e ldap_master_url="ldap://ldap01.huuphan.local:389 ldap://ldap02.huuphan.local:389" $zmlocalconfig -e ldap_url="ldap://ldap01.huuphan.local:389 ldap://ldap02.huuphan.local:389" Installing a secondary Master ldap02 server The first, Two ldap01 and ldap02 the same password. From ldap01 $zmlocalconfig -s | grep passw | grep ldap Let's go install ldap02. ./install.sh The ouput [root@ldap02 zcs]# ./install.sh Operations logged to /tmp/in

KeepAlived IP Failover on CentOS & Red Hat

Image
Links to below you maybe likes: How to install php7 on centos 6 How to install and configure redmine on centos 6 How to owncloud 9 install ssl certificate centos 7 How To Install the BIND DNS Server on CentOS 6 KeepAlived IP Failover on CentOS & Red Hat Keepalived use highly available to make Virtual IP call VIP . it's a linux implementation make of VRRP my post, use keepAlived IP Failover on CentOS & Red Hat. I'm running commands as root account. Links to below you maybe likes: How to install php7 on centos 6 How to install and configure redmine on centos 6 How to owncloud 9 install ssl certificate centos 7 How To Install the BIND DNS Server on CentOS 6 KeepAlived IP Failover on CentOS & Red Hat To install keepalived on centos  yum update -y yum install -y keepalived To configure keepalived On Node 1 ! Configuration File for keepalived global_defs {    notification_email {      [email protected]      [email protected]    }    notif

Bash Scripting Made Simple: Practical Examples

Bash Scripting Made Simple: Explore practical examples to streamline your workflow and enhance your bash scripting skills effortlessly. List all IP addresses connected to Server Discovering all IP addresses connected to the server is essential for network monitoring and security. Utilize tools like netstat or ss commands to obtain this information efficiently. #!/bin/bash while true; do echo "CTRL+C TO BREAK" netstat -tnu | grep :22 | awk '{print $5}' | cut -f1 -d : | sort | uniq -c | sort -nr | head -n 8 sleep 15 clear done ########################################################################################### # site: huuphan.com # author: phan van huu # List all IP addresses connected to Server # For example: list ip address connected to server via ssh port 22 # awk '{print $5}' | cut -f1 -d : | sort | uniq -c | sort -nr | head -n 8 # awk '{print $5}': the display 5th field only # sort | uniq -c | sort -nr: Sort the list, group it

How to install zimbra proxy

Image
in this post, to use zimbra 8.6."How to install zimbra proxy". To prepare the package for install zimbra proxy via to  how to install and configure zimbra multi server .  To step by step as the below: Zimbra proxy install two package: zimbra-proxy and zimbra-memcached Download and install the zimbra open source #wget -c https://files.zimbra.com/downloads/8.6.0_GA/zcs-8.6.0_GA_1153.RHEL6_64.20141215151155.tgz -O zimbra-8.6.0_GA.tgz #tar zxvf zimbra-8.6.0_GA.tgz #cd zimbra-8.6.0_GA # ./install.sh The output: Operations logged to /tmp/install.log.1225 Checking for existing installation...     zimbra-ldap...NOT FOUND     zimbra-logger...NOT FOUND     zimbra-mta...NOT FOUND     zimbra-dnscache...NOT FOUND     zimbra-snmp...NOT FOUND     zimbra-store...NOT FOUND     zimbra-apache...NOT FOUND     zimbra-spell...NOT FOUND     zimbra-convertd...NOT FOUND     zimbra-memcached...NOT FOUND     zimbra-proxy...NOT FOUND     zimbra-archiving...NOT FOUND