Cisco EEM script | Routing table change – monitoring
0
1 2 3 4 5 6 7 8 9 |
event manager applet route-table-monitor event routing network 0.0.0.0/0 ge 1 action 0.5 set msg "Route changed: Type: $_routing_type, Network: $_routing_network, Mask/Prefix: $_routing_mask, Protocol: $_routing_protocol, GW: $_routing_lastgateway, Intf: $_routing_lastinterface" action 1.0 syslog msg "$msg" action 2.0 cli command "enable" action 4.0 info type routername action 5.0 snmp-trap strdata "Route changed: Type: $_routing_type, Network: $_routing_network, Mask/Prefix: $_routing_mask, Protocol: $_routing_protocol, GW: $_routing_lastgateway, Intf: $_routing_lastinterface" action 6.0 cli command "end" action 7.0 cli command "exit" |
IOS XR – AAA
0Voilà comment faire une configuration Radius sous IOS XR dans une VRF
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
aaa group server radius rad_server server-private X.X.X.X auth-port 1812 acct-port 1813 key SECRET_KEY ip vrf forwarding MGMT ! aaa authentication login default group radius rad_server local aaa authorization console aaa authorization exec default group radius rad_serverl local ! ip access-list standard aclMgmtLineVty permit X.X.X.X deny any ! line vty 0 15 access-class aclMgmtLineVty in vrf-also exec-timeout 240 0 transport input ssh ! |
Les Seedbox
0Introduction
Les seedbox c’est quoi ? C’est un serveur qui va vous permettre de pouvoir récupérer vos fichiers Torrents sans encombrer votre ligne internet et à une vitesse élevé suivant le fournisseur que vous aurez choisi 🙂
Comment ça fonctionne ?
Une fois vos fichiers télécharger il vous sera possible de récupérer vos fichiers via FTP ou alors si vous avez un serveur dédié vous pouvez faire un point de montage NFS. Plus besoin de télécharger le fichier, vous le lisez en streaming directement depuis chez vous 🙂
Les services de seedbox
Les seedbox ne manquent pas, un petit tour sur google vous donnera un très large choix.
Il y a aussi l’option de prendre un serveur dédié et d’installer ce qu’il faut dessus pour faire vos downloads. Perso c’est la meilleur solution si vous avez les connaisses pour mettre en place votre machine !
Plowshare – CLI DDL
0Voici le petit outils très sympatique qui va vous permettre de faire du téléchargement DDL en CLI. Il sagit de Plowshare.
Plowshare est compatibale avec plus de 70 sites de DDL.
Installation
Ca va très vite:
1 2 3 |
git clone https://code.google.com/p/plowshare/ plowshare4 cd plowshare4 sudo make install |
Ensuite le fichier de config
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
vi /etc/plowshare.conf ----------------------- ### ### Plowshare configuration file ### Line syntax: token = value ### [General] #interface = eth1 #captchabhood=cbhuser:cbhpass uploaded/a =user:password mediafire/a =user:password [Plowdown] timeout=3600 #antigate=49b1b8740e4b51cf51838975de9e1c31 [Plowup] max-retries=2 mirrorcreator/auth-free = foo:bar mirrorcreator/count = 5 [Plowlist] verbose = 3 #[Plowprobe] --------------------------------- |
Utilisation
1 2 |
plowdown http://rapidshare.com/files/130403982/Bridge_Tutorial.rar plowdown -a myuser:mypassword http://hotfile.com/dl/68261330/2f2926f/ |
Depuis un fichier text
1 2 3 4 5 |
$ cat file_with_links.txt # This is a comment http://depositfiles.com/files/abcdefghi http://www.rapidshare.com/files/86545320/Tux-Trainer_25-01-2008.rar $ plowdown file_with_links.txt |
SSH Generate Key
0Voilà une petite commande pour générer une clé SSH vite fait
1 |
ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa -q -P "" |
1 2 3 4 |
mkdir ~/.ssh chmod 0700 ~/.ssh touch ~/.ssh/authorized_keys chmod 0644 ~/.ssh/authorized_keys |
Just Add Power
0
Just add Power Transmitter
Les produits Just Add power sont des petits boitiers servant à distribuer un signal HDMI over IP.
Il y a pas mal de fonctionnalités notamment la Matrice pour faire des “Video Wall”, USB over IP etc.
C’est vraiment du très bon matériel. Si vous êtes interessé, contacté moi !
VTY access-class dans une VRF
0
Est-ce que vous avez aussi un problème pour mettre une access-list sur un accès SSH ou telnet d’un router qui se trouve dans une VRF ?
Problème
1 2 3 4 |
R1(config)#access-list 1 permit host 192.168.1.2 R1(config)#line vty 0 15 R1(config-line)#access R1(config-line)#access-class 1 in |
1 2 3 4 5 6 7 8 |
R2#telnet 192.168.1.1 Trying 192.168.1.1 ... % Connection refused by remote host R2# //by default all VRFs are blocked by access-class |
Comment faire alors ?
Il faut utiliser l’option vrf-also dans l’access-class in
1 2 3 4 5 6 7 8 9 |
R1(config-line)#access-class 1 in ? vrf-also Same access list is applied for all VRFs R1(config-line)#access-class 1 in vrf-also R1(config-line)#do show run | sec vty line vty 0 4 access-class 1 in vrf-also password cisco login |
Et voilà !
Unix Less Command: 10 Tips for Effective Navigation
1Less Command – Search Navigation
Once you’ve opened a log file (or any file) using less file-name, use the following keys to search. Please note that the match will be highlighted automatically by default.
Forward Search
- / – search for a pattern which will take you to the next occurrence.
- n – for next match in forward
- N – for previous match in backward
Backward Search
- ? – search for a pattern which will take you to the previous occurrence.
- n – for next match in backward direction
- N – for previous match in forward direction
Less Command – Screen Navigation
Use the following screen navigation commands while viewing large log files.
- CTRL+F – forward one window
- CTRL+B – backward one window
- CTRL+D – forward half window
- CTRL+U – backward half window
Less Command – Line navigation
In a smaller chunk of data, where you want to locate particular error, you may want to navigate line by line using these keys:
- j – navigate forward by one line
- k – navigate backward by one line
Less Command – Other Navigations
The following are other navigation operations that you can use inside the less pager.
- G – go to the end of file
- g – go to the start of file
- q or ZZ – exit the less pager
Simulate tail -f inside less pager – Press F
Once you’ve opened a file using less command, any content that is appended to the file after that will not be displayed automatically. However, you can press F less command will show the status ‘waiting for data‘. This is as similar to ‘tail -f’.
Also, refer to our earlier article about how to view multiple logs files using tail -f.
Less Command – Count magic
Similar to Vim editor navigation command, you can give 10j to scroll 10 lines down, or 10k to go up by 10 lines.
- 10j – 10 lines forward.
- 10k – 10 lines backward.
- CTRL+G – show the current file name along with line, byte and percentage statistics.
Other useful Less Command Operations
- v – using the configured editor edit the current file.
- h – summary of less commands
- &pattern – display only the matching lines, not all.
Nortel 8600 – Config NTP
0
This is the command to configure NTP server on a passport Nortel 8600
1 2 3 4 5 6 7 8 9 |
config bootconfig tz dst-name "ECT" config bootconfig tz name "ECT" config bootconfig tz offset-from-utc -60 config bootconfig tz dst-end M11.1.0/0200 config bootconfig tz dst-start M3.2.0/0200 config ntp server create a.b.c.d config ntp server create a.b.c.d config ntp enable true |