This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install docker | |
#show conteiner | |
docker pull ubuntu | |
docker ps -a | |
docker attach c1988b7b20c6 | |
docker start c1988b7b20c6 | |
https://mondedie.fr/viewtopic.php?pid=29034#p29034 | |
https://training.docker.com/self-paced-training | |
DOCKER VS VAGRANT: http://stackoverflow.com/questions/16647069/should-i-use-vagrant-or-docker-for-creating-an-isolated-environment?rq=1 | |
https://docs.docker.com/kitematic/nginx-web-server/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -E "Jun 6|Jun 7" error.log.1 > /mnt/aaa.log | |
cat error.log.1 | grep -E 98162 | |
grep -E "suc|stop|getInOutBytes|found" error.log.1 | |
egrep -iH "max|suc" /var/log/IBSng/MAIN/* --color | |
grep "89794" .log. | grep "Jun 17" --color | |
ssh root@172.16.4.12 'grep "19:06:25" /var/log/IBSng/ONLINE_WORKER/* >$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.config file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh key | |
ssh-keygen -t rsa | |
cat ~/.ssh/id_rsa.pub | ssh -p 22 swapnil@remote-server ";mkdir -p ~/.ssh && cat >> ~/.ssh/authorized$ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install | |
#time | |
LC_ALL="en_US.UTF-8" | |
#repository | |
deb http://ftp.debian.org/debian/ testing main contrib non-free | |
deb http://ftp.debian.org/debian wheezy main | |
#after install package | |
apt-get install libc6-dev | |
apt-get install python-mpi4py | |
apt-get install openmpi-bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#check connectivity in linux server and ldap | |
python | |
import ldap | |
ldap.initialize("ldap://192.168.100.2:389") | |
x = ldap.initialize("ldap://192.168.100.2:389") | |
x.bind_s("USERNAME", "PASSWORD") | |
after return error check error in website | |
http://wiki.servicenow.com/index.php?title=LDAP_Error_Codes#gsc.tab=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SNMP | |
apt-get install snmp | |
apt-get install snmp-mibs-downloader | |
download-mibs | |
cat /etc/snmp/snmp.conf → Add → mibs +ALL | |
Check MIB’s | |
snmptranslate -Tp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NAST | |
Find all hosts on the LAN using ARP: | |
nast -m | |
Find suitable internet gateway: | |
nast -i INTERFACE -g | |
Reset connection: | |
nast -i INTERFACE -r | |
See specific traffic: | |
nast -i INTERFACE -f "src 192.168.1.2" | |
Check who is online poisoning: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Networking | |
#IPv4 Forwarding: | |
nano /etc/sysctl.conf → Change 0 to 1 in ip_forward | |
sysctl -p && echo 1 > /proc/sys/net/ipv4/ip_forward | |
#IPtables: | |
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT | |
iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT | |
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OpenVPN Config | |
apt-get install openvpn easy-rsa | |
mkdir /etc/openvpn/easy-rsa | |
cp -rf /usr/share/easy-rsa/* /etc/openvpn/easy-rsa | |
Edit the vars file in order to create certificates information: | |
nano /etc/openvpn/easy-rsa/vars | |
cd /etc/openvpn/easy-rsa | |
source vars | |
./clean-all → Cleans everything in keys | |
./build-ca |
OlderNewer