Difference between revisions of "Firewall-es"

From AMule Project FAQ
Jump to: navigation, search
m (Corrected Spelling of Español in language selection)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<center>[[Firewall|English]] | '''Español'''</center>
+
<center>
 +
[[Firewall|English]] |  
 +
[[Firewall-de|Deutsch]] |
 +
'''Espa&ntilde;ol'''
 +
</center>
  
 +
== Guias para distros específicas ==
  
'''NOTA:''' Si usas [http://www.suse.com SuSE Linux], intenta [[Firewall_SuSE|este "Como"]] primero.
+
*'''[http://www.suse.com SuSE Linux]''': [[Firewall_SuSE|Guía de firewalls en SuSE]]
 +
*'''[http://fedora.redhat.com Fedora Core]''': [[Firewall_Fedora|Guía de firewalls en Fedora]]
 +
 
 +
== Configuración de IPTables ==
  
 
Si configuras el puerto [http://www.ietf.org/rfc/rfc793.txt TCP] en [[aMule]] a XX  y el puerto  [http://www.faqs.org/rfcs/rfc768.html UDP] a YY entonces tienes que configurar tu cortafuegos como sigue:
 
Si configuras el puerto [http://www.ietf.org/rfc/rfc793.txt TCP] en [[aMule]] a XX  y el puerto  [http://www.faqs.org/rfcs/rfc768.html UDP] a YY entonces tienes que configurar tu cortafuegos como sigue:

Latest revision as of 13:54, 24 September 2008

English | Deutsch | Español

Guias para distros específicas

Configuración de IPTables

Si configuras el puerto TCP en aMule a XX y el puerto UDP a YY entonces tienes que configurar tu cortafuegos como sigue:

iptables -A INPUT -p tcp --dport XX -j ACCEPT
iptables -A INPUT -p udp --dport XX+3 -j ACCEPT
iptables -A INPUT -p udp --dport YY -j ACCEPT

Si estas construyendo tus reglas para iptables desde cero, necesitas también permitir llegar trafico ESTABLISHED y RELATED a traves de tu cortafuegos:

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

Y también debes permitir al trafico abandonar tu maquina, por cualquiera, permitiendo todo el trafico de salida:

iptables -P OUTPUT ACCEPT

o especificando reglas especiales.

NOTA: para Mandrake 10.0 Oficial y iptables podrias tener que cambiar la entrada multipuerto a iptables -A INPUT -p udp --dport XX:ZZ -j ACCEPT donde XX es el mismo puerto TCP usado en la primera linea y ZZ es el numero mas 3 (ej: 4662:4665)

Si quieres configurar aMule detrás de una puerta de enlace NAT, debes añadir estas lineas a tu "script" de configuración de iptables, en la puerta de enlace :

EXTIF es tu interfaz externa

EMULEPORT=4662
EMULEUDP=4672
EMULEUDP2=`expr $EMULEPORT + 3`
EMULEHOST=10.0.0.2
iptables -t nat -A PREROUTING -i $EXTIF -p tcp --destination-port $EMULEPORT -j DNAT --to-destination $EMULEHOST:$EMULEPORT
iptables -t nat -A PREROUTING -i $EXTIF -p udp --destination-port $EMULEUDP -j DNAT --to-destination $EMULEHOST:$EMULEUDP
iptables -t nat -A PREROUTING -i $EXTIF -p udp --destination-port $EMULEUDP2 -j DNAT --to-destination $EMULEHOST:$EMULEUDP2


Debes también asegurarte que tu cadena-FORWARD esta configurada correctamente. Normalmente, tendrás una entrada como esta:

iptables -A FORWARD -i $EXTIF -o $INTIF -d $EMULEHOST -m state --state ESTABLISHED,RELATED -j ACCEPT

Donde INTIF es tu interfaz interna y EMULEHOST es el "host" ejecutando el servidor eD2k en tu red interna.

Esto evitara nuevas conexiones. Por tanto, debes permitir todo “forwarding” para los puertos relacionados con aMule:

iptables -A FORWARD -i $EXTIF -o $INTIF -p tcp --dport $EMULEPORT -d $EMULEHOST -j ACCEPT
iptables -A FORWARD -i $EXTIF -o $INTIF -p udp --dport $EMULEUDP -d $EMULEHOST -j ACCEPT
iptables -A FORWARD -i $EXTIF -o $INTIF -p udp --dport $EMULEUDP2 -d $EMULEHOST -j ACCEPT

Una vez que todo este configurado,puedes comprobar aqui si tus puertos están ahora abiertos.