# Teamspeak Licence
iptables -t filter -A INPUT -p tcp --dport 2008 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 2008 -j ACCEPT
# Teamspeak Voix par défaut
iptables -t filter -A INPUT -p udp --dport 9987 -j ACCEPT
iptables -t filter -A OUTPUT -p udp --dport 9987 -j ACCEPT
# Teamspeak ServerQuery
iptables -t filter -A INPUT -p tcp --dport 10011 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 10011 -j ACCEPT
# Teamspeak File Transfer
iptables -t filter -A INPUT -p tcp --dport 30033 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 30033 -j ACCEPT
20100521
[TS3] - Régle Iptables pour permettre à un serveur sous linux de fonctionner
20100405
Installer les VMWare Tools sous Ubuntu
Les VMWare Tools sont des outils destinés à
optimiser le fonctionnement d’un système sous VMWare. Ils ne sont pas
indispensables au bon fonctionnement du système, mais peuvent en
optimiser les performances.
Les opérations décrites ici sont effectuées en ligne
de commande, mais peuvent également être réalisée dans un environnement
graphique, à condition d’ouvrir un fenêtre de terminal (via le menu
Applications -> Accessoires).
Dans un premier temps il faut installer sur le
système de quoi compiler les composants qu’installera VMWare.
L’installation des linux-headers dépend du noyau installé. Ici
c’est pour un Pentium IV. Le noyau peut être identifié avec uname
-r .
- sudo apt-get update (si ce n’est pas déjà fait dans
la journée) - sudo apt-get install make gcc
- sudo apt-get install linux-headers-2.6.31-20-server ( sur ma machine )
Après les pré-requis, l’installation proprement dite :
- Demander l’installation de VMWare Tools via le menu d’administration
de VMWare : VM -> Install VMWare Tools… - mount /media/cdrom
- cd /tmp
- tar xzvf /media/cdrom/VM*.tar.gz
- cd vmware-tools-distrib
- sudo ./vmware-install.pl
- Répondre aux questions. Normalement toutes les propositions par
défaut sont les bonnes, et une simple validation fera l’affaire. - umount /media/cdrom
- cd /tmp
- rm -Rf /tmp/vmware-tools-distrib (attention, cette
commande est dangereuse) - Si possible, redémarrer le système : sudo shutdown -r now
Et voilà, simple et efficace.
20100117
[Linux] Serveur Tftpd
Serveur TFTP : TFTPd
Les principales simplifications visibles du TFTP par rapport au FTP est qu'il ne gère pas le listage de fichiers, et ne dispose pas de mécanismes d'authentification, ni de chiffrement. Il faut connaître à l'avance le nom du fichier que l'on veut récupérer. De même, aucune notion de droits de lecture/écriture n'est disponible en standard.
On utilise le protocole TFTP notamment pour la mise à jour des firmwares sur les équipements réseaux, la sauvegarde de la configuration de ces équipements réseau, mais aussi pour amorcer des stations de travail sans disque dur.
Ce tutoriel vaut pour les 2 premiers cas qui requiert un serveur TFTP basique. Si vous souhaitez amorcer un PC par le réseau, il vous faut préférer tftp-hpa.
Installation
Configuration
service tftp { protocol = udp port = 69 socket_type = dgram wait = yes user = nobody server = /usr/sbin/in.tftpd server_args = /tftpboot disable = no }
Créer le répertoire /tftpboot :
sudo mkdir /tftpboot sudo chmod -R 777 /tftpboot sudo chown -R nobody /tftpboot
Re-charger les fichiers de configuration de xinetd :
sudo /etc/init.d/xinetd reload
Démarrer ou re-démarrer xinetd :
sudo /etc/init.d/xinetd start
ou
sudo /etc/init.d/xinetd restart
Utilisation
Pour tester le bon fonctionnement du serveur, nous allons créer un fichier dans notre home puis le transférer sur le serveur tftp :$ touch /home/sydtux/essai.txt $ tftp 192.168.1.1 tftp> put essai.txt Sent 722 bytes in 0.0 seconds tftp> quit $ ls -l /tftpboot/ total 4 -rwxrwxrwx 1 sydtux sydtux 28 2007-02-04 23:14 essai.txt
Voilà, le serveur tftp est fonctionnel pour recevoir et mettre à disposition des fichiers.
20100116
[Cisco] Effectuer un reset de password sur PIX
Cisco PIX 500 Series Security Appliances
Password Recovery and AAA Configuration Recovery Procedure for the PIX
Document ID: 8529
Contents
Introduction
Prerequisites
Requirements
Components Used
Conventions
Step-by-Step Procedure
PIX With a Floppy Drive
PIX Without a Floppy Drive
Sample Output
Download Software
Cisco Support Community - Featured Conversations
Related Information
Introduction
This document describes how to recover a PIX password for PIX software releases through 7.0. Note that performing password recovery on the PIX erases only the password, not the configuration. If there are Telnet or console aaa authentication commands in versions 6.2 and later, the system also prompts to remove these.Note: If you have configured AAA on the PIX and the AAA server is down, you can access the PIX by entering the Telnet password initially, and then pix as the username and the enable password (enable password password) for the password. If there is no enable password in the PIX configuration, enter pix for the username and press ENTER. If the enable and Telnet passwords are set but not known, continue with the password recovery process.
The PIX Password Lockout Utility is based on the PIX software release you run. Use show version in order to know the software version running on your PIX/ASA Security appliance.
Note: Refer to Performing Password Recovery for the ASA 5500 Series Adaptive Security Appliance for ASA 5500 Series Adaptive Security Appliance Password Recovery.
Prerequisites
Requirements
There are no specific requirements for this document.Components Used
The information in this document requires these hardware devices:- A PC
- A working serial terminal or terminal emulator
- Approximately 10 minutes of PIX and network downtime
You need the PIX Password Lockout Utility to use the password recovery procedure, which includes these files:
- The appropriate binary file, depending on the PIX software version you run:
- np70.bin (7.x and 8.0 release)
- np63.bin (6.3 release)
- np62.bin (6.2 release)
- np61.bin (6.1 release)
- np60.bin (6.0 release)
- np53.bin (5.3 release)
- np52.bin (5.2 release)
- np51.bin (5.1 release)
- np50.bin (5.0 release)
- np44.bin (4.4 release)
- nppix.bin (4.3 and earlier releases)
Note: You need to determine what .bin file to use, which depends upon the PIX code that your PIX currently runs irrespective of the BIOS version.
- np70.bin (7.x and 8.0 release)
- rawrite.exe (needed only for PIX machines with a floppy drive)
- TFTP Server Software (needed only for PIX machines without a floppy drive) — TFTP server software is no longer available from Cisco.com, but you can find many TFTP servers by searching for "tftp server" on your favorite Internet search engine. Cisco does not specifically recommend any particular TFTP implementation.
Conventions
Refer to the Cisco Technical Tips Conventions for more information on document conventions.Step-by-Step Procedure
PIX With a Floppy Drive
Complete these steps to recover your password:- Execute the rawrite.exe file on your PC and answer the questions on the screen using the correct password recovery file.
- Install a serial terminal or a PC with terminal emulation software on the PIX console port.
- Verify that you have a connection with the PIX, and that characters are going from the terminal to the PIX, and from the PIX to the terminal.
Note: Because you are locked out, you only see a password prompt.
- Insert the PIX Password Lockout Utility disk into the floppy drive of the PIX.
- Push the Reset button on the front of the PIX. The PIX reboots from the floppy and prints this message:
Erasing Flash Password. Please eject diskette and reboot.
- Eject the disk and press the Reset button. You are now able to log in without a password. Press ENTER when you are prompted for a password.
- The default Telnet password after this process is "cisco." There is no default enable password. Go into configuration mode and issue the passwd your_password command to change your Telnet password and the enable password your_enable_password command to create an enable password, and then save your configuration.
PIX Without a Floppy Drive
Complete these steps to recover your password:Note: Sample output from the password recovery procedure is available in this document.
- Install a serial terminal or a PC with terminal emulation software on the PIX console port.
- Verify that you have a connection with the PIX, and that characters are going from the terminal to the PIX, and from the PIX to the terminal.
Note: Because you are locked out, you only see a password prompt.
- Immediately after you power on the PIX Firewall and the startup messages appear, send a BREAK character or press the ESC key. The monitor> prompt is displayed. If needed, type ? (question mark) to list the available commands.
- Use the interface command to specify which interface the ping traffic should use. For floppiless PIXes with only two interfaces, the monitor command defaults to the inside interface.
- Use the address command to specify the IP address of the PIX Firewall's interface.
- Use the server command to specify the IP address of the remote TFTP server containing the PIX password recovery file.
- Use the file command to specify the filename of the PIX password recovery file. For example, the 5.1 release uses a file named np51.bin.
- If needed, enter the gateway command to specify the IP address of a router gateway through which the server is accessible.
- If needed, use the ping command to verify accessibility. If this command fails, fix access to the server before continuing.
- Use the tftp command to start the download.
- As the password recovery file loads, this message is displayed:
Do you wish to erase the passwords? [yn] y Passwords have been erased.
- The default Telnet password after this process is "cisco." There is no default enable password. Go into configuration mode and issue the passwd your_password command to change your Telnet password and the enable password your_enable_password command to create an enable password, and then save your configuration.
Sample Output
This example of floppiless PIX password recovery with the TFTP server on the outside interface is taken from a lab environment.Network Diagram

