[Linuxtrent] VPN SERVER con freeswan!

  • From: "magobin" <magobin@xxxxxxxxxxxxx>
  • To: <linuxtrent@xxxxxxxxxxxxx>
  • Date: Mon, 6 Jan 2003 17:58:51 +0100

Diaolin ma te hai già provato ipsec?, ho configurato il tutto, ma, anche se non 
mi dà errori, quando arrivo al punto di lanciare un ping dalla macchina win, 
senza neanche un microsecondo di tempo mi dice:

Negoziazione protezione IP in corso...
Negoziazione protezione IP in corso...
Negoziazione protezione IP in corso...
Negoziazione protezione IP in corso...

Statistiche Ping per 10.23.5.242:
    Pacchetti: Trasmessi = 4, Ricevuti = 0, Persi = 4 (100% persi),
Tempo approssimativo percorsi andata/ritorno in millisecondi:
    Minimo = 0ms, Massimo =  0ms, Medio =  0ms

eppure i vari passi li ho seguiti tutti...e non mi ha dato nessun errore.....ho 
notato che la scheda una volta che lancio ipsec, dopo che mi dà l'output di cui 
sopra non mi pinga più nulla se non se stessa, quindi sembra che il tunnel ci 
sia ma si perda....di seguito riporto la conf, precisando che la connessione è 
fatta su un portatile di prova con 2 schede di rete, e che comunque sia il 
portatile che il client senza ipsec si vedono in quanto nella stessa sottorete 
collegati tra loro da uno switch, mentre lanciato ipsec, penso crei il tunnel 
ma non sappia dove indirizzare le rotte....strano!

Ciao
Alessandro

la conf è così (ifconfig, route e ipsec.conf):

IFCONFIG E ROUTE -N sul portatile:
IFCONFIG:
eth0 Link encap:Ethernet HWaddr 00:10:D7:05:02:35 
inet addr:192.168.1.37 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1120 errors:1 dropped:0 overruns:0 frame:0
TX packets:489 errors:6 dropped:0 overruns:3 carrier:3
collisions:0 txqueuelen:100 
RX bytes:531116 (518.6 Kb) TX bytes:83436 (81.4 Kb)
Interrupt:11 Base address:0x4000

eth1 Link encap:Ethernet HWaddr 00:D0:59:C0:A7:56
inet addr:10.23.5.242 Bcast:10.23.5.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2313 errors:0 dropped:0 overruns:0 frame:0
TX packets:96 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100 
RX bytes:244447 (238.7 Kb) TX bytes:12596 (12.3 Kb)
Interrupt:11 Base address:0xf000 

ipsec0 Link encap:Ethernet HWaddr 00:D0:59:C0:A7:56 
inet addr:10.23.5.242 Mask:255.255.255.0
UP RUNNING NOARP MTU:16260 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:
0collisions:0 txqueuelen:10 
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

lo Link encap:Local Loopback 
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:38 errors:0 dropped:0 overruns:0 frame:0
TX packets:38 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0 
RX bytes:3516 (3.4 Kb) TX bytes:3516 (3.4 Kb)

ROUTE:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0  0.0.0.0  255.255.255.0  U 0 0 0  eth0
10.23.5.0     0.0.0.0  255.255.255.0  U 0 0 0 eth1
10.23.5.0     0.0.0.0  255.255.255.0  U 0 0 0 ipsec0
127.0.0.0     0.0.0.0  255.0.0.0         U 0 0 0 lo
0.0.0.0   192.168.1.1 0.0.0.0            UG 0 0 0 eth0

LINUX(ipsec.conf del gateway):
config setup
interfaces="ipsec0=eth1"
klipsdebug=none
plutodebug=none
plutoload=%search
plutostart=%search
uniqueids=yes

conn %default
keyingtries=1
compress=yes
disablearrivalcheck=no
authby=rsasig
leftrsasigkey=%cert
rightrsasigkey=%cert

conn roadwarrior-net
leftsubnet=10.23.5.0/24
also=roadwarrior

conn roadwarrior
right=%any
left=10.23.5.0
leftcert=magobin.mydomain.com.pem
auto=add
pfs=yes




WINDOWS(ipsec del client):

conn roadwarrior
 left=%any
 right=10.23.5.242
 rightca="C=IT,S=ITALIA,L=Bolzano,O=shadow,CN=magobin,Email=netadm@xxxxxxxxxxxx"
 network=lan
 auto=start
 pfs=yes

conn roadwarrior-net
 left=%any
 right=10.23.5.242
 rightsubnet=10.23.5.0/24 
 rightca="C=IT,S=ITALIA,L=Bolzano,O=shadow,CN=magobin,Email=netadm@xxxxxxxxxxxx"
 network=lan
 auto=start
 pfs=yes

Other related posts: