[Linux-bruxelles] firewall - bittorrent

Alain BarBason alain at barbason.be
Mer 5 Oct 11:26:26 CEST 2005


SaintShakaJin a écrit :
> On reprend...
> Tu passes par un routeur (en l'occurrence un pc) et tu veux télécharger 
> avec bittorrent sur ton pc client?
en effet.
> Si c'est bien ça, tu dois ouvrir le port 6881 mais pour ta machine 
> cliente, pas ton routeur ce qui est logique, c'est une question de 
> forward. Regarde la documentation que je t'ai donnée.
(bon, j'ai lu, relu, je relirai encore, mais je pige pas... )

oui, mais j'ai aucune règle sur mon client
avant
> P2-7:/home/alain# iptables -L
> Chain INPUT (policy ACCEPT)
> target     prot opt source               destination
> 
> Chain FORWARD (policy ACCEPT)
> target     prot opt source               destination
> 
> Chain OUTPUT (policy ACCEPT)
> target     prot opt source               destination

Les 3 lignes que tu m'as donné
> P2-7:/home/alain# ./ipbt

le resultat
> P2-7:/home/alain# iptables -L
> Chain INPUT (policy ACCEPT)
> target     prot opt source               destination
> ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:6881
> ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
> 
> Chain FORWARD (policy ACCEPT)
> target     prot opt source               destination
> 
> Chain OUTPUT (policy ACCEPT)
> target     prot opt source               destination
> ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:6881

Moi, ce que j'avais compris,c'est que mon client, n'ayant aucune règle, 
acepte tout partout.

L'iptable de mon serveur étant plein de chose, probablement au fait que 
pour qu'il soit passerelle, j'ai fait un apt-get de ipmasq et il me fait 
une table à rallonge (les lignes avec 10.0.0.0 c'est de moi pour un wifi)
> palier500:~# iptables -L
> Chain INPUT (policy DROP)
> target     prot opt source               destination
> ACCEPT     all  --  10.0.0.0/8           anywhere
> ACCEPT     all  --  anywhere             anywhere
> LOG        all  --  127.0.0.0/8          anywhere            LOG level warning
> DROP       all  --  127.0.0.0/8          anywhere
> ACCEPT     all  --  anywhere             255.255.255.255
> ACCEPT     all  --  localnet/24          anywhere
> ACCEPT    !tcp  --  anywhere             BASE-ADDRESS.MCAST.NET/4
> LOG        all  --  localnet/24          anywhere            LOG level warning
> DROP       all  --  localnet/24          anywhere
> ACCEPT     all  --  anywhere             255.255.255.255
> ACCEPT     all  --  anywhere             213-193-168-74.adsl.easynet.be
> LOG        all  --  anywhere             anywhere            LOG level warning
> DROP       all  --  anywhere             anywhere
> 
> Chain FORWARD (policy DROP)
> target     prot opt source               destination
> TCPMSS     tcp  --  anywhere             anywhere            tcp flags:SYN,RST/SYN tcpmss match 1400:1536 TCPMSS clamp to PMTU
> ACCEPT     all  --  localnet/24          anywhere
> ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
> LOG        all  --  anywhere             localnet/24         LOG level warning
> DROP       all  --  anywhere             localnet/24
> LOG        all  --  anywhere             anywhere            LOG level warning
> DROP       all  --  anywhere             anywhere
> 
> Chain OUTPUT (policy DROP)
> target     prot opt source               destination
> ACCEPT     all  --  anywhere             10.0.0.0/8
> ACCEPT     all  --  anywhere             anywhere
> ACCEPT     all  --  anywhere             255.255.255.255
> ACCEPT     all  --  anywhere             localnet/24
> ACCEPT    !tcp  --  anywhere             BASE-ADDRESS.MCAST.NET/4
> LOG        all  --  anywhere             localnet/24         LOG level warning
> DROP       all  --  anywhere             localnet/24
> ACCEPT     all  --  anywhere             255.255.255.255
> ACCEPT     all  --  213-193-168-74.adsl.easynet.be  anywhere
> LOG        all  --  anywhere             anywhere            LOG level warning
> DROP       all  --  anywhere             anywhere
> palier500:~#


> Et ce n'est pas probablement iptables mais c'est iptables à 100% c'est 
> lui qui t'en empêche qui il fait son boulot :)
> 
> Alain BarBason a écrit :
> 
>> Thibault Richard a écrit :
>>
>>> iptables -L pour voir les règles en cours
>>>
>>> #Pour auroriser le port TCP 6881 en sortie si tu il existe des règles de
>>> restriction de sortie
>>> iptables -A OUTPUT -p TCP --dport 6881 -j ACCEPT
>>> #Pour auroriser le port TCP 6881 en entrée :
>>> iptables -A INPUT -p TCP --dport 6881 -j ACCEPT
>>> #Pour autoriser les connections entrantes en réponse à tes requêtes
>>> sortantes
>>> iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
>>
>>
>> j'ai rajouté les 3 lignes, et cela ne change rien.
>> Le débit reste moyen
>> Le message d'erreur reste le même (Azureus/outils/ NAT/firewal ltest
>> "Test du port 6881 ... Erreur NAT"
>>
>> J'ai survolé les adresses cités d'iptables, mais ça reste encore confu.
>> Mais bon, je vais enocre faire un tour du coté de google vu que vous 
>> me confirmez que ça se passe probablement du coté d'iptables.
>>
>>>> Bonjour,
>>>>
>>>> Je fais des essai de bittorent avec Azureus, mais c'est plutot lent, et
>>>> il m'indique que le port 6881 est probablement bloqué par un firewall.
>>>> Ma connexion internet passe en effet par un serveur/router Sarge.
>>>> Comment voir ce qui est filtré ou non, comment ouvrir des ports ?
>>>> Je n'y connais rien la dedans, si ce n'est que j'ai installé ipmasq
>>>>
>>
>>
> 
> 


-- 
by AlainBB
http://www.barbason.be




Plus d'informations sur la liste de diffusion Linux-bruxelles