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 huupv@172.16....

How to Restrict Sending to Distribution list in zimbra mail

Image
Introduction Managing email distribution lists efficiently is crucial for maintaining effective communication within an organization. Zimbra provides various features to help administrators control who can send messages to specific distribution lists, ensuring that only authorized users can use this function.  In this article, we will guide you through the process of restricting sending permissions to distribution lists in Zimbra , helping you maintain a streamlined and secure email system. 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. $zmp...

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
Introduction Learn how to set up Keepalived for IP failover on CentOS and Red Hat. This step-by-step guide ensures high availability and network redundancy, keeping your critical services online during hardware or network failures. In the world of high availability and network redundancy, ensuring that your critical services remain operational despite hardware or network failures is paramount. Keepalived is a robust and versatile tool designed to provide IP failover solutions on Linux servers, particularly on CentOS and Red Hat distributions. This guide delves into the configuration and deployment of Keepalived for IP failover, ensuring that your services continue to run smoothly even in the face of unexpected downtimes. Whether you're an IT professional aiming to bolster your infrastructure or a systems administrator looking to implement a reliable failover mechanism, this tutorial offers step-by-step instructions to help you achieve high availability with Keepalived. Keepalived ...

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   ...