If you want to connect to remote server (running vnc on local port) but using another host as jump node (bastion).
Tag: linux
Delete all files except
Delete all files except particular extension lets say bam
unique lines from two files
How to get unique lines from two files (fileA, and fileB) and store the lines in file-unique .
Get Hardware server model info in linux terminal
dmidecode | grep -A3 ‘^System Information’
delete all files except in linux
find .!-iname dir1 !-iname dir2 -exec rm -rf {} \;
zfs cache file regenerate
The /etc/zfs/zpool.cache file Whenever a pool is imported on the system it will be added to the /etc/zfs/zpool.cache file. This file stores pool configuration information, such as the device names and pool state. If this file exists when running the zpool import command then it will be used to determine the list of pools available for import. When… Continue reading zfs cache file regenerate
change time zone in centos 6
Change the current timezone in CentOS 6 and older Type the following commands as root: cp /etc/localtime /root/old.timezone rm /etc/localtime ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime
checking who is connecting with nfs server
cat /var/lib/nfs/rmtab
Fixed sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-iptables:
sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-iptables: No such file or directory sysctl: cannot stat /proc/sys/net/bridge/bridge-nf-call-ip6tables: No such file or directory solution: modprobe br_netfilter
linux gateway
iptables -A FORWARD -i eth1 -j ACCEPT iptables -A FORWARD -o eth1 -j ACCEPT iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE #ETHO where internet is connected