Ol� Gustavo,
Isso foi discutido j� no hist�rico, mas vou te mostrar como eu fa�o,

no /usr/src/sys/i386/conf ee seu_kernel
options         IPDIVERT
options         IPFIREWALL
options         IPFIREWALL_FORWARD
options         RANDOM_IP_ID
options         TCP_DROP_SYNFIN
options         IPSTEALTH
options         INCLUDE_CONFIG_FILE
options         IPFIREWALL_VERBOSE
options         DUMMYNET

Sugiro voc� ler o LINT para saber o que cada linha acima ir� trabalhar no
sistema apos compilado o novo kernel!

config -g  seu_kernel
cd ../../compile/seu_kernel
make depend
make
make install
shutdown -r now

Agora no /etc/rc.conf as seguintes linhas:
network_interfaces="xl0 xl1 lo0"
firewall_enable="YES"
firewall_script="/etc/firewall/firewall.conf"
firewall_type="UNKNOW"
firewall_quiet="NO"
firewall_logging="YES"
natd_enable="YES"
natd_interface="xl1" (essa interface deve ser a da internet)
natd_flags="-l -f /etc/natd.conf"

no natd.conf
interface xl1 (interface com a internet)
dynamic yes
same_ports yes
use_sockets yes

no firewall.conf
/sbin/ipfw -f flush
/sbin/ipfw add divert natd all from any to any via xl1
/sbin/ipfw add pass all from any to any

Bom voc� deve ver que no kernel n�o temos a regra "options
FIREWALL_DEFAULT_TO_ACCEPT" dessa forma a ultima regra ser� deny ip from any
to any e voc� deve liberar no seu firewall as portas que voc� quer utilizar,
tipo 80,25,22 etc...
Leia a documenta��o do Jean (www.free.bsd.com.br) sobre o nat que voc� tira
ainda mais suas duvidas, mas com isso voc� resolve o problema do nat,
Blz?

Abra�o,
M�rcio


> Pessoal,
> estou com um freebsd e tenho que fazer um nat, tentei seguir os passos do
> link:
> http://www.linuxbsd.com.br/phpLinuxBSD/modules/man/freebsd/sessao8_9.html,
> mas infelizmente n�o tive sucesso, ent�o se alguem conhecer algum outro
site
> que possa ajudar-me eu agradeceria.
> boa noite a todos
> gus
>
> _______________________________________________________________
> Sair da Lista: http://www2.fugspbr.org/mailman/listinfo/fugspbr
> Historico: http://www4.fugspbr.org/lista/html/FUG-BR/
>
>

_______________________________________________________________
Sair da Lista: http://www2.fugspbr.org/mailman/listinfo/fugspbr
Historico: http://www4.fugspbr.org/lista/html/FUG-BR/

Responder a