Posts

Showing posts from January, 2017

How to ssh tunnel in linux

Image
How to ssh port forwarding ( ssh tunneling) in linux. For example, Client [localhost:10000] ---> Server 1 [port:1111]----->Server 2 [port:22] Server 1 ip address: 192.168.1.12 port: 1111 Server 2 ip address: 192.168.1.13 port: 22 From client, how to login ssh to Server2 via Server1. ssh -p 1111 -f [email protected] -L 10000:[email protected]:22  -N ssh -p 10000 root@localhost From client, how to copy files to Server2? scp -r -P 10000 /path/to/file root@localhost:/path/to/folder

Script to prepare necessary package for install zimbra 8.6

Image
Script to prepare necessary package for install zimbra 8.6 #!/bin/bash #Author: Phan Van Huu #Blog: huuphan.com RED='\033[0;31m' BLUE='\033[0;34m' NC='\033[0m' #No color ############## Prepair for install Zimbra(OS: Centos 6).################# ifconfig | grep "inet addr" && route | grep default #echo -e "$BLUE ############## Prepair for Zimbra(OS: Centos 6).################# $NC" #echo -e "" echo -e "$BLUE 1.Input IP address for server. $NC" read IP1 #echo -e "" #echo -e "$BLUE 2.Input netmask for server. $NC" #read NETMASK1 #echo -e "" #echo -e "$BLUE 3.Input gateway for server. $NC" #read GATEWAY1 #echo -e "$BLUE Input interface (Ex: eth0) : $NC" #read INTERFACES1 #echo "" #echo -e "$BLUE 4.Input DNS2 (Ex: 8.8.4.4). $NC" #read DNS2 #echo -e "" echo -e "" echo -e "$BLUE 2.Input DNS1 (Ex: 8.8.8.8