<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://forum.ubuntu-fr.org/extern.php?action=feed&amp;tid=1065401&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Forum Ubuntu-fr.org / iptables et ubuntu 12.04]]></title>
		<link>http://forum.ubuntu-fr.org/viewtopic.php?id=1065401</link>
		<description><![CDATA[Les sujets les plus récents dans iptables et ubuntu 12.04.]]></description>
		<lastBuildDate>Sun, 21 Oct 2012 14:00:14 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Réponse à&#160;:  iptables et ubuntu 12.04]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11202541#p11202541</link>
			<description><![CDATA[<div class="codebox"><pre><code>sudo iptables {-A|--append|-I|--insert} {INPUT|OUTPUT|FORWARD} [-v|--verbose] [{-i|--in-interface|-o|--out-interface} {interface}] [{-p|--protocol} {tcp|udp|icmp}] [{-s|--source|-d|--destination} {address}] {-j|--jump} {ACCEPT|DROP|REJECT|RETURN}</code></pre></div><p>Si tu demande un {append|insert} mais sans préciser si c&#039;est dans la chaine INPUT,OUTPUT ou FORWARD c&#039;est normal que tu reçoive cette réponse.</p><p>Ce qui est entre {&#160; } est obligatoire<br />Ce qui est entre [&#160; ] facultatif si tout est omis, si la première partie existe, la deuxième est obligatoire et vice versa.<br />exemple si la commande contient --protocol, il faut préciser tcp, udp ou icmp</p><p>Les 2 formes sont equivalentes<br />forme courte <strong>-j</strong> | forme longue <strong>--jump</strong></p>]]></description>
			<author><![CDATA[dummy@example.com (xavier4811)]]></author>
			<pubDate>Sun, 21 Oct 2012 14:00:14 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11202541#p11202541</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  iptables et ubuntu 12.04]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11202071#p11202071</link>
			<description><![CDATA[<p>Même erreur avec un &quot;j&quot; a la place du &quot;i&quot;</p>]]></description>
			<author><![CDATA[dummy@example.com (hucoer)]]></author>
			<pubDate>Sun, 21 Oct 2012 13:25:58 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11202071#p11202071</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  iptables et ubuntu 12.04]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11198611#p11198611</link>
			<description><![CDATA[<p>C&#039;est pas un i(I) avant ACCEPT, c&#039;est un j(J)</p>]]></description>
			<author><![CDATA[dummy@example.com (xavier4811)]]></author>
			<pubDate>Sun, 21 Oct 2012 09:28:39 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11198611#p11198611</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  iptables et ubuntu 12.04]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11198451#p11198451</link>
			<description><![CDATA[<p>Me revoila, <br />J&#039;ai essayé de rentré les commande de mon script une par une jusqu’à avoir cette erreur: </p><div class="codebox"><pre><code>sudo iptables -A -i ACCEPT
Bad argument `ACCEPT&#039;
Try `iptables -h&#039; or &#039;iptables --help&#039; for more information.</code></pre></div><p>Ensuite j&#039;ai poursuivi sans rencontrer de problème, je ne me suis occupé seulement des INPUT. </p><p>Seulement voila, suite aux commandes, plus aucune connections possible. <br />Voici le résultat de : sudo iptables -L -vn</p><div class="codebox"><pre><code>Chain INPUT (policy DROP 37 packets, 2120 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    2    88 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:22
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:80
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:143
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            state RELATED,ESTABLISHED

Chain FORWARD (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain OUTPUT (policy ACCEPT 37 packets, 2120 bytes)
 pkts bytes target     prot opt in     out     source               destination         </code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (hucoer)]]></author>
			<pubDate>Sun, 21 Oct 2012 09:21:29 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11198451#p11198451</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  iptables et ubuntu 12.04]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11151441#p11151441</link>
			<description><![CDATA[<p>Tu a essayé avec les corrections du post #14 ?<br />Tu peut poster le message d&#039;erreur s&#039;il y en a un <br />S&#039;il n&#039;y en a pas utilise les commandes </p><div class="codebox"><pre><code>iptables -t filter -A INPUT -j LOG --log-prefix=&quot;DROP_IN &quot;
iptables -t filter -A OUTPUT -j LOG --log-prefix=&quot;DROP_OUT &quot;
sudo iptables -L -vn
tail -f /var/log/syslog </code></pre></div><p>pour voir ce qui bloque. Tente quelques connexions et poste le retour</p>]]></description>
			<author><![CDATA[dummy@example.com (xavier4811)]]></author>
			<pubDate>Wed, 17 Oct 2012 13:05:28 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11151441#p11151441</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  iptables et ubuntu 12.04]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11148151#p11148151</link>
			<description><![CDATA[<p>Mon problème continue toujours, <br />En réponse a xavier4811, j&#039;ai laissé les # sur le OUTPUT pour ne bloqué que les entrées, je ne suis pas en serveur je fais ça pour apprendre. Pour info j&#039;ai suivi le tuto du Zite du Zero (a qui je dit merci au passage).<br />Précision, j&#039;ai le même problème sur mon ordi portable ASUS et sur un PC de bureau HP. <br />Sur le portable, installation 12.04 depuis un live CD avec importation du /home après sauvegarde, et sur le HP installation de 12.04 suivant MaJ ubuntu. </p><p>Petite question, est ce vraiment utile un par-feu sur un ordi non serveur, j&#039;ai déjà eu plusieurs tentative de connections a distance par des inconnus, et ma maman m&#039;a toujours dit de ne pas ouvrir au inconnus ; )</p>]]></description>
			<author><![CDATA[dummy@example.com (hucoer)]]></author>
			<pubDate>Wed, 17 Oct 2012 05:21:12 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11148151#p11148151</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  iptables et ubuntu 12.04]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11146951#p11146951</link>
			<description><![CDATA[<p>Bon tant pis.<br />Encore merci pour les infos et le coût de main, c&#039;est sympa.</p><p>L&#039;essentiel est que cela marche maintenant.<br />(en précision,<br />mon installation Ubuntu 12.04 est neuve, id est formatage du disque dur et réinstallation à partir d&#039;un livecd 12.04.1 LTS 64 bits, pas de configuration particulière en dehors de l&#039;installation standard si ce n&#039;est le script iptables en question.<br />Éventuellement des restrictions sur la box pouvant expliquer cela? Mais ces mêmes restrictions ne posaient pas problème avant...)</p><p>Si hucoer peut nous dire si son problème persiste ou non, auquel cas je mettrai le sujet en résolu.</p><p>Ewen</p>]]></description>
			<author><![CDATA[dummy@example.com (Ewen56)]]></author>
			<pubDate>Tue, 16 Oct 2012 21:34:08 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11146951#p11146951</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  iptables et ubuntu 12.04]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11146861#p11146861</link>
			<description><![CDATA[<p>Pas du tout, ça parait pas logique. De toute façon je ne l&#039;ai jamais constaté, j&#039;ai toujours commencé par la boucle lo dans mes scripts, pour être sur de ne pas l&#039;oublier.</p>]]></description>
			<author><![CDATA[dummy@example.com (xavier4811)]]></author>
			<pubDate>Tue, 16 Oct 2012 21:26:13 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11146861#p11146861</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  iptables et ubuntu 12.04]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11146741#p11146741</link>
			<description><![CDATA[<p>Ok merci!<br />Je vois que tu maîtrise ton sujet xavier4811.</p><p>Une idée, avec les infos données, sur le pourquoi les anciennes distro acceptaient mon script sans boucle locale et pas la 12.04?</p><p>Ewen</p>]]></description>
			<author><![CDATA[dummy@example.com (Ewen56)]]></author>
			<pubDate>Tue, 16 Oct 2012 21:18:47 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11146741#p11146741</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  iptables et ubuntu 12.04]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11146691#p11146691</link>
			<description><![CDATA[<div class="quotebox"><cite>Ewen56 a écrit&#160;:</cite><blockquote><div><div class="codebox"><pre><code>Oct 15 10:59:49 *****-System-Product-Name kernel: [ ******] DROP_OUTIN= OUT=lo SRC=127.0.0.1 DST=127.0.0.1 LEN=72 TOS=0x00 PREC=0x00 TTL=64 ID=26860 DF PROTO=UDP SPT=58036 DPT=53 LEN=52
Oct 15 10:59:49 *****-System-Product-Name kernel: [ ******] DROP_OUTIN= OUT=lo SRC=127.0.0.1 DST=127.0.0.1 LEN=67 TOS=0x00 PREC=0x00 TTL=64 ID=26860 DF PROTO=UDP SPT=34501 DPT=53 LEN=47</code></pre></div><p>Celà évoque-t-il quelquechose à quelqu&#039;un?</p></div></blockquote></div><p>DROP_OUT : le préfixe ajouté dans la commande, ici paquet sortant<br />IN= interface d&#039;entrée (quand il y a)<br />OUT= interface de sortie (quand il y a, ici lo)<br />SRC=127.0.0.1 adresse IP source<br />DST=127.0.0.1 adresse IP de destination<br />LEN TOS PREC TTL ID DF pas très important avant de maîtriser beaucoup plus le sujet.<br />PROTO= protocole tcp|udp|icmp<br />SPT port source, celui de l&#039;interface qui envoie la trame<br />DPT port de destination sur l&#039;interface qui doit recevoir la trame</p>]]></description>
			<author><![CDATA[dummy@example.com (xavier4811)]]></author>
			<pubDate>Tue, 16 Oct 2012 21:12:41 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11146691#p11146691</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  iptables et ubuntu 12.04]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11146431#p11146431</link>
			<description><![CDATA[<p>Bonjour à tous,</p><p>Bon, avec une journée de retard, j&#039;ai pu testé sur mon PC concerné et le script iptables fonctionne correctement si j&#039;ajoute la boucle locale.<br />Je laisse le sujet ouvert pour le moment concernant le problème de hucoer.</p><p>Le script de test en question (si ça peut servir à quelqu&#039;un) :</p><div class="codebox"><pre class="vscroll"><code>#Réinitialisation
sudo /sbin/iptables -F
sudo /sbin/iptables -t nat -F
sudo /sbin/iptables -t mangle -F
sudo /sbin/iptables -X
sudo /sbin/iptables -t nat -X
sudo /sbin/iptables -t mangle -X

# On bloque tout par défaut
sudo /sbin/iptables -t filter -P INPUT DROP
sudo /sbin/iptables -t filter -P FORWARD DROP
sudo /sbin/iptables -t filter -P OUTPUT DROP

#trafic web
#HTTP
sudo /sbin/iptables -t filter -A INPUT -i eth0 -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT
sudo /sbin/iptables -t filter -A INPUT -o eth0 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
#HTTPS
sudo /sbin/iptables -t filter -A INPUT -i eth0 -p tcp --sport 443 -m state --state ESTABLISHED -j ACCEPT
sudo /sbin/iptables -t filter -A INPUT -o eth0 -p tcp --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT
#DNS
sudo /sbin/iptables -t filter -A INPUT -i eth0 -p udp --sport 53 -m state --state ESTABLISHED -j ACCEPT
sudo /sbin/iptables -t filter -A INPUT -o eth0 -p udp --dport 53 -m state --state NEW,ESTABLISHED -j ACCEPT
#boucle locale
sudo /sbin/iptables -t filter -A OUTPUT -o lo -s 127.0.0.0/8 -d 127.0.0.0/8 -m state ! --state INVALID -j ACCEPT
sudo /sbin/iptables -t filter -A INPUT -i lo -s 127.0.0.0/8 -d 127.0.0.0/8 -m state ! --state INVALID -j ACCEPT

exit 0</code></pre></div><p>Sinon, concernant la manip préconisée par xavier4811, en l&#039;absence de la boucle locale j&#039;obtiens des message de ce genre (tentative de MAJ d&#039;ubuntu via Update-manager) :</p><div class="codebox"><pre><code>Oct 15 10:59:49 *****-System-Product-Name kernel: [ ******] DROP_OUTIN= OUT=lo SRC=127.0.0.1 DST=127.0.0.1 LEN=72 TOS=0x00 PREC=0x00 TTL=64 ID=26860 DF PROTO=UDP SPT=58036 DPT=53 LEN=52
Oct 15 10:59:49 *****-System-Product-Name kernel: [ ******] DROP_OUTIN= OUT=lo SRC=127.0.0.1 DST=127.0.0.1 LEN=67 TOS=0x00 PREC=0x00 TTL=64 ID=26860 DF PROTO=UDP SPT=34501 DPT=53 LEN=47</code></pre></div><p>Ou</p><div class="codebox"><pre><code>[...]
Oct 15 10:53:52 *****-System-Product-Name AptDaemon.Worker: INFO: Finished transaction /org/debian/apt/transaction/*************
Oct 15 10:54:10 *****-System-Product-Name NetworkManager[829]: &lt;info&gt; (eth0): carrier now OFF (device state 100, deferring action for 4 seconds)
Oct 15 10:54:10 *****-System-Product-Name kernel: [ *******] e1000e: eth0 NIC Link is Down
Oct 15 10:54:14 *****-System-Product-Name NetworkManager[829]: &lt;info&gt; (eth0): device state change: activated -&gt; unavailable (reason &#039;carrier-changed&#039;) [100 20 40]
Oct 15 10:54:14 *****-System-Product-Name NetworkManager[829]: &lt;info&gt; (eth0): deactivating device (reason &#039;carrier-changed&#039;) [40]
Oct 15 10:54:14 *****-System-Product-Name NetworkManager[829]: &lt;info&gt; (eth0): canceled DHCP transaction, DHCP client pid 2140
Oct 15 10:54:14 *****-System-Product-Name avahi-daemon[837]: Withdrawing address record for ****::*******:****:**** on eth0.
Oct 15 10:54:14 *****-System-Product-Name avahi-daemon[837]: Leaving mDNS multicast group on interface eth0.IPv6 with address ****::*******:****:****
Oct 15 10:54:14 *****-System-Product-Name avahi-daemon[837]: Interface eth0.IPv6 no longer relevant for mDNS.
Oct 15 10:54:14 *****-System-Product-Name kernel: [ *******] ADDRCONF(NETDEV_UP): eth0: link is not ready
Oct 15 10:54:14 *****-System-Product-Name kernel: [ *******] DROP_OUTIN= OUT=eth0 SRC=192.168.1.12 DST=224.0.0.251 LEN=190 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 SPT=5353 LEN=170
Oct 15 10:54:14 *****-System-Product-Name avahi-daemon[837]: Withdrawing address record for 192.168.1.12 on eth0.
Oct 15 10:54:14 *****-System-Product-Name avahi-daemon[837]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.1.12.
Oct 15 10:54:14 *****-System-Product-Name avahi-daemon[837]: Interface eth0.IPv4 no longer relevant for mDNS.
Oct 15 10:54:14 *****-System-Product-Name dnsmasq[2215]: exiting on receipt of SIGTERM
Oct 15 10:54:14 *****-System-Product-Name NetworkManager[829]: &lt;info&gt; DNS: starting dnsmasq...
Oct 15 10:54:14 *****-System-Product-Name NetworkManager[829]: &lt;info&gt; (eth0): writing resolv.conf to /sbin/resolvconf
Oct 15 10:59:49 *****-System-Product-Name kernel: [ ******] DROP_OUTIN= OUT=lo SRC=127.0.0.1 DST=127.0.0.1 LEN=62 TOS=0x00 PREC=0x00 TTL=64 ID=8749 DF PROTO=UDP SPT=41286 DPT=53 LEN=42
Oct 15 10:59:49 *****-System-Product-Name kernel: [ ******] DROP_OUTIN= OUT=lo SRC=127.0.0.1 DST=127.0.0.1 LEN=62 TOS=0x00 PREC=0x00 TTL=64 ID=8749 DF PROTO=UDP SPT=42553 DPT=53 LEN=42
Oct 15 10:59:49 *****-System-Product-Name kernel: [ ******] DROP_OUTIN= OUT=lo SRC=127.0.0.1 DST=127.0.0.1 LEN=67 TOS=0x00 PREC=0x00 TTL=64 ID=8749 DF PROTO=UDP SPT=35375 DPT=53 LEN=47
Oct 15 10:59:49 *****-System-Product-Name kernel: [ ******] DROP_OUTIN= OUT=lo SRC=127.0.0.1 DST=127.0.0.1 LEN=67 TOS=0x00 PREC=0x00 TTL=64 ID=8749 DF PROTO=UDP SPT=51287 DPT=53 LEN=47
[...]</code></pre></div><p>Celà évoque-t-il quelquechose à quelqu&#039;un?</p><p>Sinon un grand merci à tous ceux qui m&#039;ont aidé <img src="http://forum.ubuntu-fr.org/img/smilies/wink.png" width="15" height="15" alt="wink" /></p><p>Ewen</p>]]></description>
			<author><![CDATA[dummy@example.com (Ewen56)]]></author>
			<pubDate>Tue, 16 Oct 2012 20:56:58 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11146431#p11146431</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  iptables et ubuntu 12.04]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11136111#p11136111</link>
			<description><![CDATA[<div class="codebox"><pre class="vscroll"><code>#!/bin/bash

#--Initialisation des connexions:

iptables -F
iptables -X

#--Définitions de connexions:

iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP

#--Autorisations des connexions locales:

iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT

#--Autorisation des ports web, ssh, mail, icmp(ping):

#-- Si les serveurs tournent sur ta machine oui
#-- Si c&#039;est un poste client, a effacer (au cas par cas)
#Ports entrant:
iptables -A INPUT -p tcp --dport ssh -j ACCEPT
iptables -A INPUT -p tcp --dport www -j ACCEPT
iptables -A INPUT -p tcp --dport imap2 -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT

#Ports sortant:
#iptables -A OUTPUT -p tcp --dport ssh -j ACCEPT
#iptables -A OUTPUT -p tcp --dport www -j ACCEPT
#iptables -A OUTPUT -p tcp --dport imap2 -j ACCEPT
#iptables -A OUTPUT -p icmp -j ACCEPT

#--Autorisation des ports déja connectés:

iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

#-- Si c est pas un serveur,
#-- 1 - tu te complique la vie
#-- 2 - elles font comment pour sortir tes connexions avec le # ?
iptables -A OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
#iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (xavier4811)]]></author>
			<pubDate>Mon, 15 Oct 2012 22:10:55 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11136111#p11136111</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  iptables et ubuntu 12.04]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11135901#p11135901</link>
			<description><![CDATA[<p>Merci kypton68, mais je vient d&#039;essayer et il y toujours la même erreur. </p><p>De plus, après lancement du script, je n&#039;ai plus accès a internet, même après un iptables -F, obligé de redémarré (par ce que je ne vois pas comment faire autrement!)</p>]]></description>
			<author><![CDATA[dummy@example.com (hucoer)]]></author>
			<pubDate>Mon, 15 Oct 2012 21:53:41 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11135901#p11135901</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  iptables et ubuntu 12.04]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11132761#p11132761</link>
			<description><![CDATA[<div class="quotebox"><cite>hucoer a écrit&#160;:</cite><blockquote><div><p>Bonjour a tous, </p><p>J&#039;ai aussi un problème avec iptables, avant de passer sous 12.04 mon script marché bien, mais depuis voici ce qu&#039;il m&#039;affiche: </p><div class="codebox"><pre><code>Bad argument `ACCEPT&#039;
Try `iptables -h&#039; or &#039;iptables --help&#039; for more information.
Bad argument `ACCEPT&#039;
Try `iptables -h&#039; or &#039;iptables --help&#039; for more information.</code></pre></div><p>Ha oui, et voici mon script: </p><div class="codebox"><pre class="vscroll"><code>#!/bin/bash

#--Initialisation des connexions:

iptables -F

#--Définitions de connexions:

iptables -P INPUT DROP
#iptables -P OUTPUT DROP
iptables -P FORWARD DROP

#--Autorisations des connexions locales:

iptables -A INPUT -i lo ACCEPT
iptables -A OUTPUT -i lo ACCEPT

#--Autorisation des ports web, ssh, mail, icmp(ping):

#Ports entrant:
iptables -A INPUT -p tcp --dport ssh -j ACCEPT
iptables -A INPUT -p tcp --dport www -j ACCEPT
iptables -A INPUT -p tcp --dport imap2 -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT

#Ports sortant:
#iptables -A OUTPUT -p tcp --dport ssh -j ACCEPT
#iptables -A OUTPUT -p tcp --dport www -j ACCEPT
#iptables -A OUTPUT -p tcp --dport imap2 -j ACCEPT
#iptables -A OUTPUT -p icmp -j ACCEPT

#--Autorisation des ports déja connectés:

iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
#iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT</code></pre></div><p>S&#039;il vous plaît ne me jeter pas de cailloux si c&#039;est j&#039;ai fait une erreur a la con, je suis nouveau sur le forum et pas bien vieux dans le monde merveilleux d&#039;Ubuntu. </p><p>Merci d&#039;avance.</p></div></blockquote></div><p>Sur lo l&#039;interface de sortie ( OUTPUT ) <img src="http://forum.ubuntu-fr.org/img/smilies/smile.png" width="15" height="15" alt="smile" /> -o a la place de -i;</p><div class="codebox"><pre><code>iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (kypton68)]]></author>
			<pubDate>Mon, 15 Oct 2012 18:13:12 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11132761#p11132761</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  iptables et ubuntu 12.04]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=11131291#p11131291</link>
			<description><![CDATA[<p>Bonjour a tous, </p><p>J&#039;ai aussi un problème avec iptables, avant de passer sous 12.04 mon script marché bien, mais depuis voici ce qu&#039;il m&#039;affiche: </p><div class="codebox"><pre><code>Bad argument `ACCEPT&#039;
Try `iptables -h&#039; or &#039;iptables --help&#039; for more information.
Bad argument `ACCEPT&#039;
Try `iptables -h&#039; or &#039;iptables --help&#039; for more information.</code></pre></div><p>Ha oui, et voici mon script: </p><div class="codebox"><pre class="vscroll"><code>#!/bin/bash

#--Initialisation des connexions:

iptables -F

#--Définitions de connexions:

iptables -P INPUT DROP
#iptables -P OUTPUT DROP
iptables -P FORWARD DROP

#--Autorisations des connexions locales:

iptables -A INPUT -i lo ACCEPT
iptables -A OUTPUT -i lo ACCEPT

#--Autorisation des ports web, ssh, mail, icmp(ping):

#Ports entrant:
iptables -A INPUT -p tcp --dport ssh -j ACCEPT
iptables -A INPUT -p tcp --dport www -j ACCEPT
iptables -A INPUT -p tcp --dport imap2 -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT

#Ports sortant:
#iptables -A OUTPUT -p tcp --dport ssh -j ACCEPT
#iptables -A OUTPUT -p tcp --dport www -j ACCEPT
#iptables -A OUTPUT -p tcp --dport imap2 -j ACCEPT
#iptables -A OUTPUT -p icmp -j ACCEPT

#--Autorisation des ports déja connectés:

iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
#iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT</code></pre></div><p>S&#039;il vous plaît ne me jeter pas de cailloux si c&#039;est j&#039;ai fait une erreur a la con, je suis nouveau sur le forum et pas bien vieux dans le monde merveilleux d&#039;Ubuntu. </p><p>Merci d&#039;avance.</p>]]></description>
			<author><![CDATA[dummy@example.com (hucoer)]]></author>
			<pubDate>Mon, 15 Oct 2012 15:51:54 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=11131291#p11131291</guid>
		</item>
	</channel>
</rss>
