Ol� Mauricio,
Mauricio Mello wrote:
> Estou usando Suse7.3 Pro e consegui com sucesso estabelecer uma
> conex�o com outro computador em outra localidade, ou seja, consegui
> criar a rota via ipsec0.
<-- SNIP -->
> Bom voltando ao assunto, eu n�o estou conseguindo fazer as minhas
> esta��es na rede A pingar na Rede B. Acredito que deva ser problema
> de regras no firewall, o Firewall2 do Suse usa Iptables e eu n�o
> estou muito acustumado ainda, muito menos com o ipchanis rsrsrsrsrs
J� procurou pelas respostas nos logs? Os pacotes "dropados" ficam
registrados l�, procure nos logs pela express�o "Packet log:"
Se quer que as duas redes tenham comunica��o total (sem nenhuma
restri��o) edite o arquivo /etc/rc.config.d/firewall2.rc.config e
descomente a �ltima linha:
FW_CUSTOMRULES="/etc/rc.config.d/firewall2-custom.rc.config"
Depois edite o arquivo
/etc/rc.config.d/firewall2-custom.rc.config e adicione as seguintes
linhas na se��o
"fw_custom_before_antispoofing()"
/usr/sbin/iptables -A FORWARD -s IP_DA_REDE_A/MASQ_REDE_A -d \
IP_DA_REDE_B/MASQ_DA_REDE_B -j ACCEPT
/usr/sbin/iptables -A FORWARD -s IP_DA_REDE_B/MASQ_REDE_B -d \
IP_DA_REDE_A/MASQ_DA_REDE_A -j ACCEPT
Depois reinicie o SuSEfirewall:
rcSuSEfirewall2 restart
> Pergunto aos amigos: O fato de eu n�o pingar na outra rede � problema
de rota ou de regra no firewall? Como eu crio uma regra para as
> esta��es que est�o na rede 192.168.0.0/24 acessarem as maquinas na
> rede 192.168.1.0/24? isso tem que ser feito via eth1 ou ipsec0 ??
> Estou no caminho certo ?
Se vc est� usando o script que vem no SuSE (rcipsec start) para ativar o
ipsec, ent�o as rotas j� s�o criadas pelo pr�prio script, n�o precisa
colocar no bra�o.
Outra coisa, quando vc inicia o ipsec tb s�o gerados logs em
/var/log/messages. Uma inicializa��o com sucesso gera os logs mais ou
menos da seguinte forma:
Feb 7 16:47:54 xxxnet ipsec_setup: Starting FreeS/WAN IPsec 1.9...
Feb 7 16:47:54 xxxnet kernel: IPsec: KLIPS startup, FreeS/WAN version: 1.9
Feb 7 16:47:54 xxxnet kernel: IPsec: initialising PF_KEY domain sockets.
Feb 7 16:47:54 xxxnet kernel: IPsec: initialisation of device: ipsec0
Feb 7 16:47:54 xxxnet ipsec_setup: KLIPS debug `none'
Feb 7 16:47:54 xxxnet ipsec_setup: KLIPS ipsec0 on eth0
xxx.xxx.xxx.xxx/255.255.255.240 broadcast xxx.xxx.xxx.xxx
Feb 7 16:47:54 xxxnet ipsec_setup: Pluto debug `none'
Feb 7 16:47:54 xxxnet Pluto[4551]: Starting Pluto (FreeS/WAN Version 1.9)
Feb 7 16:47:54 xxxnet Pluto[4551]: including X.509 patch (Version 0.8.2)
Feb 7 16:47:54 xxxnet Pluto[4551]: X.509 certificate file
'/etc/x509cert.der' not found
Feb 7 16:47:54 xxxnet Pluto[4551]: OpenPGP certificate file
'/etc/pgpcert.pgp' not found
Feb 7 16:47:56 xxxnet Pluto[4551]: added connection description "xxx-yyy"
Feb 7 16:47:56 xxxnet Pluto[4551]: listening for IKE messages
Feb 7 16:47:56 xxxnet Pluto[4551]: adding interface ipsec0/eth0
xxx.xxx.xxx.xxx
Feb 7 16:47:56 xxxnet Pluto[4551]: loading secrets from
"/etc/ipsec.secrets"
Feb 7 16:47:56 xxxnet Pluto[4551]: "xxx-yyy" #1: initiating Main Mode
Feb 7 16:47:57 xxxnet Pluto[4551]: "xxx-yyy" #1: STATE_MAIN_I4: ISAKMP
SA established
Feb 7 16:47:57 xxxnet Pluto[4551]: "xxx-yyy" #2: initiating Quick Mode
RSASIG+ENCRYPT+TUNNEL+PFS
Feb 7 16:47:58 xxxnet Pluto[4551]: "xxx-yyy" #2: STATE_QUICK_I2: sent
QI2, IPsec SA established
Feb 7 16:47:58 xxxnet ipsec_setup: 102 "xxx-yyy" #1: STATE_MAIN_I1:
initiate
Feb 7 16:47:58 xxxnet ipsec_setup: 104 "xxx-yyy" #1: STATE_MAIN_I2:
from STATE_MAIN_I1; sent MI2, expecting MR2
Feb 7 16:47:58 xxxnet ipsec_setup: 106 "xxx-yyy" #1: STATE_MAIN_I3:
from STATE_MAIN_I2; sent MI3, expecting MR3
Feb 7 16:47:58 xxxnet ipsec_setup: 004 "xxx-yyy" #1: STATE_MAIN_I4:
ISAKMP SA established
Feb 7 16:47:58 xxxnet ipsec_setup: 110 "xxx-yyy" #2: STATE_QUICK_I1:
initiate
Feb 7 16:47:58 xxxnet ipsec_setup: 004 "xxx-yyy" #2: STATE_QUICK_I2:
sent QI2, IPsec SA established
Feb 7 16:47:58 xxxnet ipsec_setup: ...FreeS/WAN IPsec started
[]s,
--
-------------------------------
Br�ulio Gergull
GetNet Comunica��es Ltda.
[EMAIL PROTECTED]
http://www.getnet.com.br
http://www.suse-brasil.com.br/
------------------------------
Assinantes em 26/02/2002: 2252
Mensagens recebidas desde 07/01/1999: 156137
Historico e [des]cadastramento: http://linux-br.conectiva.com.br
Assuntos administrativos e problemas com a lista:
mailto:[EMAIL PROTECTED]