monitor>interface 0 0: i8255X @ PCI(bus:0 dev:13 irq:10) 1: i8255X @ PCI(bus:0 dev:14 irq:7 ) Using 0: i82559 @ PCI(bus:0 dev:13 irq:10), MAC: 0050.54ff.82b9 monitor>address 10.21.1.99 address 10.21.1.99 monitor>server 172.18.125.3 server 172.18.125.3 monitor>file np52.bin file np52.bin monitor>gateway 10.21.1.1 gateway 10.21.1.1 monitor>ping 172.18.125.3 Sending 5, 100-byte 0xf8d3 ICMP Echoes to 172.18.125.3, timeout is 4 seconds: !!!!! Success rate is 100 percent (5/5) monitor>tftp tftp np52.bin@172.18.125.3 via 10.21.1.1................................... Received 73728 bytes Cisco Secure PIX Firewall password tool (3.0) #0: Tue Aug 22 23:22:19 PDT 2000 Flash=i28F640J5 @ 0x300 BIOS Flash=AT29C257 @ 0xd8000 Do you wish to erase the passwords? [yn] y Passwords have been erased. Rebooting....
[Linux] Configurer minicom pour se connecter à un Cisco
- Se connecter au routeur/switch (CISCO ou 3COM) avec minicom sous Linux/Unix
- connecter le port série sur l'ordinateur au port console sur le routeur/switch par un câble null-modem.
- lancer minicom (dans /usr/bin/minicom généralement) en tant que root
- Si minicom vous indique qu'il n'arrive pas à ouvrir un fichier de config, ou si le port qu'il essaye d'ouvrir n'est pas /dev/ttyS0, lancer minicom par minicom -s, vous atterrissez directement dans le menu de configuration de minicom. Allez à l'étape 6.
- La menu de configuration s'obtient avec CTRL-A Z
- configurer minicom dans cOnfigure minicom puis Serial port setup pour utiliser /dev/ttyS0 comme port série
- configurer la ligne série avec (comm Parameters): 9600 bits/s, 8 bits de données, pas de parité, pas de contrôle de flux (ni hardware, ni software). Normalement, minicom affiche 9600, 8N1
- sauvegarder la configuration en tant que config par défaut (normalement dans /etc/minicom)
- réinitialiser le modem (initialize Modem) ou bien sortir en resettant le modem, puis relancer minicom
- La vitesse a peut-être changée, la rechanger (c'est un bug je pense), et cela devrait fonctionner.
20100108
Installation et Utilisation de Lynis
Un outil de sécurité à connaître
Lynis est un outil d'audit de sécurité système.
Il scan le système et les logiciels disponibles, afin de détecter les problèmes de sécurité. Outre des informations de sécurité basic, il sera également rechercher des informations sur le système en général, les paquets installés et les erreurs de configuration par exemple.
Url du site officiel : http://www.rootkit.nl/projects/lynis.html
A noter : ce projet est très vivant de nombreuses mises à jour et release, lynis fonctionne sur toutes les plate-formes et il existe un paquet deb et un rpm.
Téléchargement :
cd /opt/SOURCES
wget http://www.rootkit.nl/files/lynis-1.2.9.tar.g
tar xvzf lynis-1.2.9.tar.gz
cd lynis-1.2.9
A partir d'ici vous avez la possibilité d'utiliser Lynis sans l'installer :
sh lynis<br />
Mettre à jour les données de Lyris :
sh lynis --check-update<br />
Qui devrait vous donnez quelque chose comme ceci :
== Lynis ==<br /> Version : 1.2.9<br /> Release date : december 2009<br /><br /> == Databases ==<br /> Current Latest Status<br /> -----------------------------------------------------------------------------<br /> Malware : 2009062700 2009062700 Up-to-date<br /> File perms : 2009053000 2009053000 Up-to-date<br />
Lancer le scan :
sh lynis --check-all<br />
A la fin des vérifications plusieurs suggestions vous seront proposées pour améliorer la configuration et la sécurité du serveur en question.
Suggestions:<br /> ----------------------------<br /> - [16:08:28] Suggestion: Run grub-md5-crypt and create a hashed password. After that, add a line below the line saying timeout=<value>: password --md5 <password hash> [test:BOOT-5121]<br /> - [16:08:28] Suggestion: Add a password to LILO, by adding a line to the lilo.conf file, above the first line saying 'image=<name>': password=<password> [test:BOOT-5139]<br /> - [16:09:03] Suggestion: Run grpck manually and check your group files [test:AUTH-9216]<br /> - [16:09:22] Suggestion: To decrease the impact of a full /home file system, place /home on a separated partition [test:FILE-6310]<br /> - [16:09:22] Suggestion: To decrease the impact of a full /tmp file system, place /tmp on a separated partition [test:FILE-6310]<br /> - [16:09:27] Suggestion: Disable drivers like USB storage when not used, to prevent unauthorized storage or data theft [test:STRG-1840]<br /> - [16:09:28] Suggestion: Disable drivers like firewire storage when not used, to prevent unauthorized storage or data theft [test:STRG-1846]<br /> - [16:09:40] Suggestion: Install package 'yum-utils' for better consistency checking of the package database [test:PKGS-7384]<br /> - [16:09:59] Suggestion: Check iptables rules to see which rules are currently not used (iptables --list --numeric --verbose) [test:FIRE-4513]<br /> - [16:10:27] Suggestion: Enable logging to an external logging host for archiving purposes and additional protection [test:LOGG-2154]<br /> - [16:10:34] Suggestion: Enable auditd to collect audit information [test:ACCT-9628]<br /> - [16:10:36] Suggestion: Check ntpq peers output for time source candidates [test:TIME-3128]<br /> - [16:10:57] Suggestion: Harden the system by removing unneeded compilers. This can decrease the chance of customized trojans, backdoors and rootkits to be compiled and installed [test:HRDN-7220]<br /> - [16:10:57] Suggestion: Harden the system by installing one or malware scanners to perform periodic file system scans [test:HRDN-7230]<br />================================================================================<br /> Files:<br /> - Test and debug information : /var/log/lynis.log<br /> - Report data : /var/log/lynis-report.dat<br />================================================================================<br />
Installation :
Si vous désirez installer Lynis proprement :
Soit vous utilisez le paquet deb ou rpm disponible soit à la main :
cd /opt/SOURCES/lynis-1.2.9<br />mkdir /opt/lynis129<br />ln -s /opt/lynis129 /opt/lynis<br />mv * /opt/lynis/<br />cd ..<br />rm -rf lynis-1.2.9<br />rm -rf lynis-1.2.9.tar.gz<br />
Configurer l'environnent :
vi /etc/profile<br />ajoutez ceci : <br />pathmunge /opt/lynis<br />source /etc/profile<br />
Maintenant vous pouvez utiliser la commande lynis de n'importe où.
Bon test et bon bidouillage à vous
