DUDA CON BINAT

View: New views
2 Messages — Rating Filter:   Alert me  

DUDA CON BINAT

by I.S.C. Jorge Octavio Guzmán Sánchez-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Buenas noches, estoy configurando un firewall para mi institución,
tengo varios servidores en una DMZ, en la maquina en la que estoy
montando el firewall (148.208.246.3) en el pf.conf estableci una regla
de binat
--------------------------------------------PF.CONF----------------------------------------------------------------------
#       $OpenBSD: pf.conf,v 1.37 2008/05/09 06:04:08 reyk Exp $
#
# See pf.conf(5) for syntax and examples.
# Remember to set net.inet.ip.forwarding=1 and/or net.inet6.ip6.forwarding=1
# in /etc/sysctl.conf if packets are to be forwarded between interfaces.

r001_if="em0"
r100_if="em1"
r253_if="em2"
r172_if="em3"
r002_if="em4"
r148_if="bge0"
r042_if="em5"
r032_if="em6"

eminus_int = "192.168.100.7"
eminus_ext = "148.208.246.7"

ext_if="bge0"
#int_if="int0"

#table <spamd-white> persist

#set skip on lo

#scrub in
#nat-anchor "ftp-proxy/*"
#rdr-anchor "ftp-proxy/*"
#rdr-anchor "relayd/*"
#nat on $r148_if from $r032_if to any -> $r148_if
nat on $ext_if from !($ext_if) -> ($ext_if:0)

binat on bge0  from $eminus_int to any -> $eminus_ext
------------------------------------------------------------------------------------------------------------------

Para que el NAT funcione active el ip fordwarding
[root@fw root]# head /etc/sysctl.conf
#       $OpenBSD: sysctl.conf,v 1.46 2008/01/05 18:38:37 mbalmer Exp $
#
# This file contains a list of sysctl options the user wants set at
# boot time.  See sysctl(3) and sysctl(8) for more information on
# the many available variables.
#
net.inet.ip.forwarding=1        # 1=Permit forwarding (routing) of IPv4 packets
#net.inet.ip.mforwarding=1      # 1=Permit forwarding (routing) of
IPv4 multicast packets
#net.inet.ip.multipath=1        # 1=Enable IP multipath routing
#net.inet6.ip6.forwarding=1     # 1=Permit forwarding (routing) of IPv6 packets
------------------------------------------------------------------------------------------------------------------

El NAT no me dio problemas, lo que si fue el BINAT, asi nadamas no
funciono, tube que agregarle un alias a mi targeta de red con la
direccion 148.208.246.7 y ahora si funciono

[root@fw root]# cat /etc/hostname.bge0
inet 148.208.246.3 255.255.255.0 NONE
inet alias  148.208.246.7 255.255.255.0 NONE

Esto esta bien, o ahy que activar alguna otra variable?

GRACIAS

--~--~---------~--~----~------------~-------~--~----~
Has recibido este mensaje porque estás suscrito a Grupo "OpenBSD México" de Grupos de Google.
 Si quieres publicar en este grupo, envía un mensaje de correo
electrónico a OpenBSD-Mexico@...
 Para anular la suscripción a este grupo, envía un mensaje a OpenBSD-Mexico+unsubscribe@...
 Para obtener más opciones, visita este grupo en http://groups.google.com.mx/group/OpenBSD-Mexico?hl=es.

-~----------~----~----~----~------~----~------~--~---


Re: DUDA CON BINAT

by gabojm :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Es correcto, tienes que agregar esa IP de alias localmente para cuando
desde nivel arp cuando llegue la peticion arp who-is  148.208.246.7
desde wan, se responda que tu tienes la IP, y ya de regreso recibe
paquetes para esa IP  y el binat hace su trabajo.

Saludos

On 21 ene, 21:18, I.S.C. Jorge Octavio Guzmán Sánchez
<jog...@...> wrote:

> Buenas noches, estoy configurando un firewall para mi institución,
> tengo varios servidores en una DMZ, en la maquina en la que estoy
> montando el firewall (148.208.246.3) en el pf.conf estableci una regla
> de binat
> --------------------------------------------PF.CONF----------------------------------------------------------------------
> #       $OpenBSD: pf.conf,v 1.37 2008/05/09 06:04:08 reyk Exp $
> #
> # See pf.conf(5) for syntax and examples.
> # Remember to set net.inet.ip.forwarding=1 and/or net.inet6.ip6.forwarding=1
> # in /etc/sysctl.conf if packets are to be forwarded between interfaces.
>
> r001_if="em0"
> r100_if="em1"
> r253_if="em2"
> r172_if="em3"
> r002_if="em4"
> r148_if="bge0"
> r042_if="em5"
> r032_if="em6"
>
> eminus_int = "192.168.100.7"
> eminus_ext = "148.208.246.7"
>
> ext_if="bge0"
> #int_if="int0"
>
> #table <spamd-white> persist
>
> #set skip on lo
>
> #scrub in
> #nat-anchor "ftp-proxy/*"
> #rdr-anchor "ftp-proxy/*"
> #rdr-anchor "relayd/*"
> #nat on $r148_if from $r032_if to any -> $r148_if
> nat on $ext_if from !($ext_if) -> ($ext_if:0)
>
> binat on bge0  from $eminus_int to any -> $eminus_ext
> ------------------------------------------------------------------------------------------------------------------
>
> Para que el NAT funcione active el ip fordwarding
> [root@fw root]# head /etc/sysctl.conf
> #       $OpenBSD: sysctl.conf,v 1.46 2008/01/05 18:38:37 mbalmer Exp $
> #
> # This file contains a list of sysctl options the user wants set at
> # boot time.  See sysctl(3) and sysctl(8) for more information on
> # the many available variables.
> #
> net.inet.ip.forwarding=1        # 1=Permit forwarding (routing) of IPv4 packets
> #net.inet.ip.mforwarding=1      # 1=Permit forwarding (routing) of
> IPv4 multicast packets
> #net.inet.ip.multipath=1        # 1=Enable IP multipath routing
> #net.inet6.ip6.forwarding=1     # 1=Permit forwarding (routing) of IPv6 packets
> ------------------------------------------------------------------------------------------------------------------
>
> El NAT no me dio problemas, lo que si fue el BINAT, asi nadamas no
> funciono, tube que agregarle un alias a mi targeta de red con la
> direccion 148.208.246.7 y ahora si funciono
>
> [root@fw root]# cat /etc/hostname.bge0
> inet 148.208.246.3 255.255.255.0 NONE
> inet alias  148.208.246.7 255.255.255.0 NONE
>
> Esto esta bien, o ahy que activar alguna otra variable?
>
> GRACIAS
--~--~---------~--~----~------------~-------~--~----~
Has recibido este mensaje porque estás suscrito a Grupo "OpenBSD México" de Grupos de Google.
 Si quieres publicar en este grupo, envía un mensaje de correo
electrónico a OpenBSD-Mexico@...
 Para anular la suscripción a este grupo, envía un mensaje a OpenBSD-Mexico+unsubscribe@...
 Para obtener más opciones, visita este grupo en http://groups.google.com.mx/group/OpenBSD-Mexico?hl=es.

-~----------~----~----~----~------~----~------~--~---