[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

vpn



All

Estou tentando implementar uma vpn entre a rede de casa, ip fixo,  
e a rede da empresa, ip fixo, como teste. Depois dos testes vou ter 
que implementar uma vpn entre duas lojas, sendo que em uma 
delas o ip é dinâmico(dhcp). Junto com a vpn vou ter que 
compartilhar o diretório /home/db, via Samba,  para que o sistema 
de controle de estoque das lojas, desenvolvido em Delphi+Firebird, 
possam uma ter acesso ao diretório /home/db da outra.

Infelismente estou tendo problemas para implementar a vpn entre 
a rede de casa e da empresa. Instalei o freeswan via código fonte 
pois em uma das pontas a distribuição é slackware. Quando eu 
tento inicializar o ipsec aparece a seguinte mensagem de erro :

ipsec_setup: (/etc/ipsec.conf, line 1) we only support version 2
ipsec.conf files -- `start' aborted

  Quando faço o teste do freeswan, através do comando
ipsec verify, aparecem as seguintes mensagens :

Checking your system to see if IPsec got installed and started correctly:
Version check and ipsec on-path                                      
  [OK]
Linux FreeS/WAN 2.03
Checking for KLIPS support in kernel                                 
  [OK]
Checking for RSA private key (/etc/ipsec.secrets)                    
  [FAILED]
ipsec showhostkey: no default key in "/etc/ipsec.secrets"
Checking that pluto is running                                       
  [FAILED]
whack: Pluto is not running (no "/var/run/pluto.ctl")
Two or more interfaces found, checking IP forwarding                 
  [FAILED]
whack: Pluto is not running (no "/var/run/pluto.ctl")
Checking NAT and MASQUERADEing

Opportunistic Encryption DNS checks:
Looking for TXT in forward map: stargate                             
  [MISSING]
Does the machine have at least one non-private address?              
  [OK]
Looking for TXT in reverse map: 555.44.171.200.in-addr.arpa.         
  [MISSING]

Fiz a instalação da seguinte forma :

cd /root/dnload
wget ftp://ftp.xs4all.nl/pub/crypto/freeswan/freeswan-2.03.tar.gz
wget
ftp://ftp.xs4all.nl/pub/crypto/freeswan/kernpatch/freeswan-2.03.k2.4.patch.gz
cd /usr/src/linux
cp /root/dnload/freeswan-2.03.k2.4.patch.gz .
gunzip freeswan-2.03.k2.4.patch.gz
patch -p1 < freeswan-2.03.k2.4.patch
make menuconfig
- selecionei as seguintes opções no kernel
    Aqui segue a lista das opções do IPsec que ficam no menu
Networking Options:
            IP Security Protocol (FreeS/WAN IPSEC)
            IPSEC: IP-in-IP encapsulation (tunnel mode)
            IPSEC: Authentication Header
            HMAC-MD5 authentication algorithm
            HMAC-SHA1 authentication algorithm
            HMAC-SHA1 authentication algorithm
            IPSEC: Encapsulating Security Payload
            3DES encryption algorithm
            IPSEC: IP Compression
            IPSEC: Debugging Option
- recolpilei o kernel e reinicializei o computador
cd /usr/local/src
tar xzvf /root/dnload/freeswan-2.03.tar.gz
cd freeswan-2.03
make programs
make install
# configurei o arquivo /etc/ipsec.conf da seguinte forma

config setup
  interfaces="ipsec0=eth0"
  klipsdebug=none
  plutodebug=none
  plutoload=%search
  plutostart=%search
  uniqueids=yes

conn %defuylt
  keyingtries=0
  authby=rsasig
  leftrsasigkey=%dns
  rightrsasigkey=%dns
conn vpn
  left=200.171.22.333
  leftsubnet=192.168.0.0/24
  leftnexthop=200.171.22.339
  leftrsasigkey= <chave do micro (A)>

  right=200.171.44.555
  rightsubnet=192.168.1.0/24
  rightnexthop=200.171.44.559
  rightrsasigkey= <chave do micro (A)>
  type=tunnel
  auto=add

  Chequei com outros documento e aparentemente esta correto. 
Alguem saberia me dizer o que esta errado ?!!?!?


[ ]'s
 
 ********************   .''`.
* Caio Ferreira     *  : :'  :
* GNU/Linux Debian  *  `. `'`
 ********************    `-



Reply to: