<?xml version="1.0" encoding="UTF-8" ?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Posteet: linux,network</title> 
    <link>http://www.posteet.com/</link> 
    <description>Recent posteets posted to Posteet</description>
    <ttl>60</ttl>

    
    <item>
        <title>Rename interfaces (eth0 to eth1) on Linux</title>
        <link>http://www.posteet.com/view/682</link>
        <description>
        <![CDATA[<pre># Debian : edit the following file (mac to eth association)
/etc/udev/rules.d/z25_persistent-net.rules

# The long way : change the name when loading the module for the NIC
cat /etc/sysconfig/hwconf | grep -A 16 NETWORK
class: NETWORK
bus: PCI
detached: 0
device: eth0
driver: 8139t
# Then change the device name in the ifcfg script: /etc/sysconfig/network-scripts/ifcfg-ethX</pre> <a href="http://www.posteet.com/tags/debian">[debian]</a>  <a href="http://www.posteet.com/tags/eth">[eth]</a>  <a href="http://www.posteet.com/tags/hwconf">[hwconf]</a>  <a href="http://www.posteet.com/tags/ifcfg">[ifcfg]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/network">[network]</a> ]]>        </description>
        <dc:creator>spirit</dc:creator>
        <pubDate>Tue, 22 Jan 2008 08:22:23 +0000</pubDate>

            <category>debian</category>
            <category>eth</category>
            <category>hwconf</category>
            <category>ifcfg</category>
            <category>linux</category>
            <category>network</category>
    
    </item>

  
    <item>
        <title>Utilisation des dossiers « if-pre-up » et « if-post-down »</title>
        <link>http://www.posteet.com/view/582</link>
        <description>
        <![CDATA[<pre>Les scripts placés dans le dossier « /etc/network/if-post-down.d » seront lancés automatiquement après chaque arrêt d'une interface réseau.

Les scripts placés dans le dossier « /etc/network/if-pre-up.d » seront lancés automatiquement après chaque démarrage d'une interface réseau.

Mais pour que les scripts fonctionnement, il faut respecter quelques règles :
-  Il doivent être exécutables (chmod +x)
-  Ils doivent Indiquer l'interpréteur de commande sur la première ligne (ex : # !/bin/sh)
-  Le nom ne doit contenir que des caractères, chiffres, '_' et '-' (Pas de points)

Quand le script est exécuté, il peut utiliser plusieurs variables ( :
-  IFACE : Nom de l'interface physique concernée (eth0, lo,..)
-  LOGICAL : Nom de l'interface logique
-  ADDRFAM, METHOD, MODE, PHASE et VERBOSITY
Le script peut donc utiliser ces variables pour s'adapter en conséquence.

ATTENTION : En plaçant le script d'arrêt du firewall dans le dossier « if-post-down », celui-ci sera exécuté quelque soit l'interface réseau arrêté. Par exemple si le firewall est destiné à filtrer l'interface eth0, il sera désactivé lorsque l'interface lo sera arrêtée, ce qui peut entraîner une grosse faille de sécurité.

Pour remédier à ce problème, il faut ajouter au début du script un test pour qu'il s'exécute uniquement pour l'interface concernée:

if [ $IFACE != &quot; eth2&quot; ]; then
exit
fi

== Configuration du fichier /etc/network/interfaces ==

Une autre méthode pour arrêter et démarrer un firewall est d'utiliser les directives « pre-up » et « post-down » dans le fichier «  /etc/network/interfaces ». Exemple :
auto eth0
iface eth0 inet dhcp
 pre-up /etc/firewall-start
 post-down /etc/firewall-stop</pre> <a href="http://www.posteet.com/tags/down">[down]</a>  <a href="http://www.posteet.com/tags/ifconfig">[ifconfig]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/network">[network]</a>  <a href="http://www.posteet.com/tags/systeme">[systeme]</a>  <a href="http://www.posteet.com/tags/up">[up]</a> ]]>        </description>
        <dc:creator>spirit</dc:creator>
        <pubDate>Thu, 13 Dec 2007 14:57:02 +0000</pubDate>

            <category>down</category>
            <category>ifconfig</category>
            <category>linux</category>
            <category>network</category>
            <category>systeme</category>
            <category>up</category>
    
    </item>

  
    <item>
        <title>Changer l'adresse mac</title>
        <link>http://www.posteet.com/view/142</link>
        <description>
        <![CDATA[<pre>#passer en root
ifconfig eth0 hw ether AA:BB:CC:DD:EE:FF</pre> <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/ifconfig">[ifconfig]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/mac">[mac]</a>  <a href="http://www.posteet.com/tags/network">[network]</a>  <a href="http://www.posteet.com/tags/shell">[shell]</a> ]]>        </description>
        <dc:creator>jon207</dc:creator>
        <pubDate>Sat, 03 Nov 2007 17:04:33 +0000</pubDate>

            <category>bash</category>
            <category>ifconfig</category>
            <category>linux</category>
            <category>mac</category>
            <category>network</category>
            <category>shell</category>
    
    </item>

  
    <item>
        <title>[Linux] Netstat - Les bonnes options pour tout voir</title>
        <link>http://www.posteet.com/view/112</link>
        <description>
        <![CDATA[<pre>netstat -lapute</pre> <a href="http://www.posteet.com/tags/awesome">[awesome]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/netstat">[netstat]</a>  <a href="http://www.posteet.com/tags/network">[network]</a>  <a href="http://www.posteet.com/tags/réseau">[réseau]</a>  <a href="http://www.posteet.com/tags/shell">[shell]</a>  <a href="http://www.posteet.com/tags/système">[système]</a> ]]>        </description>
        <dc:creator>henri</dc:creator>
        <pubDate>Thu, 25 Oct 2007 07:15:53 +0000</pubDate>

            <category>awesome</category>
            <category>linux</category>
            <category>netstat</category>
            <category>network</category>
            <category>réseau</category>
            <category>shell</category>
            <category>système</category>
    
    </item>


</channel>
</rss>
