[LUG.ro] Firewall

Fernando Scandolo (D`arcy) lugro@lugro.org.ar
Fri, 23 May 2003 14:24:30 -0300


This is a multi-part message in MIME format.

------=_NextPart_000_0041_01C32137.064E0480
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

  Solo tenes que especificar que tipo de paquetes queres dejar salir. En =
vez de:
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
  Usa algo asi:
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -p tcp --dport 80 -j ACCEPT
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -p tcp --dport 25 -j ACCEPT
 =20
  Etc., etc., etc.

  Saludos
  --Fernando
  ----- Original Message -----=20
  From: Germ=E1n Porta=20
  To: lugro@lugro.org.ar=20
  Sent: Friday, May 23, 2003 1:34 PM
  Subject: [LUG.ro] Firewall


  Hola lista, pude configurar bastante bien mi firewall, pero me trabe =
en una parte, yo quiero bloquear todos los servicios que pasen por el =
gateway, digamos por el canal FORWARD y habilitar solo algunos.
  Ahora estas son las reglas por defecto:
  $FIREWALL -P INPUT DROP
  $FIREWALL -P OUTPUT ACCEPT
  $IPTABLES -P FORWARD DROP

  Yo por ahora lo tengo funcionando aceptando todos los servicios de la =
siguiente forma:
  $IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state =
ESTABLISHED,RELATED -j ACCEPT
  $IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT

  Alguien me puede dar una mano para hacer las reglas para habilitar =
puertos como el 80, 25, 110, msn, solamente.
  Bueno gracias y espero que me entiendan

------=_NextPart_000_0041_01C32137.064E0480
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>&nbsp; Solo tenes que especificar que =
tipo de=20
paquetes queres dejar salir. En vez de:</FONT></DIV>
<DIV>$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; Usa algo asi:</FONT></DIV>
<DIV>$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -p tcp --dport 80 -j =
ACCEPT</DIV>
<DIV>$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -p tcp --dport 25 -j =
ACCEPT</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; Etc., etc., etc.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; Saludos</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp; --Fernando</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A title=3Dlistas@compulinx.com.ar =
href=3D"mailto:listas@compulinx.com.ar">Germ=E1n=20
  Porta</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
title=3Dlugro@lugro.org.ar=20
  href=3D"mailto:lugro@lugro.org.ar">lugro@lugro.org.ar</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Friday, May 23, 2003 1:34 =
PM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [LUG.ro] =
Firewall</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=3DArial size=3D2>
  <DIV><FONT face=3DArial size=3D2>Hola lista, pude configurar bastante =
bien mi=20
  firewall, pero me trabe en una parte, yo quiero bloquear todos los =
servicios=20
  que pasen por el gateway, digamos por el canal FORWARD y habilitar =
solo=20
  algunos.</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>Ahora estas son las reglas por=20
  defecto:</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>$FIREWALL -P INPUT DROP<BR>$FIREWALL =
-P OUTPUT=20
  ACCEPT<BR>$IPTABLES -P FORWARD DROP<BR></FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>Yo por ahora lo tengo funcionando =
aceptando todos=20
  los servicios de la siguiente forma:</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>$IPTABLES -A FORWARD -i $EXTIF -o =
$INTIF -m state=20
  --state ESTABLISHED,RELATED -j ACCEPT<BR>$IPTABLES -A FORWARD -i =
$INTIF -o=20
  $EXTIF -j ACCEPT</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Alguien me puede dar una mano para =
hacer las=20
  reglas para habilitar puertos como el 80, 25, 110, msn,=20
solamente.</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>Bueno gracias y espero que me=20
  entiendan</DIV></FONT></FONT></DIV>
  <DIV>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0041_01C32137.064E0480--