<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
You seem to be missing a rule for esp something like:<br>
<br>
iptables -I INPUT -p 50 -j ACCEPT<br>
<br>
Nick<br>
<br>
<div class="moz-cite-prefix">On 03/11/2015 18:05, Mitsue A Murakami
wrote:<br>
</div>
<blockquote cite="mid:5638F774.9040804@webcenter.com.br" type="cite">Hello,
<br>
<br>
I have configured a site to site vpn and tunnel is up but remote
network is unreachable.
<br>
<br>
Openswan version: 1:2.6.28+dfsg-5+squeeze2
<br>
<br>
kernel: 2.6.32-5-amd64
<br>
<br>
<br>
My side is debian linux firewall:
<br>
<br>
Public IP: xxx.xxx.xxx.xxx
<br>
Gateway: xxx.xxx.xxx.gw
<br>
<br>
Private IP: 192.168.5.12
<br>
<br>
<br>
The other side is a Cisco-ASA 5510:
<br>
<br>
Public IP: yyy.yyy.yyy.yyy
<br>
<br>
Private Network: 192.168.13.0/24
<br>
<br>
<br>
<br>
<br>
Here is my configuration file:
<br>
<br>
config setup
<br>
plutoopts="--perpeerlog"
<br>
nat_traversal=yes
<br>
virtual_private=%v4:192.168.5.0/24,%v4:192.168.13.0/24
<br>
nhelpers=0
<br>
protostack=netkey
<br>
<br>
conn france
<br>
authby=secret
<br>
auto=start
<br>
keyexchange=ike
<br>
esp=3des-md5;modp1024
<br>
ikelifetime=8h
<br>
pfs=yes
<br>
type=tunnel
<br>
left=xxx.xxx.xxx.xxx
<br>
leftsourceip=192.168.5.12
<br>
leftsubnet=192.168.5.0/24
<br>
leftnexthop=%defaultroute
<br>
right=yyy.yyy.yyy.yyy
<br>
rightsubnet=192.168.13.0/24
<br>
rightnexthop=%defaultroute
<br>
<br>
<br>
<br>
<br>
<br>
$ ipsec auto --status
<br>
<br>
000 using kernel interface: netkey
<br>
000 interface lo/lo ::1
<br>
000 interface lo/lo 127.0.0.1
<br>
000 interface lo/lo 127.0.0.1
<br>
000 interface eth0/eth0 xxx.xxx.xxx.xxx
<br>
000 interface eth0/eth0 xxx.xxx.xxx.xxx
<br>
000 interface eth1/eth1 192.168.5.12
<br>
000 interface eth1/eth1 192.168.5.12
<br>
000 interface eth2/eth2 zzz.zzz.zzz.zzz
<br>
000 interface eth2/eth2 zzz.zzz.zzz.zzz
<br>
000 interface tun0/tun0 10.0.31.2
<br>
000 interface tun0/tun0 10.0.31.2
<br>
000 %myid = (none)
<br>
000 debug none
<br>
000
<br>
000 virtual_private (%priv):
<br>
000 - allowed 2 subnets: 192.168.5.0/24, 192.168.13.0/24
<br>
000 - disallowed 0 subnets:
<br>
000 WARNING: Disallowed subnets in virtual_private= is empty. If
you have
<br>
000 private address space in internal use, it should be
excluded!
<br>
000
<br>
000 algorithm ESP encrypt: id=2, name=ESP_DES, ivlen=8,
keysizemin=64, keysizemax=64
<br>
000 algorithm ESP encrypt: id=3, name=ESP_3DES, ivlen=8,
keysizemin=192, keysizemax=192
<br>
000 algorithm ESP encrypt: id=6, name=ESP_CAST, ivlen=8,
keysizemin=40, keysizemax=128
<br>
000 algorithm ESP encrypt: id=7, name=ESP_BLOWFISH, ivlen=8,
keysizemin=40, keysizemax=448
<br>
000 algorithm ESP encrypt: id=11, name=ESP_NULL, ivlen=0,
keysizemin=0, keysizemax=0
<br>
000 algorithm ESP encrypt: id=12, name=ESP_AES, ivlen=8,
keysizemin=128, keysizemax=256
<br>
000 algorithm ESP encrypt: id=13, name=ESP_AES_CTR, ivlen=8,
keysizemin=160, keysizemax=288
<br>
000 algorithm ESP encrypt: id=14, name=ESP_AES_CCM_A, ivlen=8,
keysizemin=128, keysizemax=256
<br>
000 algorithm ESP encrypt: id=15, name=ESP_AES_CCM_B, ivlen=8,
keysizemin=128, keysizemax=256
<br>
000 algorithm ESP encrypt: id=16, name=ESP_AES_CCM_C, ivlen=8,
keysizemin=128, keysizemax=256
<br>
000 algorithm ESP encrypt: id=18, name=ESP_AES_GCM_A, ivlen=8,
keysizemin=128, keysizemax=256
<br>
000 algorithm ESP encrypt: id=19, name=ESP_AES_GCM_B, ivlen=8,
keysizemin=128, keysizemax=256
<br>
000 algorithm ESP encrypt: id=20, name=ESP_AES_GCM_C, ivlen=8,
keysizemin=128, keysizemax=256
<br>
000 algorithm ESP encrypt: id=22, name=ESP_CAMELLIA, ivlen=8,
keysizemin=128, keysizemax=256
<br>
000 algorithm ESP encrypt: id=252, name=ESP_SERPENT, ivlen=8,
keysizemin=128, keysizemax=256
<br>
000 algorithm ESP encrypt: id=253, name=ESP_TWOFISH, ivlen=8,
keysizemin=128, keysizemax=256
<br>
000 algorithm ESP auth attr: id=1, name=AUTH_ALGORITHM_HMAC_MD5,
keysizemin=128, keysizemax=128
<br>
000 algorithm ESP auth attr: id=2, name=AUTH_ALGORITHM_HMAC_SHA1,
keysizemin=160, keysizemax=160
<br>
000 algorithm ESP auth attr: id=5,
name=AUTH_ALGORITHM_HMAC_SHA2_256, keysizemin=256, keysizemax=256
<br>
000 algorithm ESP auth attr: id=8,
name=AUTH_ALGORITHM_HMAC_RIPEMD, keysizemin=160, keysizemax=160
<br>
000 algorithm ESP auth attr: id=9, name=AUTH_ALGORITHM_AES_CBC,
keysizemin=128, keysizemax=128
<br>
000 algorithm ESP auth attr: id=251, name=(null), keysizemin=0,
keysizemax=0
<br>
000
<br>
000 algorithm IKE encrypt: id=0, name=(null), blocksize=16,
keydeflen=131
<br>
000 algorithm IKE encrypt: id=3, name=OAKLEY_BLOWFISH_CBC,
blocksize=8, keydeflen=128
<br>
000 algorithm IKE encrypt: id=5, name=OAKLEY_3DES_CBC,
blocksize=8, keydeflen=192
<br>
000 algorithm IKE encrypt: id=7, name=OAKLEY_AES_CBC,
blocksize=16, keydeflen=128
<br>
000 algorithm IKE encrypt: id=65004, name=OAKLEY_SERPENT_CBC,
blocksize=16, keydeflen=128
<br>
000 algorithm IKE encrypt: id=65005, name=OAKLEY_TWOFISH_CBC,
blocksize=16, keydeflen=128
<br>
000 algorithm IKE encrypt: id=65289, name=OAKLEY_TWOFISH_CBC_SSH,
blocksize=16, keydeflen=128
<br>
000 algorithm IKE hash: id=1, name=OAKLEY_MD5, hashsize=16
<br>
000 algorithm IKE hash: id=2, name=OAKLEY_SHA1, hashsize=20
<br>
000 algorithm IKE hash: id=4, name=OAKLEY_SHA2_256, hashsize=32
<br>
000 algorithm IKE hash: id=6, name=OAKLEY_SHA2_512, hashsize=64
<br>
000 algorithm IKE dh group: id=2, name=OAKLEY_GROUP_MODP1024,
bits=1024
<br>
000 algorithm IKE dh group: id=5, name=OAKLEY_GROUP_MODP1536,
bits=1536
<br>
000 algorithm IKE dh group: id=14, name=OAKLEY_GROUP_MODP2048,
bits=2048
<br>
000 algorithm IKE dh group: id=15, name=OAKLEY_GROUP_MODP3072,
bits=3072
<br>
000 algorithm IKE dh group: id=16, name=OAKLEY_GROUP_MODP4096,
bits=4096
<br>
000 algorithm IKE dh group: id=17, name=OAKLEY_GROUP_MODP6144,
bits=6144
<br>
000 algorithm IKE dh group: id=18, name=OAKLEY_GROUP_MODP8192,
bits=8192
<br>
000
<br>
000 stats db_ops: {curr_cnt, total_cnt, maxsz} :context={0,2,64}
trans={0,2,2304} attrs={0,2,1536}
<br>
000
<br>
000 "france":
192.168.5.0/24===xxx.xxx.xxx.xxx<xxx.xxx.xxx.xxx>[+S=C]---xxx.xxx.xxx.gw...xxx.xxx.xxx.gw---yyy.yyy.yyy.yyy<yyy.yyy.yyy.yyy>[+S=C]===192.168.13.0/24;
erouted; eroute owner: #2
<br>
000 "france": myip=192.168.5.12; hisip=unset;
<br>
000 "france": ike_life: 28800s; ipsec_life: 28800s;
rekey_margin: 540s; rekey_fuzz: 100%; keyingtries: 0
<br>
000 "france": policy:
PSK+ENCRYPT+TUNNEL+PFS+UP+IKEv2ALLOW+lKOD+rKOD; prio: 24,24;
interface: eth0;
<br>
000 "france": newest ISAKMP SA: #1; newest IPsec SA: #2;
<br>
000 "france": IKE algorithm newest: 3DES_CBC_192-SHA1-MODP1024
<br>
000 "france": ESP algorithms wanted: 3DES(3)_000-MD5(1)_000;
pfsgroup=MODP1024(2); flags=-strict
<br>
000 "france": ESP algorithms loaded: 3DES(3)_192-MD5(1)_128
<br>
000 "france": ESP algorithm newest: 3DES_000-HMAC_MD5;
pfsgroup=MODP1024
<br>
000
<br>
000 #2: "france":500 STATE_QUICK_I2 (sent QI2, IPsec SA
established); EVENT_SA_REPLACE in 27966s; newest IPSEC; eroute
owner; isakmp#1; idle; import:admin initiate
<br>
000 #2: "france" <a class="moz-txt-link-abbreviated" href="mailto:esp.12218680@yyy.yyy.yyy.yyy">esp.12218680@yyy.yyy.yyy.yyy</a>
<a class="moz-txt-link-abbreviated" href="mailto:esp.4e5b3d1@xxx.xxx.xxx.xxx">esp.4e5b3d1@xxx.xxx.xxx.xxx</a> <a class="moz-txt-link-abbreviated" href="mailto:tun.0@yyy.yyy.yyy.yyy">tun.0@yyy.yyy.yyy.yyy</a>
<a class="moz-txt-link-abbreviated" href="mailto:tun.0@xxx.xxx.xxx.xxx">tun.0@xxx.xxx.xxx.xxx</a> ref=0 refhim=4294901761
<br>
000 #1: "france":500 STATE_MAIN_I4 (ISAKMP SA established);
EVENT_SA_REPLACE in 28116s; newest ISAKMP; lastdpd=58s(seq in:0
out:0); idle; import:admin initiate
<br>
000
<br>
<br>
<br>
<br>
firewall:~# service ipsec status
<br>
IPsec running - pluto pid: 1417
<br>
pluto pid 1417
<br>
1 tunnels up
<br>
some eroutes exist
<br>
<br>
<br>
Traceroute shows that traffic is going to the Internet, not
through the tunnel. These are the firewall rules:
<br>
<br>
## VPN
<br>
<br>
iptables -A INPUT -p udp --dport 500 -j ACCEPT
<br>
iptables -A INPUT -p tcp --dport 4500 -j ACCEPT
<br>
iptables -A INPUT -p udp --dport 4500 -j ACCEPT
<br>
<br>
iptables -A FORWARD -s 192.168.5.0/24 -d 192.168.13.0/24 -j ACCEPT
<br>
iptables -A FORWARD -d 192.168.5.0/24 -s 192.168.13.0/24 -j ACCEPT
<br>
<br>
iptables -t nat -I POSTROUTING -m policy --dir out --pol ipsec -j
ACCEPT
<br>
<br>
<br>
<br>
Can someone help me with this issue?
<br>
<br>
<br>
Thank you,
<br>
<br>
<br>
--
<br>
Mitsue
<br>
<br>
_______________________________________________
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.openswan.org">Users@lists.openswan.org</a>
<br>
<a class="moz-txt-link-freetext" href="https://lists.openswan.org/mailman/listinfo/users">https://lists.openswan.org/mailman/listinfo/users</a>
<br>
Micropayments:
<a class="moz-txt-link-freetext" href="https://flattr.com/thing/38387/IPsec-for-Linux-made-easy">https://flattr.com/thing/38387/IPsec-for-Linux-made-easy</a>
<br>
Building and Integrating Virtual Private Networks with Openswan:
<br>
<a class="moz-txt-link-freetext" href="http://www.amazon.com/gp/product/1904811256/104-3099591-2946327?n=283155">http://www.amazon.com/gp/product/1904811256/104-3099591-2946327?n=283155</a><br>
</blockquote>
<br>
</body>
</html>