Skip to content

Instantly share code, notes, and snippets.

View boina-n's full-sized avatar

Nadjmou BOINA boina-n

  • Genopsys
  • Anywhere
  • 04:11 (UTC +04:00)
View GitHub Profile
@boina-n
boina-n / LineSwitch5510.txt
Created October 22, 2017 16:20
LineSwitch5510
LineSwitch5510
-------------------
Model : Ethernet Routing Switch 5510-48T
Most important things to check on switch's are :
* port description nor reason to make sure you working on the right port
* port vlan's to add or remove a port
* port state and status { status is what have been forced by the user }
* port speed, make sure you're not confusing the current port speed and supported speed
*
@boina-n
boina-n / Nortel-Passport-8010.txt
Created October 22, 2017 16:19
Nortel Passport 8010
ex : config ethernet 2/1 info
ex : config ethernet 2/2 info
ex : config vlan 1 info
ex : show tech
@boina-n
boina-n / extrem_summit.txt
Created October 22, 2017 16:18
extrem_summit.txt
INFORMATION
Link state : show port 6 info [detail]
Activation :
Port Name :
Auto Négoc. :
@boina-n
boina-n / InstallCentos5BaseAndEpelRepo.sh
Created October 22, 2017 16:16
InstallCentos5BaseAndEpelRepo.sh
cat << EOF > /etc/yum.repos.d/centos-base.repo
[base]
name=CentOS-5 - Base
baseurl=http://mirror.centos.org/centos/5/os/\$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
[updates]
name=CentOS-5 - Updates
mirrorlist=http://mirrorlist.centos.org/?release=5&arch=\$basearch&repo=updates
@boina-n
boina-n / InstallCentosBaseAndEpelRepo.sh
Created October 22, 2017 16:16
InstallCentosBaseAndEpelRepo.sh
cat << EOF > /etc/yum.repos.d/centos-base.repo
[base]
name=CentOS-6 - Base
baseurl=http://mirror.centos.org/centos/6/os/\$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
[updates]
name=CentOS-6 - Updates
mirrorlist=http://mirrorlist.centos.org/?release=6&arch=\$basearch&repo=updates
@boina-n
boina-n / Kernel-Conf-UnixSystem.txt
Created October 22, 2017 16:15
Kernel-Conf-UnixSystem.txt
# 1. `cd /usr/src' (or to the directory containing your source tree).
# 2. `make buildworld'
# 3. `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC).
# 4. `make installkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC).
# [steps 3. & 4. can be combined by using the "kernel" target]
# 5. `reboot' (in single user mode: boot -s from the loader prompt).
# 6. `mergemaster -p'
# 7. `make installworld'
# 8. `make delete-old'
# 9. `mergemaster' (you may wish to use -i, along with -U or -F).
@boina-n
boina-n / PacketAnalysisFirewallSSG550.sh
Created October 22, 2017 16:14
PacketAnalysisFirewallSSG550.sh
Analyse de flux sur un firewall Juniper SSG-550
peut s'avérer utilse lors d'un trouble shooting.
Malheureusement l'équipement ne permet pas de capture en live.
Il sera stocké dans le cache.
#Commencer par supprimer les filtres si il y en a
Internet-FW-> get ffilter
id:0 src ip 8.8.8.8
id:1 src ip 4.4.4.4
@boina-n
boina-n / PacketAnalysisAlteonAppSwitch4416.txt
Created October 22, 2017 16:13
PacketAnalysisAlteonAppSwitch4416.txt
Analyse de flux
vérifier la version de l'OS.
/info/sys/general
>> Software Version 29.0.2.0 (FLASH image2), active configuration.
Les chaines de filtrage sont les mêmes que se de tcpdump, en réalité c'est le module pcap-filter utilisé comme pour tcpdump qui est utilisé pour traduire les commandes.
La première option ' -l ' permet de visualiser les trames en temps réel autrement vous pouvez les stocker sous un fichier pcap et les exploiter avec un logiciel tiers (ex WireShark).
quelques exemples:
@boina-n
boina-n / TsharkDnsPacket.sh
Created October 22, 2017 16:08
Tshark a DNS Packet
$ wc -l ok.cleaning_center.pcap.20151201.19h01m17s-1448992877.645994-1448992920.921620.v.1.txt
8994730 ok.cleaning_center.pcap.20151201.19h01m17s-1448992877.645994-1448992920.921620.v.1.txt
From resperf source: https://github.com/cobblau/dnsperf
static char *qtypes[] = {"A", "NS", "MD", "MF", "CNAME", "SOA", "MB", "MG",
"MR", "NULL", "WKS", "PTR", "HINFO", "MINFO", "MX", "TXT",
"AAAA", "SRV", "NAPTR", "A6", "AXFR", "MAILB", "MAILA", "*", "ANY"};
@boina-n
boina-n / TcprewriteAndReplay.sh
Created October 22, 2017 16:05
TcprewriteAndReplay.sh
Interface DE : 172.16.1.[1-63]
ifconfig |grep -B3 172.16
# Depuis le serveur DNS
dif=bond1
dip=$(ip addr show dev $dif | egrep -o '(addr:)?([0-9]*\.){3}[0-9]*' | head -n1)
dmac=$(ip link show dev $dif | egrep -o '(link/ether:)?([0-9a-f]{2}\:){5}[0-9a-f]{2}' |head -n1)
echo -e "dmac=$dmac \ndip=$dip"