Archive

Articles taggués ‘debian’

Configurer IPTables pour Netfilter sous Debian Squeeze

15/11/2022 Aucun commentaire

Qu’est-ce que c’est?

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 HTTP-based File Transfer Utility Transfers Large Files Efficiently

11/11/2022 Comments off

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.

Zsync WorkFlow

Zsync WorkFlow


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…

Categories: Système Tags: , ,

Linux Command: Show Linux Version

01/10/2022 Comments off

Source: nixCraft

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?

You need to use the following two commands:

[a] uname - Print kernel and system information.
[b] lsb_release - Print distribution-specific information.
[c] /proc/version file - Print running kernel information.

How to check linux kernel version number?

Open a shell prompt (or a terminal) and type the following command to see your current Linux kernel version:

$ uname -r

Sample outputs:

2.6.32-23-generic-pae

Or type the following command:

$ uname -mrs

Sample outputs:

Linux 2.6.32-23-generic-pae i686

To print all information, enter:

$ uname -a

Sample outputs:

Linux vivek-laptop 2.6.32-23-generic-pae #37-Ubuntu SMP Fri Jun 11 09:26:55 UTC 2010 i686 GNU/Linux

Where,

  • 2.6.32-23 – Linux kernel version number
  • pae – pae kernel type indicate that I’m accssing more than 4GB ram using 32 bit kernel.
  • SMP – Kernel that supports multi core and multiple cpus.

Lire la suite…

Categories: Système Tags: , , ,

Dupliquer un système Debian / Ubuntu

07/09/2022 Comments off

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…

Source: admin-linux.fr

Linux: 20 Iptables Examples For New SysAdmins

28/08/2022 Comments off

According to the official project site:

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…