IPTables regroupe les lignes de commandes nécessaires à la gestion de Netfilter. Oui mais que fait Netfilter ? Pour les anglophones, vous aurez remarquer que dans Netfilter, il y a Net et il y a Filter donc à priori ça va parler d’Internet et de filtrage. Et qui dit filtrage, veut dire Firewall.
Voilà le mot est laché ! Le couple Netfilter/IPTables permet de faire du filtrage de port grâce à des règles de pare-feu. Il sera alors possible de bloquer certains paquets IP et de laisser passer ceux qui nous intéressent. Par exemple par le port 80 (le port pour http), le trafic Internet sera possible et votre navigateur préféré vous emmènera sur les autoroutes du savoir offert par Internet. Lire la suite…
Zsync is an opensource file transfer utility built on top of rsync algorithm. This helps to download partial/differential files over the HTTP protocol. The utility allows downloading only new parts of a file from a centralized location, where the older version of the file is already within your computer.
While rsync is for syncing data from one computer to another, zsync allows file distribution, where the file hosted in a server using any web server can be distributed to many and downloaded seamlessly.
How it works
The command-line utility will do all the differential calculations in the client, instead of doing it in the server as in rsync. Server metadata will be created only once and stored as part of the control file. And rest of the operations and decision making will be handled by the client-side application. This will reduce the huge processing needed on the server-side, even when thousands of clients are trying to fetch the file.
Server
The server will calculate the checksum and create the control file in advance. This contains checksums, block size of the file, length and file permissions. Since the rest of the comparisons happens at the client-side, there aren’t any checksum calculations happening on the server, and each time the client requests for data.
Client
The Zsync client is written in “C”, and capable of pulling the metadata from the server first. This will compare with the current files checksum data (generated by rsync) and requests the remaining data from the server. Lire la suite…
What command I need to type to display Linux kernel version and other information such as Linux distribution name? How do I check Linux kernel version number?
Dupliquer un système consiste à installer, sur une machine, exactement les mêmes paquets que sur une autre. La technique n’a rien de nouveau en soi, mais il est toujours bon de la rappeler. Sous les dérivés de Debian, “dpkg” permet d’effectuer cette opération rapidement.
Sur la machine à dupliquer, exporter la liste des paquets installés :
# dpkg --get-selections > lstpkg.dpkg
Sur la machine à installer, commencez par poser un système minimal (installation via le CD-Rom “businesscard” sans sélectionner aucun groupe de paquets). Copiez la liste des paquets exportée depuis la machine à dupliquer et importez la dans le gestionnaire de paquets local :
# dpkg --set-selections < lstpkg.dpkg
puis lancez l’installation des paquets ainsi sélectionnés :
# apt-get dselect-upgrade
Note 1 : si vous souhaitez des machines réellement identique, commencez par copier “/etc/passwd” et “/etc/group” de la machine à dupliquer sur la machine cible afin que les programmes installés utilisent les mêmes UIDs et GIDs (exemple : bind, apache, etc…).
Note 2 : Lors de la sauvegarde des configurations de serveurs, conserver un export de la liste des paquets installés sur chacun d’eux peut faire gagner beaucoup de temps en cas de problème…
netfilter is a set of hooks inside the Linux kernel that allows kernel modules to register callback functions with the network stack. A registered callback function is then called back for every packet that traverses the respective hook within the network stack.
This Linux based firewall is controlled by the program called iptables to handles filtering for IPv4, and ip6tables handles filtering for IPv6. I strongly recommend that you first read our quick tutorial that explains how to configure a host-based firewall called Netfilter (iptables) under CentOS / RHEL / Fedora / Redhat Enterprise Linux. This post lists most simple iptables solutions required by a new Linux user to secure his or her Linux operating system from intruders. Lire la suite…